-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested models not supported? #256
Comments
Hi Cyrille, You are correct, nested instancing is not support in OSPRay. The API, as it is currently expressed, leads you to believe that nested instancing is supported, but we intend to change that. We've decided to stick with single-level instancing in OSPRay API itself, though we support multi-level instancing in Thus, we still do deliver that functionality (not withstanding future improvements), but deliver it in a place which makes more sense: a traversable representation of a scene. In OSPRay v2.0, we will make the API more obvious to the single-level instancing design decision. It won't require too much of a change from the current API, but it will be spelled differently...perhaps by introducing an FWIW, this decoupling also lets us consider potential differences in the roles of the OSPRay API and the scene graph. (ex: instancing lights inside models) Hope that helps! Cheers, |
Hi,
I recently tried to use nested models by using the following API / pseudo-code:
model1 = ospNewModel();
model2 = ospNewModel();
...
instance2 = ospAddInstance(model2, (osp::affine3f&)ospcommon::one);
ospAddGeometry(model1, instance2);
instance1 = ospAddInstance(model1, (osp::affine3f&)ospcommon::one);
ospAddGeometry(rootModel, instance1);
...
ospCommit(rootModel);
The rendering unfortunately fails in the following line of model.ih:
geom->postIntersect(geom,model,dg,ray,flags);
In the model.ih file, the comments make it pretty clear that the feature is not yet supported.
Note that if I do not have more that 1 level of children under the 'root' model, things work fine.
Will nested models be fully supported in the future? In OSPRay 2.0?
Many thanks for you help there.
Cyrille
The text was updated successfully, but these errors were encountered: