Skip to content

update ray tracing for compatibility with OSPRay 2

David E. DeMarle requested to merge demarle/vtk:ospray2.x into master

This update allows us to access volumetric path tracing and other new features of OSPRay 2 in VTK.

However, since OSPRay2's raycast or "scivis" renderer is simpler than OSPRay1's was, we lose shadows, multiple and colored light sources, gradient shaded volumes, and specular highlights in that context. The regression tests and baselines have been adjusted accordingly.

This commit compresses a long development branch by Carson Brownlee and David DeMarle. A selection of the commit message are as follows:

  • style fixes for ospInit and ospShutdown call sites

    Returning ospShutdown resulted in segfaults in OpenVKL. So let's leave it as always on once started. VisRTX does the same and we've done it this way in earlier releases so it will probably be fine.

  • restore temporal caching

    New approach is to simply cache the entire scene instead of individual props.

  • Update the ospray isosurface baseline image.

    Comparing with GL shows that the new version is more similar to GL so it is valid.

  • remove volume rendering sample adjustments

    The adjustments we had for osp1.8 seem to make matters worse such that several OSPRay tests (Caching, Perspective) render a volume that is so translucent that it is almost invisible. Without them osp2 seems to automagically do the right thing.

    On the negative side, this means that we no longer take VolumeProperty->ScalarOpacityUnityDistance into consideration.

  • compensate for lack of gradient shading in ospray2 vol rendering

    until ospray 2 gets diffuse volume shading, turn off shading and update baselines.

  • compensate for raycaster lighting limitations

    until ospray2 raycaster gets colored lights, switch these two tests over to pathtracer to make them happy.

    Also add a new alternate image for the lights test because path tracer is much brighter in corner than ray caster is.

  • update to ospray 2's revised material names

    To save a bit on runtime cost, we only provide backward compatibility at material library file parsing. In other words, user code that calls MakeMaterial() directly may have be updated.

  • changing ospray version number to 2.1

  • restructuring renderer to use list of instances instead of models.

Edited by David E. DeMarle

Merge request reports