RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
1k stars 182 forks source link

Model reference other model #336

Closed StasJ closed 4 years ago

StasJ commented 5 years ago

The documentation states:

Models are a container of scene data. They can hold the different geometries and volumes as well as references to (and instances of) other models.

However it does not appear possible to add a model to another. Instancing appears to be a workaround but I cannot get it to work.

johguenther commented 5 years ago

You need to wrap the model into a geometry with ospNewInstance first, then you can add that geometry to another model.

StasJ commented 5 years ago

I tried that and it does not work.

World Model -> Instance -> Model -> Volume: Nothing rendered World Model -> Volume: Renders volume

johguenther commented 5 years ago

Ah, you want to instance Volumes and not Geometries? Then unfortunately you need to wait for the next release (v2.0), because this is not supported in v1.8.