Post

Background

Overview

Background simulates ground and sky, using vertical arrays of wraparound color values. Background can also provide url addresses for backdrop textures on all six sides.

The Background node belongs to the EnvironmentalEffects component and requires at least level 1, its default container field is children. It is available since VRML 2.0 and from X3D version 3.0 or higher.

Hierarchy

1
2
3
4
5
+ X3DNode
  + X3DChildNode
    + X3DBindableNode
      + X3DBackgroundNode
        + Background

Fields

SFNode [in, out] metadata NULL [X3DMetadataObject]

Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.

Hint

SFBool [in] set_bind

Input event set_bind=true makes this node active, input event set_bind=false makes this node inactive. Thus setting set_bind true/false will pop/push (enable/disable) this node.

Hint

  • Paired node operations can be established by connecting set_bind and isBound fields of corresponding bindable nodes.

Warning

  • It is an error to define this transient inputOnly field in an X3D file, instead only use it a destination for ROUTE events.

MFString [in, out] frontUrl [ ] [URI]

Image background panorama between ground/sky backdrop and scene’s geometry.

Hints

  • MFString arrays can have multiple values, so separate each individual string by quote marks “https://www.web3d.org” “https://www.web3d.org/about” “etc.”
  • Alternative XML encoding for quotation mark “ is " (which is an example of a character entity).
  • Can replace embedded blank(s) in url queries with %20 for each blank character. Interchange profile
  • This field may be ignored, applying the default value regardless.

Warning

  • Strictly match directory and filename capitalization for http links! This is important for portability. Some operating systems are forgiving of capitalization mismatches, but http/https url addresses and paths in Unix-based operating systems are all case sensitive and intolerant of uppercase/lowercase mismatches.

MFString [in, out] backUrl [ ] [URI]

Image background panorama between ground/sky backdrop and scene’s geometry.

Hints

  • MFString arrays can have multiple values, so separate each individual string by quote marks “https://www.web3d.org” “https://www.web3d.org/about” “etc.”
  • Alternative XML encoding for quotation mark “ is " (which is an example of a character entity).
  • Can replace embedded blank(s) in url queries with %20 for each blank character. Interchange profile
  • This field may be ignored, applying the default value regardless.

Warning

  • Strictly match directory and filename capitalization for http links! This is important for portability. Some operating systems are forgiving of capitalization mismatches, but http/https url addresses and paths in Unix-based operating systems are all case sensitive and intolerant of uppercase/lowercase mismatches.

MFString [in, out] leftUrl [ ] [URI]

Image background panorama between ground/sky backdrop and scene’s geometry.

Hints

  • MFString arrays can have multiple values, so separate each individual string by quote marks “https://www.web3d.org” “https://www.web3d.org/about” “etc.”
  • Alternative XML encoding for quotation mark “ is " (which is an example of a character entity).
  • Can replace embedded blank(s) in url queries with %20 for each blank character. Interchange profile
  • This field may be ignored, applying the default value regardless.

Warning

  • Strictly match directory and filename capitalization for http links! This is important for portability. Some operating systems are forgiving of capitalization mismatches, but http/https url addresses and paths in Unix-based operating systems are all case sensitive and intolerant of uppercase/lowercase mismatches.

MFString [in, out] rightUrl [ ] [URI]

Image background panorama between ground/sky backdrop and scene’s geometry.

Hints

  • MFString arrays can have multiple values, so separate each individual string by quote marks “https://www.web3d.org” “https://www.web3d.org/about” “etc.”
  • Alternative XML encoding for quotation mark “ is " (which is an example of a character entity).
  • Can replace embedded blank(s) in url queries with %20 for each blank character. Interchange profile
  • This field may be ignored, applying the default value regardless.

Warning

  • Strictly match directory and filename capitalization for http links! This is important for portability. Some operating systems are forgiving of capitalization mismatches, but http/https url addresses and paths in Unix-based operating systems are all case sensitive and intolerant of uppercase/lowercase mismatches.

MFString [in, out] topUrl [ ] [URI]

Image background panorama between ground/sky backdrop and scene’s geometry.

Hints

  • MFString arrays can have multiple values, so separate each individual string by quote marks “https://www.web3d.org” “https://www.web3d.org/about” “etc.”
  • Alternative XML encoding for quotation mark “ is " (which is an example of a character entity).
  • Can replace embedded blank(s) in url queries with %20 for each blank character. Interchange profile
  • This field may be ignored, applying the default value regardless.

Warning

  • Strictly match directory and filename capitalization for http links! This is important for portability. Some operating systems are forgiving of capitalization mismatches, but http/https url addresses and paths in Unix-based operating systems are all case sensitive and intolerant of uppercase/lowercase mismatches.

MFString [in, out] bottomUrl [ ] [URI]

Image background panorama between ground/sky backdrop and scene’s geometry.

Hints

  • MFString arrays can have multiple values, so separate each individual string by quote marks “https://www.web3d.org” “https://www.web3d.org/about” “etc.”
  • Alternative XML encoding for quotation mark “ is " (which is an example of a character entity).
  • Can replace embedded blank(s) in url queries with %20 for each blank character. Interchange profile
  • This field may be ignored, applying the default value regardless.

Warning

  • Strictly match directory and filename capitalization for http links! This is important for portability. Some operating systems are forgiving of capitalization mismatches, but http/https url addresses and paths in Unix-based operating systems are all case sensitive and intolerant of uppercase/lowercase mismatches.

MFFloat [in, out] skyAngle [ ] [0,π]

The angle array values increase from 0.0 zenith (straight up) to π/2=1.570796 (horizon) to π=3.14159 (nadir).

Hints

Warnings

  • You must have one more skyColor value than skyAngle values.
  • Colors at skyAngle=0 are ignored. Interchange profile

MFColor [in, out] skyColor 0 0 0 [0,1]

Color of the sky at various angles on the sky sphere. First value is color of sky at 0.0 radians representing the zenith (straight up).

Hints

  • Setting the same color at two consecutive angles produces a solid color band.
  • Only one color might be rendered, others can be ignored.
  • X3D Scene Authoring Hints, Color

Warning

  • You must have one more skyColor value than skyAngle values. Interchange profile

MFFloat [in, out] groundAngle [ ] [0,π/2]

The angle array values increase from 0.0 nadir (straight down) to π/2=1.570796 (horizon).

Hints

Warnings

  • You must have one more groundColor value than groundAngle values.
  • Colors at groundAngle=0 are ignored. Interchange profile

MFColor [in, out] groundColor [ ] [0,1]

Color of the ground at the various angles on the ground partial sphere. First value is color of ground at 0.0 radians representing the nadir (straight down).

Hints

  • Setting the same color at two consecutive angles produces a solid color band.
  • This field may be ignored, applying the default value regardless.
  • X3D Scene Authoring Hints, Color

Warning

  • You must have one more groundColor value than groundAngle values. Interchange profile

SFFloat [in, out] transparency 0 [0,1]

How “clear” the background is, allows underlying page to show through: 1.0 is completely transparent, 0.0 is completely opaque. Interchange profile

Hint

  • transparency < .5 opaque, transparency > .5 transparent.

SFBool [out] isBound

Event true sent when node becomes active, event false sent when unbound by another node.

Hint

  • Paired node operations can be established by connecting set_bind and isBound fields of corresponding bindable nodes.

Warning

  • It is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.

SFTime [out] bindTime

Event sent when node becomes active/inactive.

Warning

  • It is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.

Advice

Hints

Warning

Example

See Also

This post is licensed under CC BY 4.0 by the author.