AWS Thinkbox Discussion Forums

PRT color to Frost Error.

I have a PRT loader with a color channel and I want to use the same colors on a frost mesh as well But when I render I keep getting this error saying there is no color channel. The particle data viewer is showing the channel and the magma flow works when I render in krakatoa. In the viewport it also shows up with the correct colors but it wont render. can’t think what I am missing.

Thanks in advance.

To rephrase “The Matrix”, “There is no Color” :slight_smile:
In the Particle Data Viewer, the Color channel is prefixed by >>.

thinkboxsoftware.com/krakato … hange-log/

In other words, while the Krakatoa Renderer will assume these values as valid Colors, other systems like Frost and Magma (which are in fact searching for the 3dsMax VertexColor a.k.a. Mapping 0 channel) will fail to see a valid color because there isn’t one in the incoming data stream…

Ahh , Doh! so I guess i should resave the particles with the colors KCM and bring it back in. Thanks!

To be even clearer:
The color of a particle in Krakatoa, as well as its Density, can come from various places. Understanding where it comes from and how it moves through the pipe is vital!

When a PRT Loader is reading a PRT sequence, that sequence might contain a Color channel. If it does, the data is loaded. If it does not, the Color of the PRT Loader’s object (wireframe color in Max viewport) will be used when rendering, but that value does NOT flow through the stack. So Magma modifiers will not see it, only the Renderer will do the substitution.

A PRT Volume base object will only have a valid Color channel on its stack if the source mesh has a valid Vertex Color channel painted directly in it or via a Vertex Paint modifier. Otherwise, the PRT Volume will behave like a PRT Loader without an explicit Color channel - the Wirecolor or Material color will be used by the Krakatoa Renderer, but the Modifiers on the stack or objects like Frost will find no Color channel…

A Magma modifier can SET the Color channel to some value based on other channels, inputs etc. This creates a valid Color channel above that Magma modifier. If there was no valid Color channel below the Magma, other Magma modifiers below it will see no color and show the error you saw.

A Standard Material assigned to the PRT Loader will OVERWRITE any color coming up the stack when rendering, but will not affect Frost which will be looking for the VertexColor channel. The Diffuce color channel / map will be evaluated. If the incoming color is desired to be preserved within the Standard Material, a Vertex Color Map can be used in the Diffuse map tree to evaluate the incoming Color channel (if it actually exists) and insert in the shader.

A Krakatoa Material can optionally override the incoming Color channel at render time - it has a checkbox to set the Color, or pass through the incoming one. It is technically a Magma flow under the hood, just hard-coded and run via a Material object.

The Krakatoa Global Channel Overrides can provide a Color channel for all scene particles at render time only.

The Krakatoa Global Color Override can set the Color of all particles in the scene to a single value at render, killing anything created prior to that point.

Hope this helps.

Thanks for the detailed explanation . So in this case even though I have set the color via magma frost will not see that. But I thought if I then assign the color to a mapping channel 2 and then assign a standard material with a vertex map set to channel 2 it would render. The thing thats confusing me is that it shows up in the viewport but wont render.

Your screenshot showed that you did NOT set the color, because you were trying to READ the Color and that caused an error. If you were just SETTING the Color as Output (e.g. based on any other existing channels), then Frost would see that channel immediately (in the viewport if you set the Vertex Color Display in Frost’s Object Properties, or in any mesh renderer like Scanline, VRay or mr if you add a Material with a Vertex Color Map set to channel 0).

If you set Channel 2 via Magma, you have to also set the Vertex Color Map in the Frost Material to Channel 2 for it to show up in the rendering…

In other words, in the flow you posted, instead of InputChannel Color multiplied by some Velocity factor, you need an InputValue Vector with the desired static color to multiply… Or you need a PRT sequence with an actual Color channel saved for the InputChannel Color to be valid within that Magma modifier.

If your Magma has an error, all you could see in the viewport would be the Object’s Wireframe color which is what Krakatoa would also render. But you would never see a Velocity-based dimming unless you fix the error.

This is the setup I have.

I have assigned a standard material with a gradient set to vertex color to the PRT loader I thought that would set the color.

I got it! thanks for the explanation. :smiley:

Instead of a color input i just had to put a input texture map and use the same map I had assigned to the prt loader.

Just to reiterate, Krakatoa evaluates PRT objects similar to the way Max evaluates mesh objects:

-Base Object
-Object Space Modifiers on the stack (Magma, Krakatoa Delete, Deformers)
-World-Space Transforms
-World Space Modifiers / Space Warps (Deformers, Krakatoa SkinWrap)
-(PRT Loader’s own Culling option)
-Materials assignment

As you can see, a Magma modifier cannot see the color of a Material assigned to the object because the Material is evaluated much later in the pipeline (this is illustrated in the Krakatoa Schematic Flow tool, too). Your solution to instance the same texture map as in the Material is thus the correct approach, assuming the map is not a Vertex Color Map but something that generates a color procedurally. But keep in mind that a Material assigned to the PRT Loader would overwrite the Color coming from the stack. Assigning a Vertex Color Map to Diffuse solves this, but if that’s all you are doing with the material, you are just wasting CPU cycles. It would be better to remove the Material, or replace it with a Krakatoa Material which allows you to pass through the various channels if you want to preserve them while modifying others.

You can remove the Material of a PRT Loader by selecting it and running
$.material = undefined
in the MAXScript Listener.

Its starting to make sense. someday it will be second nature.

Privacy | Site terms | Cookie preferences