PRT Volume - create id channel

Hello guys,
I often use the ID channel, with the noise or a texmap lookup, to randomize stuff, and I just found out PRT Volume doesn’t create an ID channel, would be cool if there is an option for it.

Thanks!

It cannot create one because if you animate the source mesh, it cannot track where a particle went from one frame to another (since each frame generates particles based on whatever voxels the Level Set generated, and there is no way to preserve the distribution between frames to be consistent).

Thus, the only channel you can use to emulate an ID channel is the Index channel which will be consistent for static meshes, and will shift in space as the generation order changes. The index channel is the internal loop counter of the Magma. It does not exist in the particle stream itself, it is made on the fly by the Magma using the order in which the particle stream provides it with particles. So you can connect InputChannel Index to Output ID and live with that, or use the Index in place of ID with Noise operators etc.

If you do need a deforming cloud, you could save a single frame of the PRT Volume with Index->ID to a PRT file, then load in a PRT Loader and deform that instead of deforming the source mesh of the PRT Volume. This will ensure you have a consistent ID channel between frames and no particles will come and go due to the deformations.

If you are using a PRT Volume or a PRT Maker as a source in Stoke and you need an ID channel to track particle emission, you also need to copy the Index to ID via a Magma before Stoke can track which particles have already been used as sources. There is a tutorial here that explains it: thinkboxsoftware.com/stoke-mx-and-prt-maker/

An alternative way to make an ID channel would be to use the Position of the particle in space. This way, if a particle has a consistent position between frames, it will generate the same ID. This is somewhat similar to the approach in this Frost+PRT Volume tutorial, but there it sets the Material ID based on the Position in space: thinkboxsoftware.com/frost-g … el-grid-c/ (see “Consistent Materials with Animated Source Mesh”).

That clears things up a lot! Thanks!