In one of Bobo’s old tutorials he shows how to map a blue and white gradient to particles using the velocity channel of a RealFlow sim.
Krakatoa has changed beyond recognition since then, so how would this be done now within Magma? How would you set up the nodes?
I did find the online tutorial of how to do this with Copy Channel, but still curious how to do it with Magma: thinkboxsoftware.com/kmy-map … ty-length/
And you can display the velocities as lines in the PRTLoader with Viewport Display Mode: Display Velocities.
Also, is there way to see what channels are available in a PRT sequence opened in the PRTLoader?
*Create an Output node, set to Color.
*Connect an InputVector node, set to Velocity.
*Insert a Vector>Magnitude node to get the length of the Velocity.
*Divide the Velocity Magnitude by a Float input (this is the scale factor, defining the maximum velocity). When Velocity Magnitude is 0.0, the result will be 0.0. When the Magnitude is equal to the divisor, you get 1.0.
*Insert a Function > Clamp node after the Divide to clamp the normalized Velocity Magnitude between 0.0 and 1.0.
*Insert a Function > Blend operator to blend two colors based on the normalized Velocity Magnitude.
*Connect two InputVector nodes to define the color at 0.0 and the color at 1.0.
Alternatively, you can output the result of the clamped normalized Velocity Magnitude as the U component of a Mapping channel output. Just use a Convert > ToVector operator, and connect to an Output node set to write the TextureCoord channel. Then you can use the Apply Texture approach seen in the old tutorial to actually use a Gradient map instead of a linear mix of two colors…