Post

TwoSidedMaterial

TwoSidedMaterial

Overview

TwoSidedMaterial specifies surface rendering properties for associated geometry nodes, for outer (front) and inner (back) sides of polygons. Material attributes are used by the X3D lighting equations during rendering.

The TwoSidedMaterial node belongs to the Shape component and requires at least level 4, its default container field is material. It is available from X3D version 3.2 up to 4.0.

Deprecated: This node is deprecated as of X3D version 4.0. Future versions of the standard may remove this node.

Hierarchy

1
2
3
4
+ X3DNode
  + X3DAppearanceChildNode
    + X3DMaterialNode
      + TwoSidedMaterial

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, out] separateBackColor FALSE

separateBackColor determines whether separate Material values are used for back faces.

Warning

  • Backface Material values are ignored unless you set separateBackColor=’true’

SFFloat [in, out] ambientIntensity 0.2 [0,1]

How much ambient omnidirectional light is reflected from all light sources. Interchange profile

Hint

  • This field may be ignored, applying the default value regardless.

SFColor [in, out] diffuseColor 0.8 0.8 0.8 [0,1]

How much direct, angle-dependent light is reflected from all light sources.

Hint

SFColor [in, out] specularColor 0 0 0 [0,1]

Specular highlights are brightness reflections (example: shiny spots on an apple). Interchange profile

Hint

  • This field may be ignored, applying the default value regardless.

SFColor [in, out] emissiveColor 0 0 0 [0,1]

How much glowing light is emitted from this object.

Hints

  • EmissiveColors glow even when all lights are off.
  • Reset diffuseColor from default (.8 .8 .8) to (0 0 0) to avoid washout.
  • Only emissiveColor affects IndexedLineSet, LineSet and PointSet.

Warning

  • Bright emissiveColor values can wash out other colors and some textures.

SFFloat [in, out] shininess 0.2 [0,1]

Lower shininess values provide soft specular glows, while higher values result in sharper, smaller highlights. Interchange profile

Hint

  • This field may be ignored, applying the default value regardless.

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

How “clear” an object is: 1.0 is completely transparent, 0.0 is completely opaque. Interchange profile

Hint

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

SFFloat [in, out] backAmbientIntensity 0.2 [0,1]

How much ambient omnidirectional light is reflected from all light sources. Interchange profile

Hint

  • This field may be ignored, applying the default value regardless.

SFColor [in, out] backDiffuseColor 0.8 0.8 0.8 [0,1]

How much direct, angle-dependent light is reflected from all light sources.

Hint

SFColor [in, out] backSpecularColor 0 0 0 [0,1]

Specular highlights are brightness reflections (example: shiny spots on an apple). Interchange profile

Hint

  • This field may be ignored, applying the default value regardless.

SFColor [in, out] backEmissiveColor 0 0 0 [0,1]

How much glowing light is emitted from this object.

Hints

  • EmissiveColors glow even when all lights are off.
  • Reset diffuseColor from default (.8 .8 .8) to (0 0 0) to avoid washout.
  • Only emissiveColor affects IndexedLineSet, LineSet and PointSet.

Warning

  • Bright emissiveColor values can wash out other colors and some textures.

SFFloat [in, out] backShininess 0.2 [0,1]

Lower shininess values provide soft specular glows, while higher values result in sharper, smaller highlights. Interchange profile

Hint

  • This field may be ignored, applying the default value regardless.

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

How “clear” an object is: 1.0 is completely transparent, 0.0 is completely opaque. Interchange profile

Hint

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

Advice

Hints

Warnings

  • Requires X3D profile='Full' or else include <component name='Shape' level='4'/>
  • Corresponding geometry within the parent Shape must have solid=’false’ for two-sided rendering, otherwise no reverse-side back geometry is displayed.
  • X3D4 Architecture has deprecated TwoSidedMaterial, preferring use of child backMaterial node in parent Appearance.

Example

See Also

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