RenderablePolygonCloud

Inherits Renderable

A RenderablePolygonCloud is a RenderablePointCloud where the shape of the points is a uniform polygon with a given number of sides instead of a texture. For instance, PolygonSides = 5 results in the points being rendered as pentagons.

Note that while this renderable inherits the texture component from RenderablePointCloud, any added texture information will be ignored in favor of the polygon shape.

See documentation of RenderablePointCloud for details on the other parts of the point cloud rendering.

Members

Name

Documentation

Type

Description

Optional

Coloring

Settings related to the coloring of the points, such as a fixed color, color map, etc.

Table

Table parameters

Yes

DataMapping

A dictionary specifying details on how to load the dataset. Updating the data mapping will lead to a new cached version of the dataset

Table

DataMapping

Yes

DrawElements

Enables/Disables the drawing of the points

Boolean

Value of type ‘Boolean’

Yes

Fading

Settings related to fading based on camera distance. Can be used to either fade away or fade in the points when reaching a certain distance from the origin of the dataset

Table

Table parameters

Yes

File

The path to the data file that contains information about the point to be rendered. Can be either a CSV or SPECK file

File

Value of type ‘File’

Yes

Labels

The labels for the points. If no label file is provided, the labels will be created to match the points in the data file. For a CSV file, you should then specify which column is the ‘Name’ column in the data mapping. For SPECK files the labels are created from the comment at the end of each line

Table

LabelsComponent

Yes

PolygonSides

The number of sides for the polygon used to represent each point. Default is 3, i.e. to use triangles

Integer

Greater or equal to: 3

Yes

RenderOption

Option wether the point billboards should face the camera or not. Used for non-linear display environments such as fisheye.

String

In list { Camera View Direction, Camera Position Normal }

Yes

SizeSettings

Settings related to the scale of the points, whether they should limit to a certain max size, etc.

Table

Table parameters

Yes

SkipFirstDataPoint

If true, skip the first data point in the loaded dataset

Boolean

Value of type ‘Boolean’

Yes

Texture

Settings related to the texturing of the points

Table

Table parameters

Yes

TransformationMatrix

Transformation matrix to be applied to the position of each object

Matrix4x4<double>

Value of type ‘Matrix4x4

Yes

Unit

The unit used for all distances. Should match the unit of any distances/positions in the data files

String

In list { m, Km, pc, Kpc, Mpc, Gpc, Gly }

Yes

UseAdditiveBlending

If true (default), the color of points rendered on top of each other is blended additively, resulting in a brighter color where points overlap. If false, no such blending will take place and the color of the point will not be modified by blending. Note that this may lead to weird behaviors when the points are rendered with transparency.

Boolean

Value of type ‘Boolean’

Yes

UseCaching

If true (default), the loaded dataset will be cached so that it can be loaded faster at a later time. This does however mean that any updates to the values in the dataset will not lead to changes in the rendering without first removing the cached file. Set it to false to disable caching. This can be useful for example when working on importing a new dataset

Boolean

Value of type ‘Boolean’

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

Table parameters for Coloring

Settings related to the coloring of the points, such as a fixed color, color map, etc.

  • Optional: Yes

Name

Documentation

Type

Description

Optional

ColorMapping

Settings related to the choice of color map, parameters, etc.

Table

ColorMappingComponent

Yes

EnableOutline

This setting determines if each point should have an outline or not. An outline is only applied when rendering as colored points (not when using textures).

Boolean

Value of type ‘Boolean’

Yes

FixedColor

This value is used to define the color of the points when no color map isused

Color3

Value of type ‘Color3’

Yes

OutlineColor

This value defines the color of the outline. Darker colors will be less visible if Additive Blending is enabled.

Vector3<double>

Value of type ‘Vector3

Yes

OutlineWeight

This value defines the color of the outline. Darker colors will be less visible if Additive Blending is enabled.

Double

Value of type ‘Double’

Yes

Table parameters for Fading

Settings related to fading based on camera distance. Can be used to either fade away or fade in the points when reaching a certain distance from the origin of the dataset

  • Optional: Yes

Name

Documentation

Type

Description

Optional

Enabled

Enables/disables the Fade-in effect based on camera distance. Automatically set to true if FadeInDistances are specified in the asset.

Boolean

Value of type ‘Boolean’

Yes

FadeInDistances

