SoLDMResourceParameterstileDimension Property |
Sets the tile size.
Namespace: OIV.LDM.Nodes
VolumeViz always manages volume data in CPU memory as a hierarchy of tiles and data is transferred to GPU memory as tiles.
When using VolumeViz with in-memory data or a file format other than LDM, the data is converted to tiles "on the fly". In this case, the default tile size is (128, 128, 128).
When loading data using an LDM volume reader, e.g. loading an LDM format file or using a custom volume reader that implements the readTile() method, the tile size is initialized with the value returned by the reader's getTileSize() method. The application can specify a different tile size, in which case the tiles are automatically generated using the data from the reader's tiles, with the following limitation: If the reader's readTile() method returns uniform or compressed buffers (OIV.LDM.Tiles.SoCpuBufferUniform or OIV.LDM.Tiles.SoCpuBufferCompressed), they are converted to regular buffers and the memory optimization is lost.
Changing the default tile size may affects the rendering or data loading performances. Basically, a larger tile size is usually better for rendering performance or to quickly obtain the highest resolution thanks to more optimal GPU utilization. On the other hand, it may penalize the data fetching on the CPU side from slow hard disk drives or over the network. Experimentation is generally required to find a good trade-off between rendering efficiency and data fetching time.
Notes:
tileDimension must be set after setting the volume filename or volume reader on an OIV.VolumeViz.Nodes.SoVolumeData node.
Tiles are stored as textures on the GPU. Therefore a tile must not exceed the maximum size allowed by the GPU. See OIV.Inventor.Helpers.SbGPUCapabilities.GetMax3DTextureSize().
If the tile dimension is set larger than the default value and the OIV.VolumeViz.Nodes.SoVolumeRender.subdivideTile field is set to true, then the subtileDimension should also be set to a larger value to avoid reducing performance. In general we recommend setting OIV.LDM.Nodes.SoLDMResourceParameters.subTileDimension to OIV.LDM.Nodes.SoLDMResourceParameters.tileDimension/4