I am trying to replicate this from your online documentation but can not get it to work:
■ in order to visualize the Velocity value of a FumeFX simulation, we can add a KCM to the PRT FumeFX object and set the Velocity channel to output to the PRTViewportVector channel (left image)
■ We can also output the Velocity channel into the Color channel using a second KCM
I would really appreciate it if someone could show me the set up in MagmaFlow for this.
I know this is probably very easy but I am new to Krakatoa so I hope you’ll bear with me.
*Select the PRT object you want to use the vector display on. This works with all PRT objects EXCEPT for PRT Loader which has its own Display controls.
*With the PRT object selected, go to the Krakatoa menu and select “Add Krakatoa Channels Modifier (KCM)…”. Alternatively, select “Krakatoa Channels” from the 3ds Max Modifiers list in the Modify tab of the Command Panel.
*Press the “Open MagmaFlow Editor…” button - you should see two nodes - a Color Input and a Color Output.
*Select the Color Input node and select “Velocity” from the list of typical channels.
*Select the Color Output node and select the PRTViewportVector channel
*If the >AUTO button is not checked, press the UPDATE button or check the >AUTO button.
RESULT: You should see the particles drawn as lines in the viewport. If a particle has a velocity of 0, no line will be visible.
If the lines drawn are too long, you can divide the Velocity by any number to scale it down. To do this,
*Select the Velocity Input node
*Hit the [/] (Divide) key on the Numeric Keypad - this will insert a node between the two existing nodes.
*With the Divide operator selected, press Ctrl+2 to create a Float Input with value of 2.0.
*Change the value to 10 or 24 or 30 or 100 or whatever factor you want to change the length of the lines.
So far I’ve added the PRT FumeFX to the Fume simulation, then added a KCM to the PRT FUMEFX, opened MagmaFlow editor and set input node to velocity Channel and output to PRTViewportVector Channel. The viewport and render still looked like the same dots as before (quite dense simulation) but probably I need the divide operator you mentioned. I’ll try this as soon as I get back to my computer.
I aslo added a second KCM with input node: Velocity and output node: color, but no color appears in either viewport or render.
(I tried a gradient ramp in the emission slot but the got a warning that TextureCoord can not be located.)
Is there something else I need to do to get the colors showing?
Use the Particle Data Viewer (PDV) to check what the Velocity channel looks like. Are we sure there is valid data in it?
The PDV can be opened from the Krakatoa Menu or from the Krakatoa GUI > Main Controls > bottom row of buttons.
If you add a KCM with Velocity->Color, there can be 4 possible outcomes:
*You get velocity display as color in the viewport
*You get an error in KCM if Velocity channel does not exist
*You get a black color if the data is (0,0,0)
*You get the Material color if a material was assigned to the PRT object (in which case you have to either remove the material, or use a Vertex Color Map in the Diffuse slot of the material to get the Color channel). To see the color in the viewport, you can also check the option to “Ignore Material” in the Viewport rollout of the PRT FumeFX. Note that there is a “Disable Velocity” checkbox under “Miscellaneous” that must be, obviously, unchecked.
When you add the KCM that does Velocity to PRTViewportVector, there are 3 possible outcomes:
*You get lines showing velocities in the viewport
*You get no particles displayed at all if Velocity is 0,0,0 because zero-length lines don’t show up
*You get nothing in the viewport and an ERROR in KCM if Velocity vector is not a valid channel or if there is anything else wrong with the flow.
There is no way to get dots in the viewport while having an output set to PRTViewportVector that I know of.
Unfortunately, I don’t have FumeFX installed here and cannot test exactly what you are doing.
So posting screenshots of the things you are doing might be a good idea…
A bit embarrassed:
When I got home and followed your steps it worked like a charm.
Maybe I have to stop working on this so late at night (or at least that’s my excuse)
Thank you for your help and for a lot of useful information!