PySwarm for PyCarrara (V0.6) Released 01/25/2013

16781012

Comments

  • DUDUDUDU Posts: 1,945
    edited December 1969

    I await the next version impatiently because I have difficulties with the zones of containement (.car objects) and the PIA.
    Good work and still thank you!

  • JoepingletonJoepingleton Posts: 746
    edited December 1969

    I think I got rid of the "walking sideways" problem by adjusting the key frame parameters.

    I like that once you set up the Carrara scene and generate a script in PySwarm you can then modify the Carrara scene to get different results. The zombie scene was created by using the Pyswarm set up from my previous experiment and replacing all the objects in a new Carrara scene. The attractor object is now moving in Carrara and I didn't have to alter the PySwarm script.

  • JoepingletonJoepingleton Posts: 746
    edited March 2014

    View the animation on YOUTUBE.COM by clicking here.

    This is another experiment with the PySwarm plug in for Carrara 8.5 Pro and NLA Clips. This time the figures follow the terrain object using Sparrowhawke3d's Follow Terrain Plug In for Carrara ( http://www.sparrowhawke3d.com/Sparrowhawke3DLaboratory.html )

    I created a "Boid" group that was a figure with a looping walk cycle NLA clip with a duration of 2 minutes. Then I replicated that "Boid" 10 times and numbered the "Boid" groups. Then I used PySwarm to generate a movement script with 10 boids and 1 attractor object. Then I imported the PySwarm script into Carrara. Then I applied Sparrowhawke3d's Follow Terrain Plug In to make each "boid" drop to the surface of the terrain object. One walk NLA clip and the Pyswarm script control all movement, no key frame editing.

    I think its an improvement on my last experiments.
    What do you think?

    View the Stereoscopic 3D animation on YOUTUBE.COM by clicking here.

    carrara_pyswarm_follow_terrain_animation_experimen_by_joepingleton-d78pb3c.jpg
    633 x 570 - 253K
    Post edited by Joepingleton on
  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    FD...HELP !

    I have not seen this problem before and it too has me baffled.

    The first error message (something like): "WindowsError: [Error 2] The system cannot find the file specified"

    This error is occurring even before PySwarm script is started, which probably causing the code that follows to not run properly (unable to find the attractor).

    From what I know so far, the error is likely being caused (again) by Python settings related to non-English. I will need to read up on this more before I can offer any suggestions.

    Until then, it might be useful to know whether you get this error in using PySwarm on other Carrara scenes? Or is it unique to just this one? What happens if you deactivate attraction? Does it run okay then? Any specifics you can provide as to when you get this error and when you don't will help me run it down.

    FD

    DUDU, sorry you are still having difficulties with PySwarm.

    I have not been able to discover anything new regarding your problem. Without being able to reproduce the problem, I cannot find the source of the issue. If the problem is with your system, Python, PyCarrara settings, an updated version of PySwarm will not help.

    Here are a few things you can check:

    1) Make sure you are using the latest versions of PIA (V2.0) and the PySwarm (V0.6) script shell.
    2) Try running other scripts that previously ran fine to see if you are getting the error.
    3) Try running the script with the attractor rule deactivated (uncheck the rule's activation).

    When you have done 2) and 3) above, post or message me your results. If you are still having the problem, you can send me your .CAR and .PYP (PySwarm Project export file) and I will have a look.

    FD

  • FractalDimensiaFractalDimensia Posts: 0
    edited March 2014

    joeping said:
    View the animation on YOUTUBE.COM by clicking here.

    This is another experiment with the PySwarm plug in for Carrara 8.5 Pro and NLA Clips. This time the figures follow the terrain object using Sparrowhawke3d's Follow Terrain Plug In for Carrara ( http://www.sparrowhawke3d.com/Sparrowhawke3DLaboratory.html )

    I had not thought of using SparrowHawke's plug-in! And it looks like it works great. Very nicely done!

    I created a "Boid" group that was a figure with a looping walk cycle NLA clip with a duration of 2 minutes. Then I replicated that "Boid" 10 times and numbered the "Boid" groups. Then I used PySwarm to generate a movement script with 10 boids and 1 attractor object. Then I imported the PySwarm script into Carrara. Then I applied Sparrowhawke3d's Follow Terrain Plug In to make each "boid" drop to the surface of the terrain object. One walk NLA clip and the Pyswarm script control all movement, no key frame editing.

    I think its an improvement on my last experiments.
    What do you think?

    View the Stereoscopic 3D animation on YOUTUBE.COM by clicking here.

    This latest study is a great improvement. It is easy to see some of the uses for combining PySwarm with NLA clips and the terrain following plug-in!

    I did notice at time 1:01, one of the characters did the "walking sideways" thing. I am still struggling to understand what is causing this. Could you provide the values you have for the following parameters in the "Movement" tab:

    - Limit to 2D Movement (I assume this is unchecked)
    - Max Hdg Change
    - Max Vel Change
    - Attraction Strength

    Thanks for sharing. :)

    Post edited by FractalDimensia on
  • DUDUDUDU Posts: 1,945
    edited December 1969

    Hi FD,
    I did all that you said and I sent email to you last week with my .py, .PYP and .car files.
    All the ancient scripts are working but, not this one... is it because I want to start my own new scene and not from a existing file ?
    I know that I do not control yet well the zones of containement, but I will wait until you made the modifications (if possible) so that the detection of the .car object is done automatically and not with sizes to be introduced into the PIA.

    Thanks a lot !

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Hi FD,
    I did all that you said and I sent email to you last week with my .py, .PYP and .car files.
    All the ancient scripts are working but, not this one... is it because I want to start my own new scene and not from a existing file ?
    I know that I do not control yet well the zones of containement, but I will wait until you made the modifications (if possible) so that the detection of the .car object is done automatically and not with sizes to be introduced into the PIA.

    Thanks a lot !

    DUDU, I've been incredibly busy the past week, so no time to devote to this, so I guess I missed your email.

    Starting with a new scene should not be a problem, as that is mostly how I start mine.

    I found your mail and downloaded the content, and will look at it tonight. Be back by tomorrow with what I discover.

    FD

  • JoepingletonJoepingleton Posts: 746
    edited December 1969


    This latest study is a great improvement. It is easy to see some of the uses for combining PySwarm with NLA clips and the terrain following plug-in!

    I did notice at time 1:01, one of the characters did the "walking sideways" thing. I am still struggling to understand what is causing this. Could you provide the values you have for the following parameters in the "Movement" tab:

    - Limit to 2D Movement (I assume this is unchecked)
    - Max Hdg Change
    - Max Vel Change
    - Attraction Strength

    Thanks for sharing. :)

    Thanks for the help FractalDimensia,
    I did this test very quickly to test the concept (less than an hour from idea to final render) so my settings are definitely flawed.

    The settings I used are:
    - Limit to 2D Movement (I assume this is unchecked) = This is checked and set to 0 feet.
    - Max Hdg Change = 0
    - Max Vel Change = 0
    - Attraction Strength = 1

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    joeping said:

    Thanks for the help FractalDimensia,
    I did this test very quickly to test the concept (less than an hour from idea to final render) so my settings are definitely flawed.

    The settings I used are:
    - Limit to 2D Movement (I assume this is unchecked) = This is checked and set to 0 feet.
    - Max Hdg Change = 0
    - Max Vel Change = 0
    - Attraction Strength = 1

    I don't think your settings are flawed. They seem right. I don't see anything there that would cause the characters to walk sideways.

    I need to think more about this....

    Thanks.

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    A brief update on the new containment algorithm -

    Tonight, I got my first decent import using the new algorithm. Some tweaking yet to be done, but the basic algorithm seems to be functioning well (knock on wood...)

    ===> 20 BOIDs moving in a single safe zone for 90 seconds with ZERO encounters with the zone boundary.

    I'll post a demo video tomorrow after the render completes.

    The time to import a PySwarm script has taken a big hit, as each BOID must scan ahead for 3 seconds to identify possible collisions (for each keyframe). But once I have the new algorithm fully working, I'll look for ways to optimize it and shorten the import time.

  • JoepingletonJoepingleton Posts: 746
    edited March 2014

    Awesome news FD.

    The sideways walking problem stems from my having the parameters at .5 keyframes per second. I usually get rid of it with more keyframes per second, but this was just a quick test to see if they would follow the terrain.

    Post edited by Joepingleton on
  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    joeping said:
    Awesome news FD.

    The sideways walking problem stems from my having the parameters at .5 keyframes per second. I usually get rid of it with more keyframes per second, but this was just a quick test to see if they would follow the terrain.

    AHH! :)

    Yes, a higher keyframe rate will fix that. Nice work!

  • FractalDimensiaFractalDimensia Posts: 0
    edited March 2014

    I have uploaded the first demo of the new containment zone algorithm for PySwarm.

    The purpose of this demo is to briefly show the progress made in implementing the new algorithm for containing BOIDs where BOIDs look more realistic when encountering zones and preventing collisions with zone boundaries.

    I can now share some details about changes in the new approach:

    Buffers
    Zones no longer have a "zone strength" setting. Instead, each container now has its own buffer region, which establishes a region near the boundaries where BOIDs are considered safe, but where they still steer outside of. This is useful because PySwarm uses the BOIDs' hot points for determining the BOIDs' position. Since BOIDs have a size, without buffers, a BOID could be inside a safe zone (for example), yet have a part of it colliding with the boundary.

    Buffers are also useful to keep a safe distance near a boundary. For example, people don't (normally) walk brushing against a wall. They usually maintain a safe distance of 4-6 inches minimum. When they move closer than this amount, they correct this.

    You can define the buffer for each zone (in feet).

    Look-Ahead
    A major change in this algorithm is that each BOID scans ahead up to 3 seconds into the future, given its current position and velocity, to determine if it will potentially encounter a boundary. If so, it acts on this possibility.

    You will be able to define the look-ahead value (in seconds).

    Rule Priority
    With V0.6.1, BOIDs react differently if a collision is imminent. It does this by prioritizing the rules. If a BOID is about to collide with a zone boundary, collision takes priority over other rules, meaning it will ignore all other rules that may be active in order to ensure a collision does not happen.

    If a collision is possible (a collision is detected further into the future), BOIDs include collision avoidance AND separation rules.

    If a collision is likely (even further in the future), BOIDs also include the other rules at 50% strength.

    If no future collision is detected, the rules are applied as before.

    All of this is a complex way to create more realistic animation, since most real animals and people do the same thing (though implicitly).

    The Demo:
    This demo shows one safe containment zone with a 2 foot buffer at the edges. No collisions were made. The zone boundaries are defined by the brown surface, with the checkerboard region being inside the buffer region.

    http://www.youtube.com/edit?o=U&video_id=bEbuY1eYLDk

    Active Rules:
    - Cohesion
    - Separation (3 feet distance)
    - Alignment
    - Containment (1 zone)

    The light above is pointing directly down, so the BOID shadows give a sense of their location relative to the boundary and buffer.

    Also, you may note the BOIDs wobbling in the demo; this will be fixed in the next demo.

    Thanks for watching.
    FD

    Post edited by FractalDimensia on
  • JoepingletonJoepingleton Posts: 746
    edited December 1969

    very cool stuff

  • DUDUDUDU Posts: 1,945
    edited December 1969

    “wobbling” is interesting too!
    This plugin progresses well and becomes each time more sophisticated.
    In the video, it would not be possible to represent the verticals limits by a semi-transparent and reflective object to see better the reactions of the boids when they approach these limits ?

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    “wobbling” is interesting too!

    Agreed if that is the intent! :)

    This plugin progresses well and becomes each time more sophisticated.
    In the video, it would not be possible to represent the verticals limits by a semi-transparent and reflective object to see better the reactions of the boids when they approach these limits ?

    I was rushed in doing the rendering, so did not take the time to figure out how to do that.

    I'll come up with something better for the next demo, which should show more complex interaction.

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Quick update ... or lack thereof...

    For those awaiting the next version, sorry for the delay. Just got back from an unexpected week-long trip. But I'll be back at this starting either tonight or tomorrow.

    Still hope to have a new demo by Sunday night.

    FD

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Thought I'd give those interested in PySwarm an update on things since it has been a few weeks since last I posted anything on this tool's status.

    Several weeks ago, I purchased LightWave V11, and after spending some time with this modeling/rendering software, have decided to shift my focus away from Carrara. Many reasons why I chose to make this move; none really relevant for this thread. (If you've read my posts in other threads about my frustrations with Carrara, you probably already know 60% of the story.)

    For those who have been waiting for the next release of PySwarm, I *WILL* continue to work on this plug-in, just at a much slower pace as I work on coming up to speed on LW11. I know this does not match what I had originally planned or promised when I started PySwarm, but I also think PySwarm is far enough along that, when combined with other plug-ins such as ERM and terrain following, it does already offer some useful features for animators.

    Also, I should mention, since the PySwarm Python script was released as open source code, anyone willing to pick up the gauntlet is welcomed to do so. I put a lot of time into documenting the script, so it would not be too hard to learn for someone with programming experience.

    Of course, I will continue to monitor any news DAZ sees fit to share with the community on C9's status, and will reconsider using Carrara if they the company can make a significant stride forward in features and stability.

    Until my next post, happy swarming my friends! :)
    FD

  • DartanbeckDartanbeck Posts: 21,522
    edited December 1969

    Aw Man! Bummer. Well... and good news, too... I guess. I truly wish you the best in your future endeavors - you will be missed.

  • DUDUDUDU Posts: 1,945
    edited December 1969

    He FD, you will not drop to us now, I awaited your next version!:-/
    I understand well your reasoning and I would be often tempted to make like you when one sees the possibilities that some other softwares offer but, except some (important) points, Carrara is always in top.
    It loses some distance for sure, but there are compensations thanks to programmers like you who offer possibilities to us that others do not have.
    Stay in contact all the same and thank you!
    @+

  • JoepingletonJoepingleton Posts: 746
    edited December 1969

    Thanks for all your great work on PySwarm

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Aw Man! Bummer. Well... and good news, too... I guess. I truly wish you the best in your future endeavors - you will be missed.

    Thanks Dartan. Not goodbye, just "Aloha." I'll be checking the forum threads because I've gotten used to the great support here. I would not have gotten this far the past 2 years without the help of you and countless others. Of course I'll occasionally be running some kinda crazy study or test in Carrara that will want to share here! :)

    Best to you, my friend. And try to keep EP in line! ;)

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    He FD, you will not drop to us now, I awaited your next version!:-/
    I understand well your reasoning and I would be often tempted to make like you when one sees the possibilities that some other softwares offer but, except some (important) points, Carrara is always in top.
    It loses some distance for sure, but there are compensations thanks to programmers like you who offer possibilities to us that others do not have.
    Stay in contact all the same and thank you!
    @+

    I have no doubt DUDU that the Carrara community will create many great new plug-ins and ideas to keep you busy. I'm still hoping to have the new containment algorithm done sometime soon. :)

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    Aw Man! Bummer. Well... and good news, too... I guess. I truly wish you the best in your future endeavors - you will be missed.

    Thanks Dartan. Not goodbye, just "Aloha." I'll be checking the forum threads because I've gotten used to the great support here. I would not have gotten this far the past 2 years without the help of you and countless others. Of course I'll occasionally be running some kinda crazy study or test in Carrara that will want to share here! :)

    Best to you, my friend. And try to keep EP in line! ;)

    But who will keep Dart in line? ;-)

    Good luck in your LW endeavors.

  • DartanbeckDartanbeck Posts: 21,522
    edited December 1969

    Aw Man! Bummer. Well... and good news, too... I guess. I truly wish you the best in your future endeavors - you will be missed.

    Thanks Dartan. Not goodbye, just "Aloha." I'll be checking the forum threads because I've gotten used to the great support here. I would not have gotten this far the past 2 years without the help of you and countless others. Of course I'll occasionally be running some kinda crazy study or test in Carrara that will want to share here! :)

    Best to you, my friend. And try to keep EP in line! ;)

    But who will keep Dart in line? ;-)

    Good luck in your LW endeavors.Once the bliss of the gleeful new functions fade in, he'll be like: "Man, if I was in Carrara, I could..."
    He'll be back! :ahhh:

    Yeah... truly. Have fun in your new Wave. It has tempted me more times than I can count, too. But it was something in my mind... just like what DUDU said... as I would drool of this feature and that... I began to realize that I can actually do all of that stuff in Carrara ;)
    Go on... tell NewTec you need a refund before it's too late! :smirk:

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Aw Man! Bummer. Well... and good news, too... I guess. I truly wish you the best in your future endeavors - you will be missed.

    Thanks Dartan. Not goodbye, just "Aloha." I'll be checking the forum threads because I've gotten used to the great support here. I would not have gotten this far the past 2 years without the help of you and countless others. Of course I'll occasionally be running some kinda crazy study or test in Carrara that will want to share here! :)

    Best to you, my friend. And try to keep EP in line! ;)

    But who will keep Dart in line? ;-)

    Good luck in your LW endeavors.

    LOL.suggesting someone should keep an eye on Dart would be a waste of time!

    Thanks EP. :-)

  • DartanbeckDartanbeck Posts: 21,522
    edited December 1969

    Okay, for the record, everything I say from here on out is to be hear in Darth Vader's Voice!
    Just sayin' :coolmad:

  • FractalDimensiaFractalDimensia Posts: 0
    edited March 2014

    Aw Man! Bummer. Well... and good news, too... I guess. I truly wish you the best in your future endeavors - you will be missed.

    Thanks Dartan. Not goodbye, just "Aloha." I'll be checking the forum threads because I've gotten used to the great support here. I would not have gotten this far the past 2 years without the help of you and countless others. Of course I'll occasionally be running some kinda crazy study or test in Carrara that will want to share here! :)

    Best to you, my friend. And try to keep EP in line! ;)

    But who will keep Dart in line? ;-)

    Good luck in your LW endeavors.Once the bliss of the gleeful new functions fade in, he'll be like: "Man, if I was in Carrara, I could..."
    He'll be back! :ahhh:

    Yeah... truly. Have fun in your new Wave. It has tempted me more times than I can count, too. But it was something in my mind... just like what DUDU said... as I would drool of this feature and that... I began to realize that I can actually do all of that stuff in Carrara ;)
    Go on... tell NewTec you need a refund before it's too late! :smirk:

    Actually, I sat on the fence for a month until I discovered my Poser Pro came with a LW plug-in called "Fusion" that allows me to directly import Poser scenes into LW. So nearly all my DAZ stuff ports over :cheese:

    If you've ever been tempted, now is a good time. LW is 33% off retail price through March!

    Just saying. :coolsmirk:

    Post edited by FractalDimensia on
  • DartanbeckDartanbeck Posts: 21,522
    edited December 1969

    Once it's ported over, can you then animated within without breaking conformed items, etc., use the morphs and such? That's a big part of my animation. Yes... I really have been on the fence. LightWave looks amazing, and beyond that, they seem (from the outside looking in) like a pretty cool company. Lot's of spirit and drive to push ever onwards.

  • GarstorGarstor Posts: 1,411
    edited December 1969

    Actually, I sat on the fence for a month until I discovered my Poser Pro came with a LW plug-in called "Fusion" that allows me to directly import Poser scenes into LW. So nearly all my DAZ stuff ports over :cheese:

    If you've ever been tempted, now is a good time. LW is 33% off retail price through March!

    Just saying. :coolsmirk:

    Wait a second...if I buy Poser Pro...I can move all my DAZ assets over to LightWave? For serious?!?!

    Does it preserve the bones and morphs in Victoria and Michael? I'm not keen on having to learn a new 3D product (I'm still think about ZBrush or 3D-Coat too); but given how disenfranchised I've become with DAZ as a company...

Sign In or Register to comment.