Last Modified: 10/31/98
[Previous] [Home] [Next]

(R561) 3D Animation Using VRML


Credit: Mulchaey et al (ST Sci/UMD/NASA)

VRML, which stands for "Virtual Reality Modeling Language", is a significant, although still very immature, attempt at providing full 3D interactive graphics on the Web. This technology allows you to create static or animated 3D models that let you move about the scene, view it from many different angles and distances, enter inside objects, and control the direction of lighting and cameras.

The technology is immature in that many VRML scenes cause your browser to crash, many of them fail even to load, the specifications of the language are changing, and the technology for real-time realistic 3D texture mapped graphics is still some time in the future. Nevertheless, the technology even in its present form can perform striking and also useful displays.

VRML graphics can be created in one of two ways: by hand or by the automatic conversion of the output from a 3D modelling package to a file of VRML statements. Simple models, such as 3D surfaces, or 3D scattergrams, both of which greatly benefit from the ability to view a display from many different angles, can easily be created by hand. But complex scenes, with sophisticated geometries and texture maps, are best created in special purpose 3D programs, such as Studio Max, 3D StudioPro, or InfiniD, and then saved in VRML format.

In order to view VRML you need to download the appropriate plugins: one such site is Download VRML which works for MS Internet Explorer.

Examples

Here is a tiny example of a hand made VRML program named zz-sphere.wrl (note that VRML programs end in the extension ".wrl"):
#VRML V1.0 ascii
Separator{
    Sphere { radius 5 }
    Translation { translation 5 5 5 }
    Cube{ width 3 height 3 depth 3 }              
}

Here is a similar but larger example which adds color to the previous one:

#VRML V2.0 utf8
Transform {
  children [
    NavigationInfo { headlight FALSE } # Add light

    DirectionalLight {        # First child
        direction 0 0 -1      # Light illum. scene
    }

    Transform {               # 2nd child-red sphere
      translation 3 0 1
      children [
        Shape {
          geometry Sphere { radius 2.3 }
          appearance Appearance {
            material Material { diffuseColor 1 0 0 } 
         }
        }
      ]
    }

    Transform {               # 3rd child-blue box 
      translation -2.4 .2 1
      rotation     0 1 1  .9
      children [
        Shape {
          geometry Box {}
          appearance Appearance {
            material Material { diffuseColor 0 0 1 } 
         }
        }
      ]
    }

  ] # end of children for world
}
and here are several good sites you can view on the web: A Spanish site , A Physics Site (be sure to select VRML 2.0).

[Previous] [Home] [Next]