The VRML v2.0 World Saver plugin (vrmlout.p) works from Layout with 3 separate modules, one for saving VRML objects, one for setting VRML characteristics associated with particular objects in a scene, and one for saving the current scene as a VRML 2.0 World. The VRML output complies with the final 2.0 Specification.
Making VRML worlds is as easy as loading an appropriate LW scene, and selecting the SceneToVRML plugin. Enter a name for the VRML scene, and a directory for the VRML objects. The plugin will automatically create objects in this directory as needed. You can also create the objects individually using the ObjectToVRML plugin. Objects in your LW scene which had motion keyframes will be given linear motion keys in the VRML file, through a "MotionInterpolator" node. The 'End Behavior' set for the LW motion has a critical influence on the VRML behavior of an object: If the end behavior is set to 'Reset', the motion will begin when the world is loaded, and keep on playing. 'Stop' and 'Repeat' end behaviors result in an animation which, when triggered, either runs to completion, or loops forever. The default triggering is a click(TouchSensor) on the object. In the case of 'Stop' every click causes the animation to run from the beginning, whether it has completed its motion or not. Currently the 'TouchSensor' switch is placed on the highest-level animated object in a heirarchy, and triggers the animation of all the children simultaneously (as one would expect).
Another Layout plugin which is useful for VRML world creation is comment.p. This plugin adds comments to LW Scene files, on an object-by-object basis. The SceneToVRML plugin will interpret some of these comments as specific instructions for generating that object's VRML. Comments should be formatted as <Tag>=<value> where the Tag is one of the following:
Object Tag Name |
Usage |
Description |
---|---|---|
URL |
URL=<url> (URL=""http://etc.") |
Item URL, overrides object and children's URLs |
SOUND |
SOUND=<url> [<volume> <loop?> ] |
Sounds can be added to objects. Currently these are triggered with any animation. |
TOUCH |
TOUCH= |
Mouse over object( mouse grope) |
PROXIMITY |
PROXIMITY=W H D |
Trigger if viewer enters active region (WxHxD) |
VISIBILITY |
VISIBILITY= |
Trigger when viewer sees object. |
INCLUDE |
INCLUDE=<filename> |
Dump contents of file directly into output |
IGNORE |
IGNORE= |
Skip this object and its children. |
TRIGGER |
TRIGGER=<object> |
Other object for sensor |
VRML |
VRML=nodeName{ node fields} |
Node creator, dump node from comment into file |
LABEL |
LABEL=<text> |
Create Text Node |
*BILLBOARD |
BILLBOARD= |
Object turns to face viewer |
SEQUENCE |
SEQUENCE= <loop?> <autostart?> |
Morph animation from sequence of objects named like 0bj001.lwo, etc. (Requires internal objects) |
*LOD |
LOD= |
Level of Detail node |
Camera Tag Name |
Usage |
Description |
NAVIGATE |
NAVIGATE=<type> |
NavigationInfo Type= NONE, WALK, EXAMINE, or FLY |
HEADLIGHT |
HEADLIGHT= |
NavigationInfo Headlight on if present |
Light Tag Name |
Usage |
Description |
TRIGGER |
TRIGGER=<object> |
Object with switch for light |
* Not implemented in this version... Still
Download the VRML v2.0 World Saver plugin (v1.0 Beta 9) for:
Plugin Version 1.0 Beta 9 History Log
Before you can view any of your VRML creations, you'll need to get a VRML 2.0 Browser.
Now you can check out some simple VRML 2.0 Examples.
Morphing in VRML uses a CoordinateInterpolator node which requires that an object's points be available for ROUTEs in the scene. The current method of loading objects via Inline nodes does not permit this. The correct method, using EXTERNPROTO is barely supported by browsers, although the line is output in the VRML as a comment. A workaround is to paste the object's PROTO definition from the object file directly into the scene, or turn off the external objects option!
VisibilitySensor nodes are not currently supported by any browsers I've seen.
Avatar size is currently based on the layout grid size.