Digital Art Zone

 
   
3 of 22
3
PySwarm for PyCarrara (V0.6) Released 01/25/2013
Posted: 27 October 2013 05:17 PM   [ Ignore ]   [ # 31 ]
Active Member
Avatar
RankRank
Total Posts:  546
Joined  2011-07-03
Dartanbeck - 27 October 2013 02:19 PM

Well I just read through the pdf and find this to be a beautiful interface, as it were wink
This is excellent! Thank you! I still have to get PyCarrara, so there’s one more dl… but it says I also have to get Python. I imagine that’s just a search away, too.

Again, thanks for this!

I updated the first post in this thread with links to Python and PyCarrara that are guaranteed to work (assuming you get them installed correctly). That might make it easier.

 Signature 

The most complex object in mathematics, the Mandelbrot Set ... is so complex as to be uncontrollable by mankind and describable as ‘chaos’. — Benoit Mandelbrot

Profile
 
 
Posted: 27 October 2013 05:20 PM   [ Ignore ]   [ # 32 ]
Active Member
Avatar
RankRank
Total Posts:  546
Joined  2011-07-03

Update:

Earlier today, I released a version of PySwarm that fixes a defect PhilW discovered. You will find the latest links for the full (but ever so small) package of everything or just the PySwarm script itself.

 Signature 

The most complex object in mathematics, the Mandelbrot Set ... is so complex as to be uncontrollable by mankind and describable as ‘chaos’. — Benoit Mandelbrot

Profile
 
 
Posted: 27 October 2013 05:45 PM   [ Ignore ]   [ # 33 ]
Power Member
RankRankRank
Total Posts:  1222
Joined  2005-04-12

Great - thanks for doing this so quickly.

Profile
 
 
Posted: 27 October 2013 06:19 PM   [ Ignore ]   [ # 34 ]
Addict
Avatar
RankRankRankRank
Total Posts:  6469
Joined  2007-12-04

Yes… both of you… Thank you very much.
Say Fractal, when you’re talking about the walk cycle thing for the future… what do you mean. It will have a walk developer function? Would that work to have like a ‘catch and release’ thing that works on the feet as the hip moves forward, along the specified velocity? Never mind… I don’t need to know how… lol

Have you given thought about what you can do along with the power of PyCloid in addition to PySwarm? Just a thought in passing on that idea makes me sort of… quiver.

 Signature 

Dartanbeck @ Daz3d          Check out the Carrara Cafe          ►►►  Carrara Information Manual   ◄◄◄

Profile
 
 
Posted: 27 October 2013 07:57 PM   [ Ignore ]   [ # 35 ]
Active Member
Avatar
RankRank
Total Posts:  546
Joined  2011-07-03
Dartanbeck - 27 October 2013 06:19 PM

Yes… both of you… Thank you very much.
Say Fractal, when you’re talking about the walk cycle thing for the future… what do you mean. It will have a walk developer function? Would that work to have like a ‘catch and release’ thing that works on the feet as the hip moves forward, along the specified velocity? Never mind… I don’t need to know how… lol

Have you given thought about what you can do along with the power of PyCloid in addition to PySwarm? Just a thought in passing on that idea makes me sort of… quiver.

Dartan, all good thoughts and questions. Thanks!

At the moment, I am thinking of applying something like what Frederic demo’ed with PyCarrara here:
http://www.youtube.com/watch?v=nNr7y61VLy0

But I am thinking of a “walk” as really any cycling motion of the boids - swimming motion for fish, beating wings for birds, etc. And yes, that PySwarm would inject keyframes to drive the motion. The real question is how to create an interface that is relatively easy to use, but is capable of handling complex “walk” cycles. I recently acquired ERC, and am thinking of ways to integrate PySwarm walk animation with that plug-in. It may make PySwarm’s work easier, but would require having that plug-in. It might work for the first phase…. I’m always open for suggestions and thoughts on this topic.

I should mention that my initial testing seems to indicate that embedding lots of keyframes to an animation does not consume a lot of memory (which is a bit of surprise since some aspects of Carrara does not seem to be memory efficient). So injecting repetitive keyframes is an option to pursue (at least for now and address memory problems if they arise later).

I have watched the PyCloid animation sequences, but have not had a chance to dig into it yet. I suspect (at first blush) that it has at least the potential of PyCarrara.

Sorry, just a dump of thoughts at this time. I’m still on a major learning curve with Carrara, PyCarrara, and Python. smile

 Signature 

The most complex object in mathematics, the Mandelbrot Set ... is so complex as to be uncontrollable by mankind and describable as ‘chaos’. — Benoit Mandelbrot

Profile
 
 
Posted: 27 October 2013 10:43 PM   [ Ignore ]   [ # 36 ]
Addict
Avatar
RankRankRankRank
Total Posts:  6469
Joined  2007-12-04

Not at all… please… dump those thoughts. Saying stuff out loud always helps.

First of all… yeah. I like what PyCarrara (and Frederick) did with that walk cycle. That’s beautiful.
Next, for the power of being able to drive a walk cycle, how about the interface being nothing more than an explanation of what parameters to look for, like the excel - like format in the current manual. Just tell us where to look and we take it from there. Your manual makes this script really easy to use, I think. Too bust to try it atm.
Next, Leave memory consumption up to us as well. I’m glad that you’re taking that into consideration, so that you have the ability to exclaim: “Don’t crank this too high or…” sort of thing. But when we start talking about animating masses, we should expect to use caution or else!

Here are some thoughts on that front:
Animations are laid out by PySwarm by creating Keyframes.
Carrara has the ability to convert all or some keyframes into NLA clips.
NLA Clips can have all manner of things happen to them.
Using the combination of PySwarm and Carrara’s NLA features gives us a good method of “saving” our PySwarm results for later use. The PySwarm setup already does all of the work to get the animation to take place. Imagine how reusable just a few objects worth of BOIDs can be to create a city full of people or a battlefield full of fighters! I’ll often take a longer animation clip and have different people use different parts of the same clip over shorter render times to be stitched later. Alternatively, we could use a bunch of people and control them all with PySwarm for shorter periods of time. But if memory is less of an issue, we could PySwarm longer animations, and just use several cameras to film shorter periods along the same scene. This make for some really efficient Batch Queue rendering. I normally have no less than four filming cameras on busy scenes set up to catch different points of view. That gives me at least four batch renders off the same scene file - which gives me more choice during the mastering stage.

Oh, geeze… I’m babbling again. I just did that in another thread - and said I was going to bed… I better do that!

 Signature 

Dartanbeck @ Daz3d          Check out the Carrara Cafe          ►►►  Carrara Information Manual   ◄◄◄

Profile
 
 
Posted: 28 October 2013 02:52 AM   [ Ignore ]   [ # 37 ]
Member
Avatar
Rank
Total Posts:  248
Joined  2009-04-06

I’ve been spending a lot of time and thoughts on how to inject a walk cycle.
My conclusions is that it’s better done on two stages. First, move the character (it’s what PySwarm does), and then apply the walk cycles when you know speed and heading.
If you have poser and Fenric exporter (and a lot of time for a crowd), you could even use poser walk room grin.

I’ve tried algorithmic walking See Boulic works and the mathematica demo, but it was not so easy to implement variations that looked natural enough and, furthermore, it was limited to human walking.
Right now, I’m heading on a BVH retargeter (I have a demo working) which allow to extract walk cycles quite efficiently. I was planning to mix it with some of Boulic works to add a realistic variation in speed.

For birds, it’s somehow easier (mainly, I think, because most of the people won’t notice discrepancies), so it may be a good start.

FractalDimensia - 27 October 2013 07:57 PM
Dartanbeck - 27 October 2013 06:19 PM

Yes… both of you… Thank you very much.
Say Fractal, when you’re talking about the walk cycle thing for the future… what do you mean. It will have a walk developer function? Would that work to have like a ‘catch and release’ thing that works on the feet as the hip moves forward, along the specified velocity? Never mind… I don’t need to know how… lol

Have you given thought about what you can do along with the power of PyCloid in addition to PySwarm? Just a thought in passing on that idea makes me sort of… quiver.

Dartan, all good thoughts and questions. Thanks!

At the moment, I am thinking of applying something like what Frederic demo’ed with PyCarrara here:
http://www.youtube.com/watch?v=nNr7y61VLy0

But I am thinking of a “walk” as really any cycling motion of the boids - swimming motion for fish, beating wings for birds, etc. And yes, that PySwarm would inject keyframes to drive the motion. The real question is how to create an interface that is relatively easy to use, but is capable of handling complex “walk” cycles. I recently acquired ERC, and am thinking of ways to integrate PySwarm walk animation with that plug-in. It may make PySwarm’s work easier, but would require having that plug-in. It might work for the first phase…. I’m always open for suggestions and thoughts on this topic.

I should mention that my initial testing seems to indicate that embedding lots of keyframes to an animation does not consume a lot of memory (which is a bit of surprise since some aspects of Carrara does not seem to be memory efficient). So injecting repetitive keyframes is an option to pursue (at least for now and address memory problems if they arise later).

I have watched the PyCloid animation sequences, but have not had a chance to dig into it yet. I suspect (at first blush) that it has at least the potential of PyCarrara.

Sorry, just a dump of thoughts at this time. I’m still on a major learning curve with Carrara, PyCarrara, and Python. smile

Profile
 
 
Posted: 28 October 2013 05:48 AM   [ Ignore ]   [ # 38 ]
Active Member
Avatar
RankRank
Total Posts:  546
Joined  2011-07-03
Dartanbeck - 27 October 2013 10:43 PM

Not at all… please… dump those thoughts. Saying stuff out loud always helps.

First of all… yeah. I like what PyCarrara (and Frederick) did with that walk cycle. That’s beautiful.
Next, for the power of being able to drive a walk cycle, how about the interface being nothing more than an explanation of what parameters to look for, like the excel - like format in the current manual. Just tell us where to look and we take it from there. Your manual makes this script really easy to use, I think. Too bust to try it atm.
Next, Leave memory consumption up to us as well. I’m glad that you’re taking that into consideration, so that you have the ability to exclaim: “Don’t crank this too high or…” sort of thing. But when we start talking about animating masses, we should expect to use caution or else!

Thanks, Dartan, for the feedback. Maybe I should have said, “I’ll keep my eye on memory consumption as I develop ...” The main reason being that as consumption goes up, broad usability goes down. Ultimately, at the end of the day, PySwarm works through PyCarrara, which injects keyframes. That is what I (currently) have to work with. Maybe PySwarm (and other spawned scripts) will drive a resurrection of PyCarrara, with changes based on specific needs.

As part of this, I want to go back and revisit ScifiFunk’s “low res people” tutorials. I still think PySwarm dovetails quite well with what Steve was doing. Hopefully more on that soon….

Here are some thoughts on that front:
Animations are laid out by PySwarm by creating Keyframes.
Carrara has the ability to convert all or some keyframes into NLA clips.
NLA Clips can have all manner of things happen to them.
Using the combination of PySwarm and Carrara’s NLA features gives us a good method of “saving” our PySwarm results for later use. The PySwarm setup already does all of the work to get the animation to take place. Imagine how reusable just a few objects worth of BOIDs can be to create a city full of people or a battlefield full of fighters! I’ll often take a longer animation clip and have different people use different parts of the same clip over shorter render times to be stitched later. Alternatively, we could use a bunch of people and control them all with PySwarm for shorter periods of time. But if memory is less of an issue, we could PySwarm longer animations, and just use several cameras to film shorter periods along the same scene. This make for some really efficient Batch Queue rendering. I normally have no less than four filming cameras on busy scenes set up to catch different points of view. That gives me at least four batch renders off the same scene file - which gives me more choice during the mastering stage.

Oh, geeze… I’m babbling again. I just did that in another thread - and said I was going to bed… I better do that!

All good thoughts, but NLA clips are currently at the boundary of my Carrara knowledge. I’ve not pursued much in that area because until the past month, I’ve not done much in animations. I’ll be looking to you and other experts on this to offer guidance and help build a script that works best. (This might be one of those areas to enhance PyCarrara - manipulating (creating, inserting, moving, etc.) NLA clips.)

All of this is still a few weeks down the road, but I can sense you and others are building a vision of where this might go. That is awesome and I’ll look to you all to drive me in focusing on this. (I get easily distracted, so I need an occasional pep-talk! smile )

For now, I am hoping to have V0.4 ready for release at the end of this week (to coincide with Halloween ... Hmmmm….). I may hold back on inserting any “walk cycle” animation until the dust settles on V0.4. Then V0.5 would be specifically targeted at how to animate the objects (not just move them).

Okay, now, it’s time to get my nose down to the grindstone and run some more animation tests….

 Signature 

The most complex object in mathematics, the Mandelbrot Set ... is so complex as to be uncontrollable by mankind and describable as ‘chaos’. — Benoit Mandelbrot

Profile
 
 
Posted: 28 October 2013 06:03 AM   [ Ignore ]   [ # 39 ]
Active Member
Avatar
RankRank
Total Posts:  546
Joined  2011-07-03
Philemo - 28 October 2013 02:52 AM

I’ve been spending a lot of time and thoughts on how to inject a walk cycle.
My conclusions is that it’s better done on two stages. First, move the character (it’s what PySwarm does), and then apply the walk cycles when you know speed and heading.
If you have poser and Fenric exporter (and a lot of time for a crowd), you could even use poser walk room grin.

I’ve tried algorithmic walking See Boulic works and the mathematica demo, but it was not so easy to implement variations that looked natural enough and, furthermore, it was limited to human walking.
Right now, I’m heading on a BVH retargeter (I have a demo working) which allow to extract walk cycles quite efficiently. I was planning to mix it with some of Boulic works to add a realistic variation in speed.

For birds, it’s somehow easier (mainly, I think, because most of the people won’t notice discrepancies), so it may be a good start.

I like the idea of retargeting BVH files, and am looking forward to seeing what you’ve put together! A Python module that reads BVH files might be an awesome addition to PySwarm. wink

I am definitely looking forward to shifting into exploring the various options to animate “boids.” This is really exciting! Thank you! smile

 Signature 

The most complex object in mathematics, the Mandelbrot Set ... is so complex as to be uncontrollable by mankind and describable as ‘chaos’. — Benoit Mandelbrot

Profile
 
 
Posted: 28 October 2013 07:41 AM   [ Ignore ]   [ # 40 ]
Addict
Avatar
RankRankRankRank
Total Posts:  6469
Joined  2007-12-04

Oh, right.

You - don’t worry at all about NLA. PySwarm creating Keyframes is absolutely it. Perfect.

End User - may use NLA to remove animation data from the timeline to run another script - is what I was getting at - somewhat.

What I was meaning is that, with Carrara’s NLA features, individuals can really be recycled in other areas of the scene - especially in the background - to add even more motion to the scene - making PySwarm an ideal approach the way it already works.

This is some excellent stuff.

 Signature 

Dartanbeck @ Daz3d          Check out the Carrara Cafe          ►►►  Carrara Information Manual   ◄◄◄

Profile
 
 
Posted: 28 October 2013 08:57 AM   [ Ignore ]   [ # 41 ]
Active Member
Avatar
RankRank
Total Posts:  546
Joined  2011-07-03
Dartanbeck - 28 October 2013 07:41 AM

Oh, right.

You - don’t worry at all about NLA. PySwarm creating Keyframes is absolutely it. Perfect.

End User - may use NLA to remove animation data from the timeline to run another script - is what I was getting at - somewhat.

What I was meaning is that, with Carrara’s NLA features, individuals can really be recycled in other areas of the scene - especially in the background - to add even more motion to the scene - making PySwarm an ideal approach the way it already works.

This is some excellent stuff.

LOL! Many innocent blunders in history have been recorded as “excellent stuff.” wink

I am not sure I understand what you’re getting at.

One interpretation - You can create multiple “groups” in a single scene. You just have to make sure they are named differently, so PySwarm doesn’t confuse them. To complete an animation sequence, you would import multiple PySwarm scripts - one for each group. The script doesn’t really care what else is going on in the scene. A few simple examples of this: two groups of fighter aircraft in a dogfight; or a flock of birds getting flushed from a field where a group of hunters and their dogs are walking (that’s 3 different groups).

Of course, the downside of this is that (yet) PySwarm doesn’t allow different groups to interact while generating the keyframes. I do have a “Predator-Prey” rule I will work on later where a single script will manipulate two separate groups. That is the first step in adding greater integrated animation.

An afterthought: The above statement is really only HALF true. You can create some limited interaction between groups by using the ATTRACTOR rule. This is how it would work - First, run PySwarm on one of the groups. Then, when you run the PySwarm for the second group, you can select either the “Camera_Focus” object in the first group (which is the center of mass for that group) OR one of the individuals in the first group as the Attractor object. This would work, for example, to animate dogs flushing quail from brush. The first group would be the quail, and then have the dogs (as a group) be attracted to the center point of the quail. Some tweaking would be needed, but I hope you get the idea….

Another interpretation - After running the PySwarm script, you can manually change any of the keyframes inserted - in essence rescripting the behavior. Adding NLAs is one thing you can do. Also, since PySwarm doesn’t insert keyframes for all aspects of an object (i.e., right now, it only does (x,y,z) translations, and later, rotations), you have all of the other animate-able aspects to work with. And PySwarm won’t mess with what you do there, so only translation keyframes get erased if you rerun the PySwarm script.

Are either of these on point? I want to make sure I understand as this can influence my priority of work.

 Signature 

The most complex object in mathematics, the Mandelbrot Set ... is so complex as to be uncontrollable by mankind and describable as ‘chaos’. — Benoit Mandelbrot

Profile
 
 
Posted: 28 October 2013 09:12 AM   [ Ignore ]   [ # 42 ]
Addict
Avatar
RankRankRankRank
Total Posts:  6469
Joined  2007-12-04
FractalDimensia - 28 October 2013 08:57 AM

Are either of these on point? I want to make sure I understand as this can influence my priority of work.

Actually they kind of ride near and around the point. One day I’ll learn how to be more effective in communicating!

What I’m talking about isn’t adding anything to the script beyond what you already have in mind. You just keep on a workin’, where I said nothing at all! lol

So then I come along, as an end user. I open the script and set my parameters. Bam! PySwarm sets all of these wonderful keyframes. They were a product of my preparation as the end user. I am being less thrifty that some - as far as resources go - so I have a huge number of BOIDs involved. Well that gives me a lot of keys! I also set it to run for forty seconds, but I only plan to render three or four seconds at a time. Now I’m getting ahead of myself…

Okay, so I ran the script. I already had each individual set up to have it’s own NLA track. So I can save all of the script generated keys into an NLA clip. Upon doing so, by default, all of my keys get deleted.
So I save my NLA Clips to my browser. One for each of my BOIDs that I had in the scene. Now I can use this motion on anything I want! So if I use the script to make BOIDs busily moving through a four way intersection. Some going straight, though avoiding other passers by, some rounding to the left and others to the right. I can use that single scene (with the keyframes intact) for multitudes of shots. But I can also save the NLA Clips to reuse the motions individually as well - as an end user sort of thing.

Basically - I was thinking out loud of some amazing possibilities that I will try with this script. And I do tend to babble.
Sort of like my mentioning using this along with PyCloid. Not asking for any new features… just daydreaming aloud! wink

 Signature 

Dartanbeck @ Daz3d          Check out the Carrara Cafe          ►►►  Carrara Information Manual   ◄◄◄

Profile
 
 
Posted: 28 October 2013 09:28 AM   [ Ignore ]   [ # 43 ]
Active Member
Avatar
RankRank
Total Posts:  546
Joined  2011-07-03
Dartanbeck - 28 October 2013 09:12 AM
FractalDimensia - 28 October 2013 08:57 AM

Are either of these on point? I want to make sure I understand as this can influence my priority of work.

Actually they kind of ride near and around the point. One day I’ll learn how to be more effective in communicating!

What I’m talking about isn’t adding anything to the script beyond what you already have in mind. You just keep on a workin’, where I said nothing at all! lol

So then I come along, as an end user. I open the script and set my parameters. Bam! PySwarm sets all of these wonderful keyframes. They were a product of my preparation as the end user. I am being less thrifty that some - as far as resources go - so I have a huge number of BOIDs involved. Well that gives me a lot of keys! I also set it to run for forty seconds, but I only plan to render three or four seconds at a time. Now I’m getting ahead of myself…

Okay, so I ran the script. I already had each individual set up to have it’s own NLA track. So I can save all of the script generated keys into an NLA clip. Upon doing so, by default, all of my keys get deleted.
So I save my NLA Clips to my browser. One for each of my BOIDs that I had in the scene. Now I can use this motion on anything I want! So if I use the script to make BOIDs busily moving through a four way intersection. Some going straight, though avoiding other passers by, some rounding to the left and others to the right. I can use that single scene (with the keyframes intact) for multitudes of shots. But I can also save the NLA Clips to reuse the motions individually as well - as an end user sort of thing.

Basically - I was thinking out loud of some amazing possibilities that I will try with this script. And I do tend to babble.
Sort of like my mentioning using this along with PyCloid. Not asking for any new features… just daydreaming aloud! wink

Okay, got it! I understand. I think you leaped a mile ahead of my horizon for PySwarm! The farthest I’d gone down that stream of thought was in using simple boid objects (like the ones in my test scene) to work out the knots for how it would play out in a real scene. And when all kinks and problems were tweaked out, then simply rerun the resulting script on the REAL scene with my more complex objects. You’ve taken that idea further. Thanks for sharing!

And your thoughts of PySwarm’s potential application does help, so no worries about stream of consciousness!

 Signature 

The most complex object in mathematics, the Mandelbrot Set ... is so complex as to be uncontrollable by mankind and describable as ‘chaos’. — Benoit Mandelbrot

Profile
 
 
Posted: 28 October 2013 09:41 AM   [ Ignore ]   [ # 44 ]
Addict
Avatar
RankRankRankRank
Total Posts:  6469
Joined  2007-12-04

Well it’s just that I like to save animations if I think that they’re cool - and that they’re reusable. I get a feeling that this script has the potential to create many, many reusable animations!
PyCloid can add even more attraction/repulsion to these animations using particles! I think PySwarm is going to be really cool - and I look forward to seeing it in action. PyCloid is another plugin I have from Frederick Ribble that I need to get my head around to using. So just the thought of both together sounds like a lot of power… and fun!

 Signature 

Dartanbeck @ Daz3d          Check out the Carrara Cafe          ►►►  Carrara Information Manual   ◄◄◄

Profile
 
 
Posted: 28 October 2013 02:17 PM   [ Ignore ]   [ # 45 ]
Power Member
RankRankRank
Total Posts:  1222
Joined  2005-04-12

The way I can envisage using it is as follows. Develop a walk cycle / flapping cycle etc for your actor and save that as an NLA clip.  Loop the clip so that you have an object (just one at this stage) walking / flying on the spot.  Duplicate that object and the rename each instance using the suggested number scheme that PySwarm uses, and at this stage you can also stagger the NLA loops so that they are at different phases and not walking / flapping in sync (unless that is what you want, eg. for a marching band?).

Now apply the PySwarm script to produce the movement that you need, this should not interfere with the NLA clips which are producing the character articulation. You may need to adjust the maximum speed for walks so that this matches (more or less) the step size in the NLA clip.  You should now have a group of people / flock of birds etc, all articulated and all moving according to the rules that you have set.

Particularly for walks, this would not stand up to close scrutiny of the feet, but for many purposes this may not be an issue anyway.

I hope this gives food for thought.

Profile
 
 
   
3 of 22
3