RenderableSphereImageOnline
Inherits Renderable
Shows a sphere with an image provided by an online URL. The image will be downloaded when the Renderable is added to a scene graph node. To show a sphere with an image from a local file, see RenderableSphereImageLocal.
Per default, the sphere uses an equirectangular projection for the image mapping and hence expects an equirectangular image. However, it can also be used to show fisheye images by changing the TextureProjection.
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
A URL to an image to use as a texture for this sphere. The image is expected to be an equirectangular projection. |
|
Value of type ‘String’ |
No |
|
Controls the blending function used to calculate the colors of the sphere with respect to the opacity. |
|
In list { Default, Additive, Polygon, Color Adding } |
Yes |
|
Color map / Transfer function to use if |
|
Value of type ‘File’ |
Yes |
|
Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere. |
|
Value of type ‘Boolean’ |
Yes |
|
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. |
|
Value of type ‘Boolean’ |
Yes |
|
Enables/Disables the fade in and out effects. |
|
Value of type ‘Boolean’ |
Yes |
|
Determines whether this object will be visible or not. |
|
Value of type ‘Boolean’ |
Yes |
|
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. |
|
In range: ( 0, 1) |
Yes |
|
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. |
|
In range: ( 0, 1) |
Yes |
|
If true, mirror the texture along the x-axis. |
|
Value of type ‘Boolean’ |
Yes |
|
This value determines the opacity of this renderable. A value of 0 means completely transparent. |
|
In range: ( 0, 1) |
Yes |
|
Specifies whether the texture is applied to the inside of the sphere, the outside of the sphere, or both. |
|
In list { Outside, Inside, Both } |
Yes |
|
A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker rendering step. |
|
In list { Background, Opaque, PreDeferredTransparent, Overlay, PostDeferredTransparent, Sticker } |
Yes |
|
The number of segments that the sphere is split into. |
|
Greater or equal to: 4 |
Yes |
|
The radius of the sphere in meters. |
|
Greater than: 0 |
Yes |
|
A single tag or a list of tags that this renderable will respond to when setting properties. |
|
Value of type ‘Table’, or Value of type ‘String’ |
Yes |
|
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. |
|
In list { Equirectangular, Angular Fisheye } |
Yes |
|
The type of the renderable. |
|
Value of type ‘String’ |
Yes |
|
Used to toggle color map on or off for the sphere. Mainly used to transform grayscale textures from data into color images. |
|
Value of type ‘Boolean’ |
Yes |
Inherited members from Renderable
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
Decides if the object should be dimmed (i.e. faded out) when the camera is in the sunny part of an atmosphere. |
|
Value of type ‘Boolean’ |
Yes |
|
Determines whether this object will be visible or not. |
|
Value of type ‘Boolean’ |
Yes |
|
This value determines the opacity of this renderable. A value of 0 means completely transparent. |
|
In range: ( 0, 1) |
Yes |
|
A value that specifies if the renderable should be rendered in the Background, Opaque, Pre-/PostDeferredTransparency, Overlay, or Sticker rendering step. |
|
In list { Background, Opaque, PreDeferredTransparent, Overlay, PostDeferredTransparent, Sticker } |
Yes |
|
A single tag or a list of tags that this renderable will respond to when setting properties. |
|
Value of type ‘Table’, or Value of type ‘String’ |
Yes |
|
The type of the renderable. |
|
Value of type ‘String’ |
Yes |
Asset Examples
Basic
This example shows a sphere that is covered with an image which is retrieved from an online URL. The image will be stretched over the entire sphere as an equirectangular projection.
1local Node = {
2 Identifier = "RenderableSphereImageOnline_Example",
3 Renderable = {
4 Type = "RenderableSphereImageOnline",
5 URL = "http://data.openspaceproject.com/examples/renderableplaneimageonline.jpg"
6 },
7 GUI = {
8 Name = "RenderableSphereImageOnline - Basic",
9 Path = "/Examples"
10 }
11}
12
13
14asset.onInitialize(function()
15 openspace.addSceneGraphNode(Node)
16end)
17
18asset.onDeinitialize(function()
19 openspace.removeSceneGraphNode(Node)
20end)
Fisheye Mapping
This example shows a sphere that is covered with an image which is retrieved from an online URL and mapped to the sphere using Angular Fisheye projection. The image will cover half of the sphere.
1local Node = {
2 Identifier = "RenderableSphereImageOnline_Example_FisheyeMapping",
3 Renderable = {
4 Type = "RenderableSphereImageOnline",
5 URL = "http://data.openspaceproject.com/examples/renderableplaneimageonline.jpg",
6 TextureProjection = "Angular Fisheye",
7 -- Set orientation to also render the inside of the sphere (which is the correct view
8 -- for a fisheye/fulldome image)
9 Orientation = "Both"
10 },
11 GUI = {
12 Name = "RenderableSphereImageOnline - Fisheye Mapping",
13 Path = "/Examples"
14 }
15}
16
17
18asset.onInitialize(function()
19 openspace.addSceneGraphNode(Node)
20end)
21
22asset.onDeinitialize(function()
23 openspace.removeSceneGraphNode(Node)
24end)