RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization

Home Page:http://ospray.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation or examples for nested/multi-level instancing

chegarty3 opened this issue · comments

There are several issues regarding implementation of multi-level or nested instances.

#304
#256
#336
Those issues all generally are addressed with "will be implemented in V2.0".

In the V2.0 changelog, there is a commentary:
"The hierarchy of objects in a scene are now more granular to aid in scene construction flexibility and reduce potential object duplication"

But in combing through the examples, documentation, and code, I don't see anything to suggest multi-level instances (currently looking at V2.10). Is this not supported? Is it supported and not documented (hopefully)? I'm not looking for complex overrides; just a simple hierarchical scene graph. Something on the order of Instance -> Group -> Instance -> Group.

We removed the (only partly implemented) multi-level instancing in v2. The path to bring it back is like you sketched, adding an OSPInstance[] instance array to OSPGroup.

Would 2-level instancing be enough? Or indeed "unlimited" levels? We would still have a compile-time maximum number of nesting.

For our purposes we would need "unlimited" levels (within a reasonable limit). It's pretty typical to have 3 or 4 levels of instancing where the top 1 or 2 levels are infrequent but the deeper 3 & 4 nested instances are very common throughout. It would be great to be able to leverage instances for those deeper, "common" instances.

Ultimately, a user could nest 100s of levels of instances but that is extremely unlikely and we would certainly work with a reasonable level constraint.