Final Project: An Infinite Townscape
Devin R. Fensterheim
5 May 2005
Virtual Reality Laboratory
View project (Hardware enabled)
View project (Hardware disabled)
Overview
In this project, Virtual Reality Modeling Language is used to model a small town. VRML language capabilities, such as scripting, prototyping, and texturing
were leveraged to create the model.
However, it was only the secondary objective of this project to simulate a virtual cityscape, although this is the most obvious result. Visualizations of this nature have
applications within simulations (for instance, virtual driving tests), entertainment, etc. This basic world contains a basic, modularized framework for additional complexity. Effort
was placed primarily into building this framework, and implementing smaller proofs of concept for future expansion.
Screen Shots
Figure 1: Overview The town consists of nine 50m by 50m regions. Each region has imposed over it a Proximity Sensor that detects when the user is
positioned over it. The regions, which are tilable, are then rearranged to place the user in the center region, ad infinitum. This gives the illusion of an infinite terrain.

Figure 2: Ground View
A ground view of the city shows several features, amongst them an animated stoplight and dynamic street signs. The street signs increment as the user navigates the city.

Figure 3: Night Mode
In night mode, the street lights are illuminated, as are random windows of houses.
Directions
General Instructions
Walk mode is recommended, regardless of whether hardware is enabled. To allow freedom of exploration, there are no touch sensors, although the world is optimized
for road travel. (The houses have no developed interior, for instance, primarily since there are an infinite number of virtual houses that would need to be furnished.) The simulation
provides for lighting, and the headlight should be disabled by default.
It is recommended OpenGL or DirectX hardware rendering be used, if supported by hardware, rather than software rendering. Software rendering tends to distort the textures and cause
excessive flicker.
Hardware Navigation
In hardware mode, navigation is provided automatically. Use the following movements to control motion:
- Adjust the roll of the arm to 'steer'. Moving your arm clockwise will allow you to turn right, and moving counterclockwise will allow you to turn left.
- Make a fist to stop.
- Raise the pointer finger to move slowly (~0.5 m/s)
- Raise the pointer and middle fingers to move at a moderate pase (~1 m/s)
- Raise the pointer, middle, and ring fingers to move at a slightly faster pase pase (~1.5 m/s)
Night mode
To toggle night mode using the glove, raise the little finger. In software mode, click the small red sphere in the top-right corner of the simulation.
Features
Some features of this city include:
- Infinite terrain. The user can navigate in any direction indefinitely.
- Dynamic street signs. Signs that update automatically give the user an indication of where they are within the virtual world. This is also a proof of concept of a more dynamic interface.
When an area is moved, the Plane prototype's position event is called, allowing the plane to transform its parameters.
- Animated Traffic Signals. The traffic signals cycle through the standard phases, at about 30 seconds per complete cycle. This is handled through a master time sensor at the
intersection level, ensuring the signals are synchronized. Each signal consist of three lamp prototypes, with a dark cylinder surrounding an emissive cylinder. When the dark
cylinder's transparency is set to 0, the emissive cylinder is seen, giving the illusion of a signal.
- Street lights. The street light prototype consists of a point light that is turned on in night mode. This is the primary light source at night, as the default headlight
is disabled by default. The stree light prototype is positioned along the major roads.
- Houses. A single house prototype was created. The house was build from a complex index face set, with windows created as a separate prototype. A driveway was also provided,
which connects to the nearest minor road. The house
allows the textures to be dynamically set by the parent, allowing (and more importantly, providing a proof of concept for) additional variation. PointLights are located
directly behind the windows, and are randomly turned on by the parent during night mode.
- Hardware Navigation. By binding to a view point in hardware mode, it is possible to 'take the user for a ride' through the city, rather than depend on mouse movements (theoretically,
at least).
To accomodate this, the main script will automatically set the position using these empirically-derived equations:
In this equation, s corresponds to the current absolute velocity. The exponential function was designed to reduce jitter; nevertheless, jitter is still evident and
reliable navigation takes some practice.
Acknowledgements
In closing, I wish to particularly acknowledge the following individuals:
- Antonio Ramires Fernandes, author of the VRML Interactive Tutorial. The examples on this site were instrumental in
getting through the nuances of VRML and building this project.
- Rick Carey and Gavin Bell, authors of the Annotated VRML97 Reference Manual. The node reference on this site was
invaluable, particularly for scripting.
- I had originally intended to create a hardware counterpart for the simulation using a rotary encoder. Unfortunately, a cascade of difficulties in getting past the Java
security model made doing so too complex given the time restraints. However, I would like to acknowledge Douglas Beattie Jr. for creating the Jnpout JNI library for parallel-port
interfacing, which made adding this functionality almost possible.
- Finally, and most importantly, I wish to acknowledge Manjula Kuttuva for her guidance and assistance throughout the semester and on this project.