JimStar wrote:
Do you mean that MentalRay can't have the own shader for each particle?.. Only for object itself?..
That's right, mentalray for Maya doesn't let you set a shader for a particular instance. You typically have to deinstance the particle-geometries. Ideally, Maya would translate a "particleSamplerInfo" nodes' outRGB attribute to mesh shaders. particleSamplerInfo does work for software-rendered particles--i.e., the way you color a software rendered particle is by connecting a particleSamplerInfo outRGB attribute to an attribute on a particleCloud node. However, if you connected the same particleSamplerInfo to say, a blinn or mia_material node's diffuse attr., and then applied that mesh shader to the parent (instanced) mesh, the instanced meshes would not be colored per particle.
In a perfect world, Octane would do the following:
Code: Select all
If the shader is applied to an instancer node:
....If the shader has any connections downstream from a particleSamplerInfo node:
........For each instanced mesh:
............Set up a Octane proxy object
............Compute the particleSamplerInfo node using the particle that corresponds to the instanced mesh
............Shade with the graph, substituting the computed particleSamplerInfo
Plugin authors I think have had trouble with that very very last step. There's something about the Maya API that makes it difficult to find the particle that corresponds to a mesh computed by Maya's instancer node.
However, you have the advantage of writing your own instancer node, so as long as you store the particle attributes with the instance and provide a way to pipe that data into an Octane shader, it sounds like you're good to go.
I will package up a sample scene for you to use shortly.
Thanks, and excellent work as always-