PDA

View Full Version : [HELP] Get normal direction of speed?


mattjakob
01-21-2010, 03:32 PM
I have a series of particles moving along a spline using (amazing) Bobo's lesson.
Id like to have the particles move in an elliptical way along the spline (like they are not exactly on the spline but at a radius distance from it).

It's a bit tricky to compute it mathematically but since I was that with the Rotation:Speed Follow attribute the particles automatically rotate themselves along the spline I was wondering if it;s possible to access the automatically rotated particle axes so I can position the particle along one of them.

The problem is that the rotation operator happens after the script operator (which position and the sets the velocity of each particle to be along a spline). So I guess I would have to add another script operator after the rotation one and access the object space of the particle and translate it.

Any tips?

thanks

HornBerger
01-24-2010, 02:03 PM
i am not sure i understand the question completely and also do not know a script to do this but if this is what you are looking for :-
http://img651.imageshack.us/img651/728/spirofx.jpg

then i suggest using the rotation operator with a speed space follow as it will make the particles follow the spline as they move along it, whereas in case of speed space the direction is set only once when the particle are born and after that they continue to follow the path but in the direction which they were given during birth

so you could use multiple path constraints to get the result shown on top. I have attached the .max file (2010) so you can have a look at the path constraint setup as its difficult to explain with text! check if it helps. cheers!

Bobo
01-24-2010, 03:26 PM
The Orientation channel contains a Quat value which describes the rotation of the particle.
A Quat can be converted to a Matrix3 MAXScript value (using 'theValue AS MATRIX3') and then the .row1, .row2 and .row3 properties of the Matrix3 value will give you the X, Y and Z axes of that matrix.

mattjakob
01-25-2010, 03:15 PM
awesome. my email system sometimes is trashing some of the notifications.
I solved the problem using a quaternion so I can have full flexibility with the parameters (spread, angular and vertical velocity etc). I will post the code this evening when Im back to the other computer.
Thanks for both the solutions :)

CGTalk Moderation
01-25-2010, 03:15 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.