ospray icon indicating copy to clipboard operation
ospray copied to clipboard

Transfer function improvement

Open paulmelis opened this issue 6 years ago • 4 comments

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.

paulmelis avatar Oct 16 '19 08:10 paulmelis

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).

johguenther avatar Oct 16 '19 08:10 johguenther

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

paulmelis avatar Oct 16 '19 10:10 paulmelis

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

johguenther avatar Sep 17 '21 09:09 johguenther

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

dermegges avatar Sep 23 '21 09:09 dermegges