These values determine the initial and final distances from the origin of the dataset at which the points will start and end fading-in. The distances are specified in the same unit as the points, that is, the one provodied as the Unit, or meters. With normal fading the points are fully visible once the camera is outside this range and fully invisible when inside the range. With inverted fading the situation is the opposite: the points are visible inside hen closer than the min value of the range and invisible when further away.

Vector2<double>

Value of type ‘Vector2

Yes

Invert

This property can be used the invert the fading so that the points are invisible when the camera is further away than the max fade distance and fully visible when it is closer than the min distance.

Boolean

Value of type ‘Boolean’

Yes

Table parameters for SizeSettings

Settings related to the scale of the points, whether they should limit to a certain max size, etc.

  • Optional: Yes

Name

Documentation

Type

Description

Optional

EnableMaxSizeControl

If true, the Max Size property will be used as an upper limit for the size of the point. This reduces the size of the points when approaching them, so that they stick to a maximum visual size depending on the Max Size value.

Boolean

Value of type ‘Boolean’

Yes

MaxSize

This value controls the maximum allowed size for the points, when the max size control feature is enabled. This limits the visual size of the points based on the distance to the camera. The larger the value, the larger the points are allowed to become. In the background, the computations are made by limiting the size to a certain angle based on the field of view of the camera. So a value of 1 limits the point size to take up a maximum of one degree of the view space.

Double

Value of type ‘Double’

Yes

ScaleExponent

This value is used as in exponential scaling to set the absolute size of the point. In general, the larger distance the dataset covers, the larger this value should be. If not included, it is computed based on the maximum positional component of the data points. This is useful for showing the dataset at all, but you will likely want to change it to something that looks good.

Double

Value of type ‘Double’

Yes

ScaleFactor

This value is used as a multiplicative factor to adjust the size of the points, after the exponential scaling and any max size control effects. Simply just increases or decreases the visual size of the points.

Double

Value of type ‘Double’

Yes

SizeMapping

Settings related to scaling the points based on data

Table

SizeMappingComponent

Yes

Table parameters for Texture

Settings related to the texturing of the points

  • Optional: Yes

Name

Documentation

Type

Description

Optional

AllowCompression

If true, the textures will be compressed to preserve graphics card memory. This is enabled per default, but may lead to visible artefacts for certain images, especially up close. Set this to false to disable any hardware compression of the textures, and represent each color channel with 8 bits.

Boolean

Value of type ‘Boolean’

Yes

Enabled

If true, use a provided sprite texture to render the point. If false, draw the points using the default point shape.

Boolean

Value of type ‘Boolean’

Yes

File

The path to the texture that should be used as the point sprite. Note that if multiple textures option is set in the asset, by providing a texture folder, this value will be ignored.

File

Value of type ‘File’

Yes

Folder

The folder where the textures are located when using multiple different textures to render the points. Setting this value means that multiple textures shall be used and any single sprite texture file is ignored. Note that the textures can be any format, but rendering efficiency will be best if using textures with the exact same resolution.

Directory

Value of type ‘Directory’

Yes

UseAlphaChannel

If true, include transparency information in the loaded textures, if there is any. If false, all loaded textures will be converted to RGB format. This setting can be used if you have textures with transparency, but do not need the transparency information. This may be the case when using additive blending, for example. Converting the files to RGB on load may then reduce the memory footprint and/or lead to some optimization in terms of rendering speed.

Boolean

Value of type ‘Boolean’

Yes

Asset Examples

Basic

Example of a polygon cloud, which is a point cloud where a uniform polygon is used for the shape of the points.

 1local Node = {
 2  Identifier = "RenderablePolygonCloud_Example",
 3  Renderable = {
 4    Type = "RenderablePolygonCloud",
 5    File = asset.resource("../renderablepointcloud/data/dummydata.csv"),
 6    Coloring = {
 7      FixedColor = { 0.8, 0.0, 0.0 }
 8    },
 9    -- Specify the number of sides for the polygon. 3 = triangle, 4 = square,
10    -- 5 = pentagon, 6 = hexagon, and so on
11    PolygonSides = 6
12  },
13  GUI = {
14    Name = "Basic",
15    Path = "/Examples/RenderablePolygonCloud"
16  }
17}
18
19asset.onInitialize(function()
20  openspace.addSceneGraphNode(Node)
21end)
22
23asset.onDeinitialize(function()
24  openspace.removeSceneGraphNode(Node)
25end)