Hi BK,
I've attached a hip file that shows the issue, let me walk you through it here:
First I've made 2 example streams, a solaris based one (that isn't working) and a ROP based one that is (using the texture map workaround).
In the /obj root you will find 2 subnets that contain the different examples:
- instancing001_1.jpg (4.99 KiB) Viewed 2842 times
Looking first at the ROP example:
Here I've just setup 4 objects and assigned this basic material to them (the file path will need to be updated for you):
Inside the instance1 object there are points with a "Cd" and "instance" attribute on them.
Then launching IPR from the Octane ROP:
Produces this result:
As far as I understand it, this is considered the "correct" workflow for instancing in Houdini and reading in a color value for use in the shader (the only attribute that is supported for instancing), unless I'm mistaken there? Either way, this example is working.
Now looking at my solaris example, back to root and diving into the LOP network:
- instancing001_6.jpg (13.01 KiB) Viewed 2842 times
Here I have tried to replicate the same logic with this scene graph:
The instancer LOP is set to "Point Instance" method so there is only 1 copy of the source mesh in the scene graph and its instanced onto the points (if you set the method to Reference, it will copy the mesh and apply the attributes, but that isn't instancing).
This seems to at least instance the geometry correctly when rendering with Octane, but the material assignment no longer works like it did before, it all just turns yellow
Ideally (and this is now a feature request rather than a bug) you'd be able to read in primvars for use in the shader, like you can with the materialX nodes
primvars on the instancer:
accessing them for the material:
Thanks!