RenderableTimeVaryingVolume

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

SecondsAfter

The number of seconds to show the the last timestep after its actual time.

Double

Value of type ‘Double’

No

SourceDirectory

A directory from where to load the data files for the different time steps.

Directory

Value of type ‘Directory’

No

TransferFunction

The path to the transfer function file.

File

Value of type ‘File’

No

Brightness

A value that affects the general brightness of the volume rendering.

Double

Value of type ‘Double’

Yes

ClipPlanes

@TODO Missing documentation

Table

Yes

GridType

The grid type to use for the volume.

String

In list { Spherical, Cartesian }

Yes

InvertDataAtZ

If true, the volume data will be inverted at its z-axis.

Boolean

Value of type ‘Boolean’

Yes

SecondsBefore

The number of seconds to show the first timestep before its actual time.

Double

Value of type ‘Double’

Yes

StepSize

Specifies how often to sample during raycasting. Lower step size leads to higher resolution.

Double

Value of type ‘Double’

Yes

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere.

Boolean

Value of type ‘Boolean’

Yes

Enabled

Determines whether this object will be visible or not.

Boolean

Value of type ‘Boolean’

Yes

Opacity

This value determines the opacity of this renderable. A value of 0 means completely transparent

Double

In range: ( 0,1 )

Yes

RenderBinMode

A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker rendering step.

String

In list { Background, Opaque, PreDeferredTransparent, PostDeferredTransparent, Overlay }

Yes

Tag

A single tag or a list of tags that this renderable will respond to when setting properties

Table, or String

Value of type ‘Table’, or Value of type ‘String’

Yes

Type

The type of the renderable.

String

Value of type ‘String’

Yes

Asset Examples

 1-- Before using this example,
 2-- the volume data itself needs to be generated,
 3-- using the task 'data/tasks/volume/generate_cartesian.task'
 4
 5local transforms = asset.require("scene/solarsystem/sun/transforms")
 6
 7
 8
 9local SunRadius = 695508000
10
11local Volume = {
12  Identifier = "GeneratedVolumeCartesian",
13  Parent = transforms.SolarSystemBarycenter.Identifier,
14  Transform = {
15    Scale = {
16        Type = "StaticScale",
17        Scale = 1000 * SunRadius
18    }
19  },
20  Renderable = {
21    Type = "RenderableTimeVaryingVolume",
22    SourceDirectory = asset.resource("cartesian"),
23    TransferFunction = asset.resource("../transferfunction.txt"),
24    StepSize = 0.01,
25    MinValue = 0,
26    MaxValue = 1,
27    GridType = "Cartesian",
28    SecondsBefore = 50 * openspace.time.secondsPerYear(), -- 50 years before
29    SecondsAfter = 50 * openspace.time.secondsPerYear() -- 50 years after
30  },
31  GUI = {
32    Path = "/Examples"
33  }
34}
35
36
37asset.onInitialize(function()
38  openspace.addSceneGraphNode(Volume)
39end)
40
41asset.onDeinitialize(function()
42  openspace.removeSceneGraphNode(Volume)
43end)
44
45asset.export(Volume)