These tags perform rather simple channel operations, and the real trick is figuring out what channel names are supported. Krakatoa allows arbitrary channel names, but only some of the channels are recognized by the renderer as valid data carriers that can be used during rendering, and only some channels exist by default in the incoming particle streams. I have every intention to start working on the documentation in the coming days (I am on a demo tour in New York City this week), but here is a short overview of what is worth knowing:
All Krakatoa-specific channel names are Capitalized.
*Position (vector) - contains the particle position. Every particle has this channel (mandatory!).
*Density (float) - contains the spatial density contribution of the particle. If not generated by the source or specified explicitly via the object overrides, defaults to 1.0. Note that a PRT Volume will adjust the Density of each particle so that the sum of all particle Densities falling within a cube with size of 1.0 cubic unit would be 1.0.
*Color (vector) - contains the scatter color of the particle - the color that will be reflected by a particle into the eye when while light illuminates it. If not specified explicitly (e.g. via the object overrides, or PRT Loader’s viewport gradients), it defaults to 1,1,1 (white).
*Emission (vector) - defines the self-illumination (incandescence) of the particle. Unless overwritten by an object override, defaults to 0,0,0.
*Absorption (vector) - defines the light absorption for each color channel separately. Defaults to 0,0,0, which produces the same result as with “Use Absorption” turned off (gray shadows). When enabled in the renderer, controls how the Red, Green and Blue components of the light passing through particles will be absorbed.
*Normal (vector) - contains the normal vector of the closest surface point when a particle was generated by a PRT Volume or PRT Surface. Most other particles don’t have one, in which case it defaults to 0,0,0. The Normal channel is required by some of the shading modes like Phong Surface to calculate specular highlights.
*Tangent (vector) - defines the tangent vector (a vector orthogonal to the Normal vector). Defaults to 0,0,0. Required by some shaders like Marschner Hair, but currently not generated automatically since no hair/splines to particles conversion support has been added yet.
*Age (float) - contains the age of the particle as floating point seconds since birth. Most live particle sources contain this channel, PRT files could contain it if it was saved, PRT Surface, PRT Volume and PRT Fractal do not contain this channel.
*LifeSpan (float) - contains the life expectancy of the particle as floating point seconds. Same rules apply as with Age.
There are more channels, but these are probably the most common.
If a particle contains one of these channels, but you want its content to appear in another channel, you use the Channel Copy tag. You enter the source and the target channel names, and the target channel gets set for each particle to the value of the source particle. For example, in a PRT Surface with a Channel Copy tag set to Source: Normal Target: Color, the particles will turn into all colors of the rainbow according to the direction of the normal vector.
Replace Normal with Position, and the object-space positions of the particles will be copied into the colors.
Add a Channel Scale AFTER the Copy and enter Color and 0.01. This will reduce the intensity of the color so at 100 units from the object’s origin, the particles’ RGB components would reach maximum intensity.
Now add a Channel Magnitude behind the previous two tags and enter Color and Color and check “Create Vector Channel”. This will take the length of the vector (which at 100 units from the origin will have a value of 1.0, with a gradient from 0.0 at the object’s origin), and will build a vector with all three components set to the same value. So this will create a grayscale Color value.
If you wanted to fade the Density from 0.0 at the origin of the object to 1.0 at 100 units away, you can enter Density in the “Target” field, and uncheck the “Create Vector Channel”. This will set the Density channel to the floating point value of the vector magnitude produced from the Position channel copied into Color and scaled down 100 times…
If you had calculated a Color channel using any other method and want to have the particles also glow with the same color without any external light source, you could use Channel Copy with Color and Emission and enable “Use Emission” in the renderer’s settings. This will duplicate the color data from the Color channel into the Emission channel and the particles will become self-illuminated.
Hope this helps.
When we add Magma to KC4D some day in the future, these operations and many more will become trivial. We had these copy and scale operations as part of the Krakatoa SR implementation and they were exposed to KC4D, but they are really quite basic. We felt it would be better to have something small than nothing at all…