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

1235712

Comments

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 2013

    Wow!
    Okay, PIA is looking like a totally cool addition! As much as it does not bother me in the slightest to edit your wonderful scripting by hand, per your instructions, I'd imaging that, by having PIA, you can actually eliminate a lot of the need for writing them, especially as the code gets more difficult to navigate. Being one whom enjoyed messing with scripts in NWN, it never bothers me to dig around where I need to - especially with instructions! :)

    Oh my, but look at these new features! Fractal!
    You Freaking R O C K ! ! !

    Once again, thank you for the kind words, Dartan!

    Your "imagining" is spot on. There are a number of enhancements down the road that would make editing a Python script challenging. As I started mapping out the multi-container idea, I realized trying to put it all in an editable script would be difficult. Also, Python is unforgiving if you accidentally change or delete something in a text editor. Just too many ugly scenarios to continue using that approach. PIA was the logical (and safer) next step.

    Of course, since PIA builds a copy of the PySwarm script, you can STILL go in and diddle with it after it is built! ;)

    And the really program savvy people can edit the "script shell," adding even more functionality that gets replicated over into all the PySwarm scripts.

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

    And the really program savvy people can edit the "script shell," adding even more functionality that gets replicated over into all the PySwarm scripts.
    Like anyone will need to! You're really turning this into one amazing thing! Bravo, man... Bravo!
    Still working really hard on my thing, so I still haven't even had a chance to run this yet. But I will. And it looks like, by the time I do, I'll have one amazing product to mess around with. Multiple containers, localization, and distance effects sounds so exciting... well you remember where my mind was going with all of this... a bit off the beaten path compared to your original vision... but that's what's so cool about Carrara - each of us have a different dream - and it helps all of us fulfill those dreams! Man! Multiple containers! I was wondering, before, how well it would work to use PySwarm to make key frames for these things, then save the animation off. Earlier I was mentioning the use of NLA - but it could also be as simple as just saving off the file. Then running another script, repeat, repeat... then combine these things together. This multiple container thing, it feels like, anyways, totally eliminates the need to do that. Just set up the containers to do all that - which will ultimately create a much more natural set of animations.

    Anyways, sorry for going on about this... I was just excitedly dreaming aloud again so, no need to respond to any of that - even if I'm off on my thinking - as I'll be studying the material again deeply when I run this. I have many ideas for how I want to use this, and many more will surely arise once I begin using it.

    I just really want to thank you for putting in so much heart and soul into this. Frederic Ribble, too... outstanding selflessness creating these amazing things for the community... I just cannot thank either of you enough for all of this! So instead, I'll just make a really big one:

    T H A N K Y O U ! ! !

  • DUDUDUDU Posts: 1,945
    edited December 1969

    You are the spokespersons of all the animators, Dart.
    We will never thank enough FD which builds us an excellent product accessible to all and which will make Carrara even more exceptional!
    Thank you !

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 2013

    And the really program savvy people can edit the "script shell," adding even more functionality that gets replicated over into all the PySwarm scripts.
    Like anyone will need to! You're really turning this into one amazing thing! Bravo, man... Bravo!
    Still working really hard on my thing, so I still haven't even had a chance to run this yet. But I will. And it looks like, by the time I do, I'll have one amazing product to mess around with. Multiple containers, localization, and distance effects sounds so exciting... well you remember where my mind was going with all of this... a bit off the beaten path compared to your original vision... but that's what's so cool about Carrara - each of us have a different dream - and it helps all of us fulfill those dreams! Man! Multiple containers! I was wondering, before, how well it would work to use PySwarm to make key frames for these things, then save the animation off. Earlier I was mentioning the use of NLA - but it could also be as simple as just saving off the file. Then running another script, repeat, repeat... then combine these things together. This multiple container thing, it feels like, anyways, totally eliminates the need to do that. Just set up the containers to do all that - which will ultimately create a much more natural set of animations.

    Anyways, sorry for going on about this... I was just excitedly dreaming aloud again so, no need to respond to any of that - even if I'm off on my thinking - as I'll be studying the material again deeply when I run this. I have many ideas for how I want to use this, and many more will surely arise once I begin using it.

    I just really want to thank you for putting in so much heart and soul into this. Frederic Ribble, too... outstanding selflessness creating these amazing things for the community... I just cannot thank either of you enough for all of this! So instead, I'll just make a really big one:

    T H A N K Y O U ! ! !

    Dartan, I can't wait to see what you have planned, so no apologies needed for "going on"!

    For me, I can't imagine anything more satisfying than seeing someone taking what I have created and building on that to do something even more amazing. So I was glad to see DUDU taking the plunge and creating his shark animation. If not for Frederick Ribble and Craig Reynolds (who first created BOID animation), I would not have been able to build this tool. We really do each stand on the shoulders of giants. :)

    Just a few additional comments to add regarding PySwarm's capabilities. I really am not sure where or if I wrote about these, so I apologize in advance if I repeat myself.

    1) NLA, ERC, PyCloud, and other animation support will work in collaboration with PySwarm. I am testing NLA in my Apache helicopter scene and tested ERC briefly in my "shark tank" animation. I already have some ideas about how to integrate PySwarm with PyCloud effects, but that is farther downstream.

    2) I set up PySwarm so you can change up the parameter settings mid-stream in your animation. For example, suppose you want your BOIDs to behave one way for the first 2 minutes, but then (due to some scene event), they behave differently (like at first flocking together but then flying apart). You can do this by importing the PySwarm script for each animation segment, each with their own settings. In this example, to illustrate, you'd import a PySwarm script with start and end times set to 0.0 and 2.0 (seconds) respectively. Then with new settings, import the next script with times set to 2.0 and 4.0.

    3) You can manipulate multiple swarms/flocks in your scene by importing a PySwarm script on each group. Of course, currently, you cannot have these groups interact directly. Each group will animate independent of other groups. However, there is a work-around to this in some scenarios. Suppose you have a scene where a fighter aircraft is attempting to evade an enemy aircraft that locks on and launches a missile that strikes the first; the scene ending in a large explosion and the aircraft coming apart. You will be able to animate this in PySwarm V0.5 using the following sequence.
    a) Add a target helper and create a motion path that you want the first aircraft to take in the scene. Build in barrel rolls and climb-descend, maybe fly between mountains or into ravines, etc. Set the target helper to move at the speed you want the aircraft to fly (e.g., 1500 ft/sec).
    b) Position the first aircraft near the target helper, and create/import a PySwarm script, using the target helper as an attractor, and setting min/max speed to be that of the target helper along the motion path. (Other settings might include using MAXTURN rule.) You now have the first aircraft animation complete.
    c) Position the second (enemy) aircraft near the first. Use similar min/max speed and MAXTURN settings, but this time use the first aircraft as the attractor. When you import this PySwarm script, the second aircraft will follow the first.
    d) Use the scrubber to pick a time in the animation that the second aircraft launches a missile. Create yet another PySwarm script for the missile, again using the first aircraft as the attractor, set the start time to be the missile launch time in the animation, increase the max speed to something like 2500 ft/sec, and change other parameters as needed. Import that script. Check to see if/when the missile reaches the target. If it doesn't, go back and make more parameter adjustments and re-import the script until it happens.
    e) Add explosion and other special effects to the objects as desired.

    Note: V0.4 requires you have at least 2 BOIDs to work with. I will be removing this restriction in V0.5.

    Also, I have a new rule I will add later called "Predator-Prey" which will actually manipulate 2 different groups of BOIDs in the same script.

    Okay, now I'm going on about this. ;)

    Seriously am excited to see what you've got up your sleeve, Dartan! :)

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

    You are the spokespersons of all the animators, Dart.
    We will never thank enough FD which builds us an excellent product accessible to all and which will make Carrara even more exceptional!
    Thank you !

    I am glad to see this tool will be useful! I look forward to seeing more animations!

    I am also hoping that this will generate enough interest that someone will pick up the gauntlet to write a PyCarrara plug-in for Macs!! It is sorely needed! If someone were to do that, I would write a PIA version for the Mac. Then it truly would be accessible to everyone. :)

  • DUDUDUDU Posts: 1,945
    edited December 1969

    FD, I have 1 more question and 1 request…
    1- Is there a limitation concerning the number of boïds?
    I would plan to use them in a scene to replace particles, the boïds are easier to manage for some scenes (I know, it will be a large work to rename each boïd).
    2- In the evolution of Pyswarm, be there one day the possibility of not having to put Carrara in English with each time I want to use Pyswarm ? (that work fine for Pycarrara and Pycloïd).
    Thanks.

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    FD, I have 1 more question and 1 request…
    1- Is there a limitation concerning the number of boïds?
    I would plan to use them in a scene to replace particles, the boïds are easier to manage for some scenes (I know, it will be a large work to rename each boïd).
    2- In the evolution of Pyswarm, be there one day the possibility of not having to put Carrara in English with each time I want to use Pyswarm ? (that work fine for Pycarrara and Pycloïd).
    Thanks.

    Regarding your question, there is no programming limitation to the number of BOIDs you can have. And to be honest, I have not tested this yet, though, like many things regarding PySwarm, it is on my "To Do" list!

    I suspect the number is limited to your computer's memory. And while I have not tested it, I would think you would max out Carrara's limitation before you did PySwarm. I say that because (for now), each BOID has to be an object. I have no clue what happens when you get the count up to 500, 1000, or 10000. It would be interesting to see!

    There is one other effect to this if you don't run into the memory issue. It would take a long time to import your PySwarm script. Still, that is mostly a minor annoyance.

    Regarding your recommendation, you'll have to be more specific what you mean. Are you asking about the ability to enter non-English characters into the script? Remember that with V0.5, you will no longer need to work with the PySwarm script directly. Of course, for now, the PIA window interface is in English, but that is not too difficult to change. Also, I have very little experience coding/testing for multiple languages. Frederick's (who wrote PyCarrara and PyCloid) native language is not English, so I suspect he has done a lot of testing in that area.

  • DUDUDUDU Posts: 1,945
    edited December 1969

    FD, I have 1 more question and 1 request…
    1- Is there a limitation concerning the number of boïds?
    I would plan to use them in a scene to replace particles, the boïds are easier to manage for some scenes (I know, it will be a large work to rename each boïd).
    2- In the evolution of Pyswarm, be there one day the possibility of not having to put Carrara in English with each time I want to use Pyswarm ? (that work fine for Pycarrara and Pycloïd).
    Thanks.

    Regarding your question, there is no programming limitation to the number of BOIDs you can have. And to be honest, I have not tested this yet, though, like many things regarding PySwarm, it is on my "To Do" list!

    I suspect the number is limited to your computer's memory. And while I have not tested it, I would think you would max out Carrara's limitation before you did PySwarm. I say that because (for now), each BOID has to be an object. I have no clue what happens when you get the count up to 500, 1000, or 10000. It would be interesting to see!

    There is one other effect to this if you don't run into the memory issue. It would take a long time to import your PySwarm script. Still, that is mostly a minor annoyance.

    Regarding your recommendation, you'll have to be more specific what you mean. Are you asking about the ability to enter non-English characters into the script? Remember that with V0.5, you will no longer need to work with the PySwarm script directly. Of course, for now, the PIA window interface is in English, but that is not too difficult to change. Also, I have very little experience coding/testing for multiple languages. Frederick's (who wrote PyCarrara and PyCloid) native language is not English, so I suspect he has done a lot of testing in that area.

    There is no problem if I use non English characters (I did not test the Scandinavians yet…:-)).
    I do not know if you already looked in the preferences of Carrara with “General”, you has an option of language (I have English or French, I do not know if it is the same for all the versions).
    I work obviously in French but I have each time an error message during the loading of script.
    If I put Carrara in english language version, there is no problem…
    I looked in a script if there would be a possibility of changing something but I am far from being a specialist!

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 2013


    I work obviously in French but I have each time an error message during the loading of script.
    If I put Carrara in english language version, there is no problem…
    I looked in a script if there would be a possibility of changing something but I am far from being a specialist!

    Sorry to keep asking questions, but I want to make sure I understand before I look into possible solutions.

    So when you say "during the loading of script", you mean - When you have Carrara set in French language, and you import the PySwarm script, you get an error message? Can you tell me what the error message says? That might help.

    The PySwarm script file is a basic text file - a file containing a string of characters. There is nothing else in the file. It is possible Carrara expects some special character encoding when it is in French "mode" (e.g., an ISO format), and refuses to read the file unless Carrara is set to be in English.

    What is confusing is I assume you are able to edit the PySwarm script. It may also be that whatever word editor you are using is doing something to the file when you save your changes in the editor. Do you get the error message when you import the default (unedited) PySwarm script? Are you using "WordPad"? If not, what is the name of your word editor?

    I'll need to research this some when I get a chance. It is possible this is an easy fix once I understand the reason for the error message.

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

    I use the wordpad but there, I tried to load your scene only, after a lot of unsuccefull tests, the last thing to do was to put Carrara in english version and this time, all was OK...

    Look here: http://www.daz3d.com/forums/viewreply/473354/

  • DUDUDUDU Posts: 1,945
    edited December 1969

    Try to change your preferences and chooses French, after that, try to load a script...

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Try to change your preferences and chooses French, after that, try to load a script...

    I started C8.1, changed the language to French, closed and reopened C8.1, opened the "PySwarm V0.4.2 Test Scene" (from the latest release), and then imported PySwarm V0.4.2.py.

    It ran successfully without any errors.

    The plot thickens!! The game is afoot!!

    Maybe you can email me the script and .CAR files that cause the problem? I'll take a look at them.

  • DUDUDUDU Posts: 1,945
    edited December 2013

    It is not necessary to send the files to you, they are yours.
    If that functions for you in french, it is certainly Windows in French version which causes the problem.
    It is not a big problem, I will make with it…
    Thank you to have tested!

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

    ...or isn't the Python installer who put automatiquely something in french ?

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    I use the wordpad but there, I tried to load your scene only, after a lot of unsuccefull tests, the last thing to do was to put Carrara in english version and this time, all was OK...

    Look here: http://www.daz3d.com/forums/viewreply/473354/

    ...or isn't the Python installer who put automatiquely something in french ?

    Okay. I had a look at the error message you posted. Here is what I am thinking the problem is:

    It is possible the PyCarrara version in French has different naming for its internal functions. I cannot think of any other reason for the error "Parameter not found."

    If that is the problem, the easiest solution is to install the English version of PyCarrara (?).

    I will need to find and download PyCarrara in French to see if this is where the problem is.

  • DUDUDUDU Posts: 1,945
    edited December 1969

    It's may be strange but Pycarrara work fine when Carrara is in french version.

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Here is a link to the first full test of PySwarm V0.5 with all rules (except containment) turned on, with all rule strength settings set to their default value of 1.0, and applied to 100 BOID objects. The PySwarm script was built using PIA (PySwarm Interface App), which is now complete except for final testing.

    (Apologies for the shadowing effect. This will be fixed in the next test.)

    While the video demonstrates nothing extraordinarily new, it does show progress made on PIA and restructuring the PySwarm script, and that PySwarm works fine on up to 100 BOIDs.

    https://www.youtube.com/watch?v=D6afB3ujSy4

    The second round of tests will include multiple containments and examine various adjustments applied to 225 BOIDs, including the use of localization settings. I will also post some timing results for importing the script with large numbers of BOIDs.

    Happy Holidays!

  • DUDUDUDU Posts: 1,945
    edited December 1969

    Super!
    Do you think that a character moving could be a zone of exclusion in this version (restricted mode?) or does one have obligatorily to use simple objects?

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Super!
    Do you think that a character moving could be a zone of exclusion in this version (restricted mode?) or does one have obligatorily to use simple objects?

    Zones (or containers), both safe and restricted, are cube, cylinder, and sphere regions in your Carrara scene that do not move (currently).

    However, I do have a feature enhancement slated for V0.6 (in January) that will allow you to define a distance where Attraction has effect. When you set the Attractor Strength value to a negative number (like -1.0), this will create a repulsion effect, forcing BOIDs to stay outside the distance you set. This would be useful, for example, to simulate bugs that scatter and stay in the dark as a light, maybe carried by a person, moves through the scene. With a positive Attractor Strength setting, this could be used to simulate, for example, moths that fly to and get trapped by a light once they move within a certain distance away. There are many other scenarios where this will be useful.

    Would this work for what you are looking for?

  • DUDUDUDU Posts: 1,945
    edited December 1969

    Yes,I think so... I am in a hurry to test that!
    Thanks.

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    I was finally able to fit in enough time this past week (with children home for the week :) ) to finalize coding of the multiple containment zones.

    Here is a link to an extended (3 min, 20 sec) demo using 5 restricted zones (3 cubes/boxes, 1 cylinder, and 1 sphere) inside a safe box zone. The tan floor shows the boundary of the safe zone; the dark regions on the floor show where the restricted zones are. I limited BOID motion to 2D (x,y plane) in this demo to make it easier to see the effects.

    https://www.youtube.com/watch?v=RY6YKL0SKkc

    I still want to do more tweaking on BOID motion around restricted zones, but will likely save that for the next release (V0.6). There are a number of special situations I have yet to resolve. For example, if the side of a restricted zone is pressed against the side of a safe zone (restricted zone is inside the safe zone), BOIDs will sometimes squeeze through the crack, bouncing between the two sides. A solution for this (for now) is to extend the sides of restricted zones beyond the safe zone region.

    I still plan to release V0.5 in December, but I may be over-optimistic. I will post an update on this thread by next Sunday with my status. Stay tuned....

    Happy Holidays!
    FD

  • DUDUDUDU Posts: 1,945
    edited December 2013

    Super! I suppose that the containers (restricted zones) can be animated… And why not have any other shape?

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

    Super! I suppose that the containers can be animated… And why not have any other shape?

    I have a number of improvements scheduled for V0.6, including zone animation. V0.5 (the upcoming release) will not have this yet.

    I chose the 3 primitive shapes (box, cylinder, sphere) because they are the easiest to script. More complex shapes can be built from these basic ones.

    While I would like to allow for more complex zone shapes, it would require access to Carrara's internal mechanics, which does not yet exist with PyCarrara. :-S

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 2013

    This short video demos the use of cohesion (where BOIDs tend to move to the center of mass) and alignment (where BOIDs attempt to match speed and direction with others) with "Localization" active and set to a radius of 20 feet. With localization, each BOID is only affected by those BOIDs within 20 feet of it. The result is much more realistic animation for some situations where visibility is limited, or when BOIDs are only influenced by others nearby, such as some forms of birds and fish.

    https://www.youtube.com/watch?v=Yn6lwdGGy8Q

    Localization feature will be released with V0.5.

    PIA (PySwarm Interface App) is now complete. I am now in the final stages of testing the restructured PySwarm script and the new features.

    Post edited by FractalDimensia on
  • FractalDimensiaFractalDimensia Posts: 0
    edited December 2013

    I have released V0.5 for public use.

    Please see the revised first post in this thread for details.
    http://www.daz3d.com/forums/discussion/31190/

    Because this version includes a separate Windows app for setting the PySwarm parameters, you might find the 20 minute video I put together useful to help get you started installing and using the new layout.
    https://www.youtube.com/watch?v=H03OQR8Ne-E

    (This is the first video tutorial I've ever done, and was incredibly nervous, so I apologize. Hopefully, I'll get better at this. ;) )

    Please be sure to post your thoughts and suggestions, or if you encounter any problems with either PIA or the script.

    FD

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

    A slightly updated version of the V0.5 script shell is available. The new shell (V0.5.1) fixes a few bugs.

    If you have already installed the V0.5 package, you do NOT need to install the complete package again. You just need to download the latest shell.

    To get the entire latest package, follow the instructions here:
    http://pyswarm.wikia.com/wiki/Download_and_installing_PySwarm#Latest_Version_of_the_PySwarm_Package

    To get information on how to download and install the new shell, follow the instructions provided here:
    http://pyswarm.wikia.com/wiki/Download_and_installing_PySwarm#Latest_PySwarm_Script_Shell

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Looking Ahead
    Now that the script has been restructured and PIA developed, I plan to focus on a few more significant enhancements this month.

    First, I will be releasing one more minor version (V0.5.2), which implements a BOID "look ahead" algorithm provided by Philemo. You should notice a slight improvement in containment and separation. This is needed for a few of the changes in V0.6.

    Major Features Slated for V0.6
    1. Motion Cycles - Phase 1 - You will be able to define basic BOID motion (e.g., flapping wings, swimming) for BOIDs. PySwarm will insert keyframes to create the motion for each BOID. A number of new parameters will provide lots of flexibility (e.g., cycle rate) to control motion; thus the need to have PIA completed to assist in defining these parameters. This is Phase 1 because later phases will offer more complex motion cycles (e.g., humans walking).

    2. Containment Zone Objects - You will have the option to define zones based on objects in your Carrara scene. Objects can be defined as either safe or restricted zones. PySwarm will use the objects' position and size for computing containment, which means containment zones can be moved and resized during the animation and BOIDs will respond accordingly.

    Other Features Slated for V0.6
    3. Attractor Region - You will be able to define a radius around the attractor. BOIDs outside that radius will not be affected by the attractor. This will work with positive strength values (attraction) and negative (repulsion).

    4. Improved Containment Motion - Currently, BOIDs "ping" off zone boundaries; that is, they react to them when they bump into them. Most real-world animals (and most people!) react when they get close. I plan to make BOID motion near zone boundaries more realistic.

    5. Bank and Pitch Effects - You will be able to better control how BOIDs move during banking and pitching.

    Upcoming Feature
    6. Terrain Following - High on my priority list of improvements (and assume others' needs) is to script and test a technique that will allow BOIDs to follow (or be limited by) Carrara terrains. What you'll be able to do with this feature:
    - Define terrains as containment zones. BOIDs will then avoid these terrains (e.g., mountains, canyon walls). (I'm reminded of the early scene in Star Wars' Empire Strikes Back when the land speeders are flying over the icy terrain. This is the effect I am shooting for.)
    - Define terrains as the "ground" for BOIDs. With the Landed rule activated, BOIDs will then land on the terrain.
    - With Limit 2D Motion active, BOIDs can be set to maintain a certain height above (or below) the terrain. With this, for example, you'll be able to create BOIDs that walk on the terrain surface, or swim/float above it.

    Some of the changes described for V0.6 are needed for this feature to work properly, so they are the first priority. I'll post my progress on testing this feature as I get closer to completing V0.6.

  • 0oseven0oseven Posts: 626
    edited December 1969

    Upcoming Feature Terrain Following

    Wondering if " Carrara Ocean " would be recognised as a terraraine ?

  • FractalDimensiaFractalDimensia Posts: 0
    edited January 2014

    0oseven said:
    Upcoming Feature Terrain Following

    Wondering if " Carrara Ocean " would be recognised as a terraraine ?

    Apologies for the long answer, but I want to be clear so expectations on this matter are realistic.

    The best way to think of PySwarm in its current configuration is as a plug-in to a plug-in. This means PySwarm is limited to accessing only the information PyCarrara provides about a Carrara scene. To implement terrain following properly, PySwarm needs to be able to detect a surface's contours (that may change over time, such as an ocean). Then PySwarm would know precisely where to place the BOIDs. Carrara has this feature already built in - that is how it knows where to place replicated objects on a surface. Unfortunately, PyCarrara (V1.0) does not offer access to this information.

    There are two possible long-term solutions:
    1. Modify the PyCarrara plug-in to provide this information to PySwarm. I am looking into what would be required to do this, and will post something as soon as I have something definitive.
    2. Make PySwarm its own stand-alone Carrara plug-in. I still envision this as the long-term solution, but I'm holding out to see how much demand there is for such an extension.

    The work-around solution I have devised for this first iteration of the terrain following function will require creating a .BMP/.JPG height map from the terrain, which is simple to do from the Terrain Modelling room. PySwarm will then use this map to identify the "altitude" at any (x,y) coordinate by interpolating nearby points on the map.

    The limitations to this approach are mainly: (1) It works only with surfaces that you can create a height map for; or vice versa, a surface built from a height map. (2) Surfaces cannot change over time.

    So until one of these two solutions (stated above) occur, or someone comes up with an alternative that eliminates these limitations, the terrain following feature will likely remain limited to working with Carrara terrain (or similar) objects.

    Still, I believe this will be an incredible leap forward in PySwarm's capabilities. I hope others agree. :)

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

    The new (redesigned) PySwarm script and PIA seem to have been a good investment of my time. I am 3-4 times more productive enhancing PySwarm and have already made substantial progress on the next version.

    Here is a link to an early teaser animation of several new features that will be available with PySwarm V0.6.
    https://www.youtube.com/watch?v=NeFRCD8etmA

    This video demonstrates:
    1) Containment zone objects - The boundaries for the BOIDs in this animation were set by a primitive box object in the Carrara scene.

    2) Attractor Region - A region of space (set at 15 feet in this animation) was set for the attractor (silver sphere in the middle). BOIDs are only drawn towards the attractor when they fly into this space. Those outside the region are unaffected.

    3) Pitch and Bank Controls - Banking and pitching have been exaggerated with new motion controls. This is useful to control how BOIDs maneuver during pitch (up/down) and bank (left/right) motion.

    4) New PIA Structure - Some behind-the-scenes adjustments are being made to PIA to make PySwarm easier to learn and use.

    This video also shows:
    1) The effects of localization - You'll notice the BOIDs will band together in small groups as they move about, but will often leave their group and then later bond with others.

    2) Look Ahead coding - There's slightly smoother animation of BOIDs at containment edges and near others.

    The next teaser video will show several motion cycle animation sequences.

Sign In or Register to comment.