Shape can appear under any grouping node. Shape can contain an Appearance node and a geometry node (for example one of the primitives Box Cone Cylinder Sphere Text, one of ElevationGrid Extrusion IndexedFaceSet IndexedLineSet LineSet PointSet, or one of the other geometry nodes).

The Shape node belongs to the Shape 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.


+ X3DNode
  + X3DChildNode
    + X3DShapeNode
      + Shape


SFNode [in, out] metadata NULL [X3DMetadataObject]

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


SFBool [in, out] pointerEvents TRUE non standard

pointerEvents defines whether this Shape becomes target for pointer events.

SFBool [in, out] castShadow TRUE

castShadow defines whether this Shape casts shadows as produced by lighting nodes.


  • If the visible field is FALSE, then the Shape does not cast any shadows.
  • If prior X3D3 content is loaded into an X3D4 model, then legacy Shape nodes have shadows set to true.

SFBool [in, out] visible TRUE

Whether or not renderable content within this node is visually displayed.


  • The visible field has no effect on animation behaviors, event passing or other non-visual characteristics.
  • Content must be visible to be collidable and to be pickable.

SFBool [in, out] bboxDisplay FALSE

Whether to display bounding box for associated geometry, aligned with world coordinates.


  • The bounding box is displayed regardless of whether contained content is visible.

SFVec3f [ ] bboxSize -1 -1 -1 [0,∞) or −1 −1 −1

Bounding box size is usually omitted, and can easily be calculated automatically by an X3D player at scene-loading time with minimal computational cost. Bounding box size can also be defined as an optional authoring hint that suggests an optimization or constraint.


SFVec3f [ ] bboxCenter 0 0 0 (-∞,∞)

Bounding box center accompanies bboxSize and provides an optional hint for bounding box position offset from origin of local coordinate system.


SFNode [in, out] appearance NULL [X3DAppearanceNode]

Single contained Appearance node that can specify visual attributes (such as material, texture, fillProperties and lineProperties) applied to corresponding geometry.

SFNode [in, out] geometry NULL [X3DGeometryNode]

Single contained geometry node that is rendered according to corresponding appearance.



  • Shape
  • The Shape design pattern to collect appearance and geometry together is fundamentally the same for many types of 3D graphics software and hardware.
  • For advanced extensibility, authors can substitute a type-matched ProtoInstance node (with correct containerField value) for contained node content.
  • X3D Architecture 12.2.1 Shape nodes
  • X3D Architecture 17.2.2 Lighting model
  • Apply containerField='shape' if parent node is CADFace.

See Also

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