Staf14 exercice 4 : a VRML exercise


The Space


  1. Goals
  2. Conceptualization
  3. Realization
    1. The Moonbase
    2. The Plateform
    3. The Teleporter
    4. The Jumper
    5. The Lander
    6. The Hyper-Signpost
    7. R2D"
  4. Some tough bits
  5. Afterthoughts
  6. References

1. Goals

My goals for this exercise were besides learning VRML : With these goals on mind I built a sort of Virtual Environnement (VE) that is not yet fully achieved but already containing a scratch of my 3D personnal homepage and my STAF work homepage.

2. Conceptualization

Whenever I was working on the scene I always tried to keep in mind the following topics, and what impact each elaboration and new object will have regarding them.

A. Places : They all have specifities mostly like what can you expect to find in a given place hierarchy? and how to reach different places? B. Navigation in space : C. Information Sources : The 'visitor' has the following information sources when exploring this VE: D. Color Code : The objects of the scene, i.e. the teleporter, the jumper of the hyper-signpost, use whenever necessary the following color code which was choosed arbitrarily :

3. Realization

The following objects are implemented in this VE :

The Moon Base (moonbase.wrl)
Look : This place looks like an asteroid or a small moon with an artificial atmosphere on top (under a red force field).
Use : The Moonbase is the top containing object in this VE. It is the place were you want to put the base of the VE. For the moment, the only way to enter or the leave it is to take a
jumper, a teleporter or a Viewpoint.
Technical suff : 'moonbase.wrl' is an EXTERNPROTO with a field named mbtexture were you can specify the texture of the moonbase. The asteroid and the force field are both an extrusion node of a simplified circle. The smooth look is the result of a creaseAngle=1 of the extrusion node.

The Plateform (plateform.wrl)
Look : It's an artificial floating plateform with a red force field. An antigravity engine enables it to float.
Use : The plateform is a second order containing object, after the
moonbase. It enables to group things with a common attribute together. As for the moonbase, the only way to enter or the leave it is to take a jumper, a teleporter or a Viewpoint.
Technical suff : 'plateform.wrl' is an EXTERNPROTO with yet no field specified. It uses a ColorInterpolator routed to a TimeSensor to produce a pulsating glowing effect of the antigravity engine.

The Teleporter (teleport.wrl)
Look : Some sort of phone cabine with a red teleport field and the name of the destination on top. A low humming sound emanates from the teleport field.
Use : A teleporter can either be used to teleport yoursefl to another page or (if specified) to open another browser window with a new page. To be teleported you only have to step through the teleport field, or alternatively click on the name of the destination. If the pointing device is pointing on the teleport field you can get a comment of the destination page.
Technical suff : 'teleport.wrl' is an EXTERNPROTO with the following fields :

To make the teleport field device I used a proximitySensor routed to the following vrmlscript code :
DEF TP1 Script {
  field MFString teleport_url IS tpUrl
  field MFString teleport_parameter IS tpParameter
  eventIn SFBool teleport_someone
  url [
    "vrmlscript:
    function teleport_someone() {
    Browser.loadURL(teleport_url,teleport_parameter);
    }",
    "javascript:
    function teleport_someone() {
    Browser.loadURL(teleport_url,teleport_parameter);
    }"
  ]
}
I also used a Switch node routed to a TouchSensor to make the comment text appear and disappear regarding the pointing device actions.

The Jumper (jumper.wrl)
Look : Same as
teleporter but with a blue teleport field.
Use : To go to another interesting place of the scene.
Technical suff : The same as the teleporter but for scene internal jumps.

The Lander (lander.wrl)
Look : Basically the lander looks the same as the
jumper or the teleporter but there is no teleport field.
Use : The lander is used to signalize the arrival area of a teleportation or a jump.
Technical suff : 'lander.wrl' is an EXTERNPROTO with the landerPlace (i.e. location of the landing area) and landerName (i.e. identification of the landing area) field. Nothing special to mention if it is the fact that the Viewpoint (equivalent to the arrival area) has to be specified separately.

The Hyper-Signpost (hyperbase.wrl & hyperobject.wrl)
Look : The hyper-signpost is quite an abstract representation of its real life inspiration object.
Use : The hyper-signpost can be used either for internal or external navigation. It could eventually be used as an information holding device without any browsing capabilities if only the comment part was used without specifying any URL.
Technical suff : In fact a hyper-signpost is composed of 2 different EXTERNPROTO's, i.e. 'hyperbase.wrl' (the general identification part of the hyper-signpost with a field hoName for the name of the hyper-signpost) and 'hyperobject.wrl which is a specific information holding device with hyperlinking capabilities, with the following fields :

If the pointing device is passed over the 'hyperobject' a comment appears and stays as long the pointing device is over the object. This property is managed by Switch node routed with a TouchSensor (like the teleport and jumper comments).

DEF SW_hoComment Switch {        # HyperObject comment Switch node
  whichChoice 0
  choice [
    Group {}                     # choice 0 (empty)
    Transform {                  # choice 1 (the comment text)
      translation -.5 .4 0
      children Shape {
        appearance Appearance {
          material Material {
            diffuseColor 1 1 1
            shininess .7
          }
        }
        geometry Text {
          fontStyle FontStyle {
            justify ["END","BEGIN"]
            size .3
            family "SANS"
          }
          string IS hoComment
        }
      }
    }
  ]
}


R2D2 (r2d2.wrl)
Look : The geometry of this robot was inspired by George Lucas R2D2 in the movie Star Wars.
Use : My intention behind building R2D2 is to make a guide out of him who can be called whenever used. One day he could also be an avatar in 3D Moo. But as he is now the robot is there only for fun... check out his moves while he's whistling :)
Technical suff : R2D2 is composed of 2 parts. The trunk (belly and head) and the legs. I used key frame animation for different movements of R2D2. The head can rotate around the neck while the whole trunk can bend forwards and backwards in predefined movements. He can also make a little dance. The red button on the top of the head activates a holographic projection (a Switch node handles this animation) which could be useful for presenting to the 'visitor' a navigation-interface.


4. Some tough bits

  1. I spent some hours struggling with a script for the teleporter and the jumper 'walk-through-and-fly-away' property. Finally it was only a syntax error :)
  2. Another tough bit was to grasp the general idea of the routing, but once you understand it's easy.
  3. I also lost a lot of time trying to improve rendering with LOD's everywhere (whenever possible).

5. Afterthoughts

None yet.

6. References

The only reference book I used was :

| top of page |

Last changed by David Ott on the 16th mai 1998