Appearance Node

The appearance node specifies what an object will look like. The Appearance node contains three fields:

Appearance { material NULL # SFNode texture NULL # SFNode textureTransform # SFNode }

The material node specifies how light interacts with the object. For instance, to change the specular color of the object you would modify the specularColor field. The texture node specifies a texture for the object and how that texture will be mapped to the object. The textureTransform node specifies how a texture will be rotated or scaled before it is mapped to the surface of the object.

Most of the features of the material and texture nodes are not allways used in a VRML world. The following code simply creates a box with the normal defaults and colors it tan. This may be the only use of the appearance node in many of your objects.

children Shape { appearance Appearance { material Material { diffuseColor 1 0.9 0.7 } } geometry Box {} }