I’ve perused the forum but didn’t find quite what I was looking for.
I’m writing a importer for an external file format. Like modern RenderMan RIB, it heavily uses instancing (every object is instanced), and the shaders are attached at the instance.
There are three use cases of which I managed to implement two. The third stumps me:
- Every object is a single instance. Easy: Create an Object, Create a Mesh, Create a shader, link together
- 1 object duplicated N times with variations. Slightly harder but not difficult: Create a Mesh, Create N Objects, Create a Shader with an ObjectInfo(I think, not looking at the code) node, add color attribute per object. Done.
- 1 object duplicated N times with different materials/shaders. Ummm, help?
It’s the last one I’m not sure how to handle. Do I explode the mesh into N copies and treat as case #1, or, …?
Any help/pointers is appreciated.