UniformTiles example

VSG extension This example illustrates the benefit of providing uniform tiles in a volume reader for each tile containing a constant value.

2 render areas display an equivalent dataset having the same size, same extent and same tile size. The datasets have only tiles with a constant value which is random. Thus, the rendering of such dataset is a mosaic of small cubes with a single color on each cube (a cube represents a tile). Both render areas use the same volume reader class RandomReader. However the instance of RandomReader used by the left render area allocates only standard buffers (SoCPUBuffer) in the readTile method, while the instance on the right render area allocates only uniform buffers (SoCPUBufferUniform).

The rendering are not equal on each render areas for 2 reasons:

2 sliders are provided in the user interface of this example to define the maximum amount of memory allocated by the volume rendering. The first slider defines the maximum memory used to load tiles on the GPU. The second slider defines the maximum amount of texture memory on the CPU used to render the dataset.

The goal of this example is to illustrate the benefit of uniform buffer versus standard buffer when using the same maximum amount of memory. If the maximum amount of memory is small, the right render area display many more tiles which mimics an higher rendering quality. Moreover, if the maximum amount of the memory is quite large, both render area display the same image but after a different duration. The right render area displays the highest resolution of the volume much earlier than the left render area.

FILES:

SEE ALSO

SoVolumeRender, SoVolumeData, SoVolumeReader

SCREENSHOT:


Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/