View Full Version : instancing question
02-14-2008, 07:06 PM
I'm not sure if Maya is capable of achieving this feat, but here goes. :D What I have is an animation of a flag that is baked out, because the machine I'm working on doesn't have an ncloth or cloth license, so i'm stuck with baked data. That being said, I want to take that flag model, instance it, and then offset the start keyframe for each instance at a random interval between frames 1 and 100. So just to re-iterate, I want to create a particle instance that will allow me to offset the baked animation for each instanced particle. Any takers?
02-14-2008, 10:59 PM
What you could do is create a looped animation on the flag (example: 1-100 frames). Then you'll want to do is bake out the geometry so that you have a different piece of geometry for each frame of animation. I think there is a script on highend3d that can automate this (uninstancer i think). So you'll have a total of 100 pieces of geometry.
You can then instance all those to your particles. Create some custom attributes on your particles to randomly set its start geometry. Then create a runtime expression that will cycle throught each piece of geometry. Basically what will be happening each frame is that your particle will be swaping geometry for then next one in sequence. There are definitely some limitations to this (no motion blur) but it could work
Another method would be to create a few flags and offset their animation and instance each of those to particles. The more flages you create, the more randomness youll have.
Hope this is helpful
02-15-2008, 05:44 PM
Thanks for the reply man, but unfortunately, none of those solutions are really an option for me, I need to have motion blur, and the one problem that i'm running into is that I can't get my multiple objects that i'm instancing to be applied randomly to a particle grid. I can make them random if they are born throughout the timeline no prob, but if I create a particle grid, or sketch particles onto a live surface, it only takes and instances the first object. :(
02-15-2008, 07:22 PM
Heres something you can try. Lets say you have 5 objects. You could create a custom attr on the particles say custIndex and create a runtime expression for it like: custIndex = rand (0,5);. Then in your instancer tab for index point it to your new attr. Then what you can do it step through your time line a few frames and your particles should get a random assignment of the instances. Then set initial state on the particles and delete the runtime expression.
02-16-2008, 01:52 AM
That worked man, thanks a ton! I'll dance at your wedding!
02-16-2008, 01:52 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.