RenderableSphereSpout

Inherits Renderable

Renders a sphere with a texture that is provided by another application on the same computer using the SPOUT library.

Note: The SPOUT library is only available on Windows.

Members

Name

Documentation

Type

Description

Optional

BlendingOption

Controls the blending function used to calculate the colors of the sphere with respect to the opacity.

String

In list { Default, Additive, Polygon, Color Adding }

Yes

ColorMap

Color map / Transfer function to use if UseColorMap is enabled.

File

Value of type ‘File’

Yes

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

DisableDepth

If disabled, no depth values are taken into account for this sphere, meaning that depth values are neither written or tested against during the rendering. This can be useful for spheres that represent a background image.

Boolean

Value of type ‘Boolean’

Yes

DisableFadeInOut

Enables/Disables the fade in and out effects.

Boolean

Value of type ‘Boolean’

Yes

Enabled

Determines whether this object will be visible or not.

Boolean

Value of type ‘Boolean’

Yes

FadeInThreshold

The distance from the center of the Milky Way at which the sphere should start to fade in, given as a percentage of the size of the object. A value of zero means that no fading in will happen.

Double

In range: ( 0, 1)

Yes

FadeOutThreshold

A threshold for when the sphere should start fading out, given as a percentage of how much of the sphere that is visible before the fading should start. A value of zero means that no fading out will happen.

Double

In range: ( 0, 1)

Yes

MirrorTexture

If true, mirror the texture along the x-axis.

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

Orientation

Specifies whether the texture is applied to the inside of the sphere, the outside of the sphere, or both.

String

In list { Outside, Inside, Both }

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, Overlay, PostDeferredTransparent, Sticker }

Yes

Segments

The number of segments that the sphere is split into.

Integer

Greater or equal to: 4

Yes

Size

The radius of the sphere in meters.

Double

Greater than: 0

Yes

SpoutName

This value explicitly sets the Spout receiver to use a specific name. If this is not a valid name, the first Spout image is used instead.

String

Value of type ‘String’

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

TextureProjection

Specifies the projection mapping to use for any texture loaded onto the sphere (assumes Equirectangular per default). Note that for “Angular Fisheye” only half the sphere will be textured - the hemisphere centered around the z-axis.

String

In list { Equirectangular, Angular Fisheye }

Yes

Type

The type of the renderable.

String

Value of type ‘String’

Yes

UseColorMap

Used to toggle color map on or off for the sphere. Mainly used to transform grayscale textures from data into color images.

Boolean

Value of type ‘Boolean’

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, Overlay, PostDeferredTransparent, Sticker }

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

Basic

This example renders a sphere with a texture that is provided by another application on the same computer using the SPOUT library. Note that this library is only available on Windows. A SPOUT-enabled application can share a texture using a user-defined name, which is used as the SpoutName here to receive that image. This allows the integration of any generated image.

 1local Node = {
 2  Identifier = "RenderableSphereSpout_Example",
 3  Renderable = {
 4    Type = "RenderableSphereSpout",
 5    Size = 333,
 6    Segments = 32,
 7    -- The name under which the other application is sharing an image
 8    SpoutName = "WV_SPOUT"
 9  },
10  GUI = {
11    Name = "RenderableSphereSpout - Basic",
12    Path = "/Examples"
13  }
14}
15
16
17asset.onInitialize(function()
18  openspace.addSceneGraphNode(Node)
19end)
20
21
22asset.onDeinitialize(function()
23  openspace.removeSceneGraphNode(Node)
24end)