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.
- begin to explore the possibilities of interactive VRML pages,
- try to do nice to look but as abstract as possible objects, i.e. find the core concept and functionnality of objects and there functions,
- to enjoy the work :)
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 :
- 'The Space' (the global VRML scene),
- 'The Moonbase',
- 'The Plateform',
- 'Outer Space', this place is not yet reachable from the scene because the access object (a sort of Star Gate door) is not yet implemented in the scene, but the outer space will be other VRML homepages.
C. Information Sources : The 'visitor' has the following information sources when exploring this VE:
- the Viewpoints,
- 'The Jumper',
- self control using the browser controls.
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 :
- his vision to make relations between object, and for his spatial orientation (this includes the background as visual clue),
- 'The Teleporter' for browsing external information,
- 'The Hyper-Signpost',
- 'R2D2' (not yet functional for this purpose).
- blue = internal links
- red = external links
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 :
- tpPlace (to place the teleporter in space),
- tpName (the name of the destination),
- tpDescription (the description text of the anchor node),
- tpComment (the comment text of the destination),
- tpUrl (the destination URL),
- tpParameter (the anchor node parameter property).
I also used a Switch node routed to a TouchSensor to make the comment text appear and disappear regarding the pointing device actions.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); }" ] }
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).
- hoPlace (place in the order of the objects, i.e. first, second, etc.),
- hoUrl (destination),
- hoName (name of the hyperobject),
- hoParameter (parameter for the linking),
- hoDescription (URL description text),
- hoComment (hyperobject comment),
- hoColor (color of the hyperobject respecting the color code).
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 } } } ] }
- 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 :)
- Another tough bit was to grasp the general idea of the routing, but once you understand it's easy.
- I also lost a lot of time trying to improve rendering with LOD's everywhere (whenever possible).
None yet.
The only reference book I used was :
- Rikk Carey & Gavin Bell (1997) The annotated VRML 2.0 Reference Manual, Addison-Wesley.