Channel (#0) question

Could someone clarify what the value/values in this texture are? Assuming its density based on the programmers guide.

In the function rayDeepBrick() [cuda_gvdb_raycast.cuh] appears to be performing empty voxel skipping by sampling volTexIn (This is the channel#0 texture?) and using the resulting value’s element(w) of a float4 to calculate empty voxel space. I’m trying to discern what each element of this float4 represents.

Thanks for any insight or clarifications

Hi BillyF,

The sampling inside GVDB is based on the following:
Channel #0 (float) -> Transfer function -> (float4) -> Color (float3) & Alpha (float)

So, while the channel #0 holds a single real value (T_FLOAT), that is used as a lookup into the transfer function which returns 4 values representing color (float3) and alpha (float).

To be more specific, the channel #0 can be an arbitrary data value, with any range.
That range is specified with gvdb.SetVolumeRange ( iso, vmin, vmax), where vmin/vmax should be the minimum and maximum values of the channel data.
Those min/max data values will be remapped to the range [0,1], and then used to lookup a color+alpha in the transfer function. This is the typical way that volume rendering is done using a transfer function over a scalar field.

During raytracing, each float data value maps to a color+alpha (float4), which is accumulated and composited as a semi-transparent medium to create the image.