Introduction to 3D Graphics and VRML

[ Previous | Index | Next ]


Materials (cont...)

VRML Material Example

#VRML V1.0 ascii

Material {
  ambientColor  0.2 0.5 0.5    # RGB Color
  diffuseColor  0.2 0.8 0.8    # RGB Color
  specularColor 0   0   0      # RGB Color
  emissiveColor 0   0   0      # RGB Color
  shininess     0.2            # Float
  transparency  0              # Float
}

Cube     { depth 2 height 2 width 2 }

VRML Texture Example

#VRML V1.0 ascii

Texture2 {
  filename "surface.gif"       # String
  wrapS    REPEAT              # Enum(REPEAT or CLAMP)
  wrapS    REPEAT              # Enum(REPEAT or CLAMP)
}

Cube     { depth 2 height 2 width 2 }

Author: Michael Louka (mlouka@sn.no)
Last Updated: 19 November 1996