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

Transfer function improvement #371

Open paulmelis opened 4 years ago

paulmelis commented 4 years ago

The current way of setting a TF is somewhat sub-optimal. Usually (in most apps that support volume rendering anyway) you specify a sparse number of (value, color, opacity) tuples to define the TF over the volume data range. This provides comprehensive control over the volume look.

But such a sparse specification is currently a bit hard to convert to an ospray TF, as the latter needs a list of equidistant points that only implicitly are associated with data values. This means the client will need to do most of the color/opacity interpolation themselves in order to set up the ospray TF. Plus you can't always exactly match the sparse TF with the interpolated values.

johguenther commented 4 years ago

Agreed. Is color and opacity always together in the tupel? I think it would be nice to still specify color and opacity independent from each other (to support different number of samples at different values).

paulmelis commented 4 years ago

There's definitely TF editing UIs that allow separate specification of color and opacity. ParaView and VisIt allow it, to name two.

johguenther commented 2 years ago

We'll implement a variant for TFN that let's you set (value, color), (value, opacity) pairs, removing the requirement for equidistant points.

dermegges commented 2 years ago

Glad to hear that :+1: I struggled with this limitation as well. Meanwhile, I was already working on a conversion function: https://github.com/dermegges/ospray_util