ANARI-Docs icon indicating copy to clipboard operation
ANARI-Docs copied to clipboard

Per-instance materials

Open miroslawpawlowski opened this issue 1 year ago • 5 comments

I have faced a problem in OSPRay and just would like to make sure it is not an issue for ANARI. Let’s assume we want to create a scene with two objects that share geometry but have different position and material (e.g. wooden teapot and gold teapot). We want to use a single geometry and thus construct a single BVH. This means we will have a single anari::Group object. In the current 1.0 ANARI version there is no way we can specify per-instance material. Will it be solved by defining another instance sub-type e.g. KHR_INSTANCE_TRANSFORM_AND_MATERIAL which would additionally contain index into some material array? But then, where to store this material array, in anari::Surface?

miroslawpawlowski avatar Jul 24 '23 16:07 miroslawpawlowski