jit.gl.volume Reference

Create a volume visualization

jit.gl.volume

Description

Creates a transparent volume from a volumetric density field. This process is GL accelerated by using graphics hardware.

Examples

Discussion

Internally, jit.gl.volume creates a 3d jit.gl.texture object and applies it to multiple view-aligned slices of geometry. The resulting slices are then blended together using the standard ob3d blend modes. The density and intensity attributes subsequently control which features are visibile. By enabling the cubes attribute, slices will be rendered in both horizontal and vertical direction, which may result in a visualization which that is comparatively better or worse depending on the volume dataset being used.
The jit.gl.volume object requires one argument: the name of a drawing context. A named drawing context is a named instance of a jit.window, jit.pwindow, or jit.matrix object that has an instance of the jit.gl.render object associated with it. Additionally it can reference the name of a jit.gl.node sub-context. This value may also be set via the OB3D drawto attribute. If no argument is present, the object is implicitly added to the first valid drawing context or sub-context found in the current patch or by searching up the patcher hierarchy.

Attributes

bounds [int]

Flag which enables or disables the rendering of the bounding box surrounding the volume (default = 0).

clip [int]

Flag for enabling a controllable clip plane to slice the volume along an arbitrary axis (default = 0)

clipangle [float]

Rotation angles per axis for the clip plane (default = 0 0 0)

clipaxis [3 floats]

Axis coefficients for the clip plane (default = 1 0 0)

cubes [int]

Flag which enables or disables cube subdivision (default = 1).

density [float]

The density threshold for constructing the surface. (default = 0.5)

displaylist [int]

Cache in displaylist flag (default = 0) This feature may be used to speed up rendering time by creating and storing a list of gl drawing commands on the graphics card. This will have no effect if matrixoutput turned on.

distance [float]

The distance offset from the camera. (default = -5)

ds [float]

Step size in raycast mode

exposure [float]

Exposure in raycast mode

intensity [float]

The intensity scale factor for multiplying against volume density values. (default = 0.5)

mode [symbol]

Rendering mode

Possible values:

'slices'
'raycast'

raycast_adapt [int]

Raycast mode adapts resolution to rendering destination

raycast_dim [2 ints]

Resolution of raycast mode

samples [int]

Number of samples in raycast mode

slices [int]

Sets he number of slices used as proxies for rendering the volume data.

Common Box Attributes

OB3D Attributes

Messages

OB3D Messages

See Also

Name Description
Working with OpenGL Working with OpenGL
jit.gl.graph
jit.gl.gridshape
jit.gl.handle
jit.gl.isosurf
jit.gl.mesh
jit.gl.model
jit.gl.nurbs
jit.gl.plato
jit.gl.render
jit.gl.shader
jit.gl.sketch
jit.gl.slab
jit.gl.text2d
jit.gl.text3d
jit.gl.texture
jit.gl.videoplane