View Full Version : Particle help? (Instanced Geometry)
crummer32 03-06-2007, 09:26 PM My goal is to get an antibody (basically a Y) to be emitted from an emitter as instanced geometry, be created at a random angle and have a random rotation as they fly. These antibodies would eventually attach to a moving surface with a pre-determined arm of the Y, and stick to it as this surface spins in space.
I've tried a few different things but none of them have worked.
Please please please, any help on this would be amazing. Thank you!
|
|
As you said all you need is goal. You need to add your rotating object to be goal to your particles. Then you can add ramp for goal value and control how fast the get there.
For rotation during flight, there is mel script to do this, with explanation, find it on maya viki:
http://www.tokeru.com/twiki/bin/view/Main/MayaParticles
Let me know how you got on...
Als
crummer32
03-07-2007, 09:45 PM
Hey, thanks for responding. Will setting a goal let me make the particles all land in a certain orientation? I need all of them to hit with one specific arm of their geometry.
emperorchuck
03-07-2007, 10:50 PM
Try looking at the script in the Random Particle Rotation section of the Maya wiki, here:
http://www.tokeru.com/twiki/bin/view/Main/MayaParticles
Then, if you're using per-particle goals, you can modify the script to blend between the random per-particle rotation and specific values (to line up the arm with the surface of your goal), with the blend dependant on how strong the goal is for each particle.
example:
if (particleShape1.axis == 0) {
blendedXOrientation = (( 1 - goalWeight ) * particleShape1.rotMaxRand ) + ( goalWeight * desiredFinalXOrientation );
particleShape1.rot = particleShape1.rot + << blendedXOrientation, 0, 0 >>;
}
I'm not an expert on this, but something along those lines should get the effect you want. Of course, you could always avoid blending by reversing your animation: Use the random particle rotation script, but instead of the random starting rotation ( particleShape1.rot = <<rand(360),rand(360),rand(360)>>; ), replace those rand() calls with values. Set what would have been your emitter as the goal. Then, your antibodies will appear on your target surface with the initial orientation you specify, then go off randomly until effected by their goal. Reverse the sequence after rendering, and you're done. Only drawback is they'll pop into existance unless you emit them all in the first frame, and then you'll have to randomize when they start moving off, or else it'll look like they all attached at once...
Hope that helps!
CGTalk Moderation
03-07-2007, 10:50 PM
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-2012, Jelsoft Enterprises Ltd.