[CESCG logo] Local Navigation Systems

Stepán Kment

xkment@cslab.felk.cvut.cz
Computer Graphics Group
Czech Technical University
Prague, Czech Republic
[CESCG logo]

Experience with VRML - building interactive world

vchod.jpg (6946 bytes)

Example: Final VRML scene

VRML nodes can be found in 3DS MAX in following location: VRMLmenu.gif (2296 bytes)
...and this is a list of available helpers: VRMLpopup.GIF (1972 bytes)

 

How to setup VRML player's NavigationInfo node

navinfo.gif (183 bytes)
navigationicon.gif (415 bytes)
NavigationInfo

{
type "NONE"
headlight FALSE
visibilityLimit 0 # infinite; if >0, then all farer than limit is not displayed
}

Rendering of the 3D scene is a very processor-intensive task and without appropriate hardware acceleration even very powerful machine (for instance Pentium II / 266 MHz with Matrox Millenium II 2D graphics adapter I have been working on) can't render larger scenes in more than 10fps in a small window (full-screen is absolutely unusable). That is why we need to optimise our VRML world.

Turning collision detection off

Collision

{
collide FALSE
children [...]
}

Because we defined animation paths with care in 3DS Max, we don't need to worry about collisions with walls or other objects. So it is very useful to turn off the collision detection, we again save lots of CPU time. Just copy entire scene into the children field of this grouping node and set field collide to FALSE.

Placing text in the scene

Text

{
string "TEXT"
fontstyle

{
family "SANS" #face of the font
size 20 #size of the font in space
}

}

I did not manage to export text object from 3DS Max dierctly. The problem is that one can, of course, create text in 3DS Max as a 2D shape extruded to 3D, but when one exports this object, he or she gets large list of vertices and faces. Max simply can't (at least this version of export plug-in) export Text node and replaces it with extremely large list - the text is then defined as any other complex object. I found simple, but still not perfect, workaround. First place the box or some other primitive in the Max's scene where the text should be and give it name - for instance TEXTBOX. Export the scene to the VRML file and load that file in text editor. Now search for TEXTBOX word. You should see something like this:

DEF TEXTBOX Transform {
translation 0 0 0
rotation 0 0 0 0
scale 1 1 1
children [
    Transform {
        translation 0 0 0
        children [
            Shape {
                appearance Appearance {
                    material Material {diffuseColor 0.6 0.8941 0.6}
                }
            geometry Box { size 173.9 60.87 85.02 }
          }
        ] }
    ]
}

now replace geometry field of the Shape node with the TEXT node:

Shape {
    appearance Appearance {
        material Material {diffuseColor 0.6 0.8941 0.6}
        }
   geometry Text {
        string "TEXT!!!"
        fontStyle FontStyle {family "SANS" size 30}
    }
}

Now there should be your text somewere around the previous place of the box. But it can be rotated or translated, also experiment with size field of FontStyle node. The only advantage is that the text object is somewhere around the place, where it should be. Of course, do NOT use export of font objects directly from 3DS Max, numbers of faces and vertices would increase catastrophically.

Examples: Box | Replaced text

How to build "navigation web" in the scene

This is very important part of scene design. If navigation works badly or doesn't work at all, the system becomes unusable because the user interface is hidden. First we need to decide, where we can go in the scene and each place should be linked to the others at least in one direction. Connections are built in 3DS Max using standard free cameras.

Refining the interaction

Now we have created basic navigation, we can refine it a bit. Note that the WRL file is now changed and any export from 3DS Max to this file would overwrite the changes!

Adding real views of the scene

VRML2 supports technology QuickTime VR (first introduced by Apple Inc.). It is based on a very simple idea: the user is put in the centre of big sphere, from where he can not move to the surface of the sphere. On the sphere there is painted surrounding area and because it is not displayed in stereovision, it is realistic vision of the scene.

The environment rendered by VRML browser consists of up to six unique pictures, which show surrounding scene from front, left, right, back, top and bottom (it is not necessary to define all six pictures, for instance we can define only four side pictures and leave top and bottom unset. These pictures can be generated using special 3D modelling tools or one can create them using special software and snapshot or videocamera.

a_LF0000.jpg (5247 bytes) a_FT0000.jpg (5875 bytes) a_RT0000.jpg (5620 bytes)

Examples: Environment 1 | Environment 2 | Cylindrical environment

Adding pictures and texture maps

Important objects should be mapped with textures or at least painted with the different color. Mapping of the surface is done in 3DS Max as normal definition of the object's surface, diffuse map is exported to VRML file. It is also possible to add special partially transparent pictures - it is the only reasonable way how to add flowers or even trees in the scene. For this task we have to have pictures exported in PNG or GIF format with defined transparency. For instance in Adobe Photoshop, transparent colors are set in export plug-in GIF89 export as selected colors of no more than 8-bit palette. In 3DS Max this information is not used for rendering, but in VRML players interpret it correctly. It is also possible to use tiling of the map on an object, so if client computers are powerful, we can snap wall and floor in the building, scan the pictures and map these pictures in the model; because of tiling, these maps can be quite small and then repeated on bigger objects.

Example: Final VRML scene

Index | Previous Topic | Next topic