temp

TAPESTRY: The Art of Representation and Abstraction

The Web: VRML


What's it all About?

VRML is a cross-platform, application-independent file format. Many applications can be sued to create models and save them to the VRML format, but there is no definitive VRML application that provides access to all VRML features. Thus, no matter where your data starts, it makes some sense to learn about the "native" VRML representation so that you can make minor fixes or modifications directly to the VRML file.

Nodes

VRML describes the model in a series of lumps, or nodes, that look something like this: As with HTML, white space (spaces, carriage returns, tabs, etc.) aren't important. Note that the brackets and braces are balanced. All edits of the VRML file must be done such that this remains true.

Backgrounds

The "Node" example above represents a background node. The number triplets represent RGB color values on a scale of 0 to 1.0. If you wish to add a Background node to your VRML file, insert text such as that above into the VRML before the first node or between any two existing nodes.

Defining and Applying Textures

The modeling application may create textures for you automatically, but you may wish to apply image textures independently of the modeling program. This is easy to do. The following two nodes create the texture using one ImageTexture node and one Appearance node per texture. Having established the texture, you apply it to the model through the Appearance attribute of geometry nodes. Now, look down in the geometry definition for the file. Look for appearance and change the name to that of the Appearance node you created previously.

Establishing Links

form•Z saves the geometry data as a series of "Transform" nodes, such as this (the Transform node shown here has been truncated): To make this into a link analagous to the HTML link <A href="top.html" target=_blank> which opens a new window to show the document (relative URL) "top.html", replace the red text above with the text shown in red below, so that the node reads as follows:

Transparency

The surface characteristics of a VRML object are defined indirectly through use of an Appearance node which is referenced in the Transform node. If you examine a VRML file you'll find references in the Transforms to appearance USE tex_style_14. Elsewhere in the file, you'll find an Appearance definition such as the following: The transparency term sets the surface transparency on a scale of 0 to 1 (with 1 being fully transparent). The texture term refers to a texture definition node (and through it to an image URL).
Last updated: April, 2014

Valid HTML 4.01 Transitional Valid CSS! [report bug]