1
$\begingroup$

I'm trying to create a foam based on particles velocity.

Here is a folder with some tests of the problem.

example

Cycles particle info node implement colour of velocity to a instanced spheres very... wrong (opposite to the display of velocity inside particle system), but if connect output of velocity to normal channel of material it seemes to display colours right. But it is not a solution... How to use this node to proper colour of material?

$\endgroup$
2
$\begingroup$

Feeding the velocity into a Math or a Color Ramp node will be averaging the X,Y,Z values of the vector and this can produce unexpected results - especially where you have a mix of positive and negative values.

Instead, you can use a Vector math Dot Product node to determine the magnitude of the Velocity by passing the Velocity into both inputs of the Dot Product (which will give the magnitude of the velocity, squared) and raising to the power of 0.5 (to square root it - to get the speed) and using this Value output as a scalar representing speed. This can then be passed through a Math node to scale it and on to a Color Ramp to generate a colour based on the speed.

get speed of particle

$\endgroup$
0
$\begingroup$

I copied Rich Sedman's node setup, and still got some unexpected results. the particles seem to continually slow down while falling, and do whatever they want once they have made contact with and object.

enter image description here

Here is the result: Weird Particle Colouring

$\endgroup$
  • $\begingroup$ I didn't spot this as it's as another answer so didn't get notified. I've had a look and it appears to be a problem with the Particle Info Particle Velocity not becoming close to zero once it's collided - it seems to stay at a high negative zertical velocity as if they are still falling - rather than a problem with the node setup. Very strange. I'd suggest adding this as a new question - perhaps someone has seen this before and knows of a solution. $\endgroup$ – Rich Sedman Mar 18 '17 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.