I was hoping to be able to write a texture map where each particle would have its own color. This color could be maxscripted inside PFlow. You’d store it somewhere (custom Point3 value for example) and then the map would read it and use it as a color for that particle.
However, the IParticleObjectExt doesn’t support any custom information. Its strictly for standard particle information.
So, how could I pass on the particle color information from particle to the texture map?
In PFlow, each particle, even if it doesn’t have a shape, can contain a single Point3 Mapping Value in any of the 100 Mapping Channels. That value can be interpreted as anything, including a Color.
In the world of Krakatoa, we made the convenient assumption that the Vertex Color channel (Mapping Channel 0) would map 1:1 to the Krakatoa Particle Color Channel. So if somebody would set per-particle colors inside the Mapping Channel 0 of a PFlow, or a mesh, or anything, we would grab that info as the color per particle data.
As a side effect, adding a Vertex Color Map to the Material of the PFlow makes it render in other renderers than Krakatoa (and even in Krakatoa, albeit slower) the same way.
Since the VC channel is scriptable within PFlow Script Operators (as are all Mapping Channels), it is already possible to do what you described, unless I am missing something.
Sounds promising but its not enough in this case. Perhaps I should have describe the problem better.
I’m trying to map a metaball surface with particle colors. So what the texture map should do is find nearby particles and then take weighted average of their color and return it.
This means the particles wont be rendered at all.
So, how do I access the mapping channels from outside of pflow?
Does IParticleObjectExt->GetParticleShapeByIndex(int index) return something even if the pflow doesn’t have “Render” on and the particles don’t have Shape operator?
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.