Titania X3D Editor

Bring Colours to Your Life.

Titania v4.3.3

Bring Colours to Your Life.

X3D Reference

Controlling appearance with materials

Motivation

The primitive shapes have a default emissive (glowing) white appearance

You can control a shape's

  • Shading color
  • Glow color
  • Transparency
  • Shininess
  • Ambient intensity

Syntax: Shape

Recall that Shape nodes describe:

  • appearance - color and texture
  • geometry - form, or structure

XML Encoding

Classic Encoding

Syntax: Appearance

An Appearance node describes overall shape appearance

  • material properties - color, transparency, etc.

XML Encoding

Classic Encoding

Syntax: Material

A Material node controls shape material attributes

  • diffuseColor - main shading color
  • emissiveColor - glowing color
  • transparency - opaque or not

XML Encoding

Classic Encoding

Specifying colors

Colors specify:

  • A mixture of red, green, and blue light
  • Values between 0.0 (none) and 1.0 (lots)
Color Red Green Blue Result
White 1.0 1.0 1.0
Red 1.0 0.0 0.0
Yellow 1.0 1.0 0.0
Cyan 0.0 1.0 1.0
Brown 0.5 0.2 0

Syntax: Material

A Material node also controls shape shininess

  • specularColor - highlightcolor
  • shininess - highlightsize
  • ambientIntensity - ambient lighting effects

A sample world using appearance

XML Encoding

Classic Encoding

Summary

The Appearance node controls overall shape appearance

The Material node controls overall material properties including:

  • Shading color
  • Glow color
  • Transparency
  • Shininess
  • Ambient intensity

Cookies and other Technologies

By clicking »Accept« or continuing to use the site, you agree to the use of CREATE3000 and third-party cookies and other similar technologies to enhance your browsing experience, analyze and measure your engagement with our content, and provide more relevant ads on CREATE3000 websites and others. Learn more about cookies. You can withdraw your consent at any time.