Titania X3D Editor

Bring Colours to Your Life.

Titania v4.3.3

Bring Colours to Your Life.

X3D Reference

Building a X3D world

X3D file structure

X3D files contain:

  • The file header
  • Comments - notes to yourself
  • Nodes - nuggets of scene information
  • Fields - node attributes you can change
  • Values - attribute values
  • more. . .

A sample X3D file

XML Encoding

Classic Encoding

Understanding the header

#X3D V3.3 utf8 

  • #X3D: File contains X3D text
  • V3.3 : Text conforms to version 3.3 syntax
  • utf8 : Text uses UTF8 character set

Understanding UTF8

  • utf8 is an international character set standard
  • utf8 stands for:
    • UCS (Universal Character Set) Transformation Format, 8-bit
    • Encodes 24,000+ characters for many languages
    • ASCII is a subset

Using comments

# A Cylinder

  • Comments start with a number-sign (#) and extend to the end of the line

Using nodes

XML Encoding

Classic Encoding

  • Nodes describe shapes, lights, sounds, etc.
  • Every node has:
    • A node type (Shape, Cylinder, etc.)
    • A pair of curly-braces
    • Zero or more fields inside the curly-braces

Using node type names

Node type names are case sensitive:

  • Each word starts with an upper-case character
  • The rest of the word is lower-case

Some examples:

Appearance, Cylinder, Material, Shape

Using fields and values

XML Encoding

Classic Encoding

  • Fields describe node attributes

Every field has:

  • A field name (height, radius, etc.)
  • A data type (float, integer, etc.)
  • A default value
  • Different node types have different fields
  • Fields are optional
    • A default value is used if a field is not given
  • Fields can be listed in any order
    • The order doesn't affect the node


  • The file header gives the version and encoding
  • Nodes describe scene content
  • Fields and values specify node attributes
  • Everything is case sensitive