VoxelGrid#

final class VoxelGrid[source]#

Bases: _VolumeEntityBase

Axis-aligned voxelized region used as a render target for direct volume rendering.

Resolution is intrinsic to the voxelized 3D-texture entity (it shapes the underlying data, not just the rendered image), so it lives on the entity rather than in a render-side settings class. The grid is strictly axis-aligned — rotation and scene transforms are not supported on the schema side; the renderer applies any scene-level transform at draw time.

Example

>>> VoxelGrid(
...     name="grid",
...     center=(0, 0, 0) * unyt.m,
...     size=(1, 1, 1) * unyt.m,
...     resolution=(256, 256, 256),
... )

Attributes

center: Length.Vector3#

The coordinates of the center of the region.

size: Length.PositiveVector3#

The dimensions of the region (length, width, height).

resolution: tuple[int, int, int]#

Voxel grid dimensions (X, Y, Z). Memory cost scales as X*Y*Z*4 bytes; 512^3 is a reasonable preview cap, 1024^3 a final-render cap.

Properties

id: str#

Returns private_attribute_id of the entity.