# Thinking Particles, Local and Global Space

#1

Hi,

I’m trying to create an emitter where secondary particles vibrate up and down relative to the of path primary ones of which they’re parented.

I’ve used the data channel to parent the particle in Group A to Group B. This works fine.
I can then add noise to the Y channel of the Group B particle. Again this works fine.
But the particle moves up and down in Global Space and I want it to move ‘up’ and ‘down’ relative to the path of the particle of which it’s parented to. Eg. In local space compared to that particle.

I’m trying to use the MatrixMulVector node to convert to and from Local Space but I can’t get it working.

Here’s my setup: https://dl.dropbox.com/u/1830495/Global%20Local%20Test.c4d

Thanks,
Simon

#2

I don’t have cinema in front of me, do you mind posting a screenshot?

#3

You build the particle’s matrix using its position and velocity.

Global_Local_Test_Working.zip

#4

Darter: That’s great. Thank you very much, I’ve been struggling with this for a while. I see now that I didn’t need to translate back using the MatrixMulVector. I was probably just neutralising any results I would have got!

Typografschaft: Here’s a couple of screen shots. He’s my attempt https://dl.dropbox.com/u/1830495/Fail.jpg and here’s Darter’s solution https://dl.dropbox.com/u/1830495/Win.jpg

#5

i don´t want to hijack your thread, and your setupworks fine, Darter, but only a little correction:
you can get the matrix directly out of the alignment - so there´s no need for the velocity (take the output of the position instead of the velocity, and you will see no difference).
basically you can get your particle´s matrix out of the position, too, since the velocity is nothing else than the derivative of the position (and with this you will even have two nodes less in your setup by the way ;).
the Vector2Matrix node does nothing else than setting the 3 basisvectors defined by the position (with a adjustable direction function).

but still, nice workaround. just wanted to share some information…
cheers
fuat

#6

Alignment and Velocity aren’t interchangable. For one, a particle can move in a totally different direction that where it points to. Secondly, the velocity vector does not give you a full matrix, one axis is undefined.

#7

This setup demonstrates the relationship between a particle’s position and velocity.

#8

This is very kind of you, David.
Highly appreciated.

#9

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.