3.2 Levels of Details

In order to make scenes more efficiently rendered you can display the same object at different levels of detail with the =$>$LOD node. The principle is very simple: If you look at an object from a certain distance it does not appear the same, e.g. a house can be just a cube. So instead of building up the full house as soon as the wrl file is loaded we just display a simple cube for this house (if and when the ``user is far away'' ). Only when he get's closer we start rendering the object in fuller details.

The structure of a LOD with three levels of details must be something like the following example. In the ``center'' field you have to specify the center of your objects (which is at 0 0 0 in this case). The ``range field'' tells the browser what level of detail to display in function of the distance of the camera (your point of view). The first number in the list refers to the first level (the most detailed one), the next to next detail level and so on.


LOD {
    center      0.0 0.0 0.0
    range       [10, 15]
    level       [
                 # LEVEL III: Detail
                 Inline {
                    url "inter-persons-2.wrl"
                 }

                 # LEVEL II: The bunch as a whole
                 Anchor {
                       ...... }

                 # LEVEL III: ....
                 Shape { .... }

Note, that you completely can hide away an object by specifying an empty node as the last level with something like:


 Group { children [ ] }
Also, remember that inlined worlds are only loaded on need (at least in Cosmo Win Beta3a). Both features are useful for building larger scenes.

This example shows Tecfa People at three levels of details: (1) as an uninteresting box if you look at it from far away, (2) as a group and as (3) individuals if you get closer. Just walk FORWARD to see the effect !

Example 3.2.1   Tecfa People LOD

VRML: ../examples/inter/inter-LOD-1.wrl
Source: ../examples/inter/inter-LOD-1.wrl

Of course, this example needs some tuning. First of all, distances should be bigger to have a smoother ``getting closer'' effect and most of all different levels of detail ought to have more similar shapes and appearance. For a better example see page 52 in ([Hartman et Wernecke, 1996] or visit directly the Tenochtitlan Web Site.

But as the above examples shows, LOD nodes can be used not just levels of details, but different functionality, e.g. the mid-level of detail is an anchor to a group WWW page of people, whereas at the detail level you get anchors to some person's home pages.


D.K.S. - 1999-04-28