Titania X3D Editor

Bring Colours to Your Life.

Titania v4.6.10

Bring Colours to Your Life.

X3D Reference

Controlling shading on coordinate-based geometry


  • When shaded, the faces on a shape are obvious
  • To create a smooth shape you can use a large number of small faces
    • Requires lots of faces, disk space, memory, and drawing time
  • Instead, use smooth shading to create the illusion of a smooth shape, but with a small number of faces

Controlling shading using the crease angle

By default, faces are drawn with faceted shading.

You can enable smooth shading using the creaseAngle field for:

Selecting crease angles

A crease angle is a threshold angle between two faces:

  • If face angle >= crease angle, use facet shading
  • If face angle < crease angle, use smooth shading

Using normals

A normal vector indicates the direction a face is facing

  • If it faces a light, the face is shaded bright

By default, normals are automatically generated by the X3D browser:

  • You can specify your own normals with a Normal node
  • Usually automatically generated normals are good enough

Syntax: Normal

A Normal node contains a list of normal vectors that override use of a crease angle.

XML Encoding

Classic Encoding

Normals can be given for IndexedFaceSet and ElevationGrid nodes.

Syntax: IndexedFaceSet

An IndexedFaceSet geometry node creates geometry out of faces:

  • normal - list of normals
  • normalIndex - selects normals from list
  • normalPerVertex - control normal binding

XML Encoding

Classic Encoding

Controlling normal binding for face sets

The normalPerVertex field controls how normal indexes are used

  • FALSE: one normal index to each face (ending at -1 coordinate indexes)
  • TRUE: one normal index to each coordinate index of each face (including -1 coordinate indexes)

Syntax: ElevationGrid

An ElevationGrid geometry node creates terrains:

  • normal - list of normals
  • normalPerVertex - control normal binding
  • Always binds one normal to each grid point or square, in order

XML Encoding

Classic Encoding

Controlling normal binding for elevation grids

The normalPerVertex field controls how normal indexes are used (similar to face sets):

  • FALSE: one normal to each grid square
  • TRUE: one normal to each height for each grid square

Syntax: NormalInterpolator

A NormalInterpolator node describes a normal set:

  • keys - key fractions
  • keyValues - key normal lists (X,Y,Z lists)
  • Interpolates lists of normals, similar to the CoordinateInterpolator

XML Encoding

Classic Encoding

Typically route into a Normal node's set_vector input.


  • The creaseAngle field controls faceted or smooth shading
  • The Normal node lists normal vectors to use for parts of a shape
    • Used as the value of the normal field
    • Normal indexes select normals to use
  • Normals override creaseAngle value
  • The normalPerVertex field selects normal per face/grid square or normal per coordinate
  • The NormalInterpolator node converts times to normals

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.

create3000.de is going to be shut down next year, but we have a new clean and slick web site for you, go to new X_ITE web site, consider updating your X_ITE URL's, or go to new Titania web site or continue reading.