RenderKit / ospray

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

How to build pluggable extension module for OSPRay #574

Closed stukowski closed 10 months ago

stukowski commented 11 months ago

I am trying to port an existing pluggable extension module from old OSPRay 2.7.1 to the current version 3.0.0. The custom extension module is used by our application (OVITO) to render additional geometry types (ellipsoids and superellipsoids) that are not directly supported by OSPRay.

Is it still possible with the current OSPRay release to compile such extension modules separately, i.e. not as part of the OSPRay build process?

I tried to adapt the current code from the BilinearPatches example. Here, BilinearPatches.h includes "geometry/Geometry.h", which I assume refers to the header file Geometry.h from the CPU module (there's another file with the same name in ospray_cpp). Geometry.h, in turn, includes "common/Data.h", which requires ISPCDeviceObject.h. The last file seems to be missing in the OSPRay installation, which prevents me from building by external plugin module against the installed OSPRay. Is there a way to solve this, or am I doing something wrong?

johguenther commented 10 months ago

Sorry, we missed to install some SDK header, a fix is on the way. In the meantime you can just manually copy the headers from the repository (specifically, modules/cpu/*.h).

Also please note that we extension modules won't work yet for GPU rendering.

stukowski commented 10 months ago

Thanks! That helped me overcome my build problem.

A CPU-based extension module is sufficient for our purposes.