|03 March 2007||#1|
3D Animator - Post Production
Join Date: May 2004
Field orientation "driven" by (animation)path?
A quick question about fields. Say I have a (XZ)grid emitting a particle stream (Y), and this grid has animation on it moving it through (XZ) space. I want a vortex on these particles, but have the orientation of the "controling" vortex axis (X) be "linked to the (Y) orientation of the animated grid. Think of a airplane wingtip condensation trail.
Or said otherwise, can the axis of the vortex influence be other than world, and be linked to something that has (path) animation??
I tried several things but it seems with the "basic" setups it seems stuck to world axis. Or is this something that needs a MEL solution??
|03 March 2007||#2|
Lord of the postsportfolio
Ghost VFX, Cph
Join Date: Sep 2002
You can either use a Volume Axis field, which respects local transformation (and is also easier to visualize i.m.o.).
Or you can do the following: In hypershade, graph the vortex field and create a vectorProduct node. Set the vector product's operation to Vector Matrix Product, set input1 to (1.0, 0.0, 0.0) and turn on Normalize. Connect the vortex field's worldMatrix attribute to the vectorProduct's matrix attribute and connect back from the vectorProduct's output attribute to the vortexField's axis attribute. Now you can animate the vortexField any way you want and in any hierarchy and have the axis point in its local x-direction (in world space). If you want it to point in the y- or z-direction, just set input1 to (0.0, 1.0, 0.0) or (0.0, 0.0, 1.0) respectively.
This is quite a useful trick for converting a vector from any space into world space. If instead you'd want to convert a direction from world space to local space, just connect the worldInverseMatrix attribute of the dag-node to the matrix attribute of the vectorProduct. But that wouldn't be very useful in this case.
I think the reason why the vortexField's axis attribute is always in world space is because it can be controlled per particle if particles are the source of the field which is pretty nice i.m.o.
|Thread Closed share thread|