Just purchased the volume shaders and I can say with much glee that they make particles in XSI 200% more fun and flexible! Iam really excited about using these volumes!
Had a question about the script found in the example scene "PT gradient dust occlusion"
Basically, what does this script do? It seems to dictate particle life based particle rotation but not sure as I am not very experienced in scripting. Hoping for someone to break down/explain the code-if anyone has time it would help very much. (particle event script)
-James.
set PT_vel =inParticle.velocity
set PT_rot =inParticle.rotation
PT_vel.NormalizeInPlace
set tmpVect1 = XSIMath.CreateVector3
set tmpVect2 = XSIMath.CreateVector3
set polyNormal = XSIMath.CreateVector3
set verticalVect = XSIMath.CreateVector3
set polyMatrix = XSIMath.CreateMatrix3
verticalVect.set PT_vel.x, PT_vel.y ,PT_vel.z
polyNormal.set 0,1,0
tmpVect1.cross polyNormal,verticalVect
tmpVect2.cross tmpVect1,polyNormal
tmpVect1.normalizeInPlace
tmpVect2.normalizeInPlace
polyNormal.normalizeInPlace
polyMatrix.set tmpVect1.x, tmpVect1.y, tmpVect1.z,_
polyNormal.x, polyNormal.y, polyNormal.z,_
tmpVect2.x, tmpVect2.y, tmpVect2.z
set rot =XSIMath.CreateRotation
rot.SetFromMatrix3 polyMatrix
rot.GetXYZAngles PT_rot
inParticle.rotation=PT_rot |