RenderableTimeVaryingVolume

Inherits Renderable

Members

Name

Documentation

Type

Description

Optional

SecondsAfter

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

Double

Value of type ‘Double’

No

SourceDirectory

Specifies the path to load timesteps from

String

Value of type ‘String’

No

TransferFunction

Specifies the transfer function file path

String

Value of type ‘String’

No

Brightness

The volume renderer’s general brightness

Double

Value of type ‘Double’

Yes

ClipPlanes

@TODO Missing documentation

Table

Yes

GridType

Spherical or Cartesian grid

String

Value of type ‘String’

Yes

InvertDataAtZ

Specifies if you want to invert the volume data at it z-axis.

Boolean

Value of type ‘Boolean’

Yes

SecondsBefore

Specifies the number of seconds to show the first timestep before its actual time. The default value is 0

Double

Value of type ‘Double’

Yes

StepSize

Specifies how often to sample on the raycaster. Lower step -> higher resolution

Double

Value of type ‘Double’

Yes

Inherited members from Renderable

Name

Documentation

Type

Description

Optional

DimInAtmosphere

Enables/Disables if the object should be dimmed when the camera is in the sunny part of an atmosphere

Boolean

Value of type ‘Boolean’

Yes

Enabled

This setting 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

This value specifies if the renderable should be rendered in the Background,Opaque, Pre/PostDeferredTransparency, or Overlay 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

This tells 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 * 365 * 24 * 60 * 60, -- 50 years before
29    SecondsAfter = 50 * 365 * 24 * 60 * 60 -- 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)