Q: How does VRML support any dynamic scenes?
A: Basicly, in the VRML2.0 , the objects ( node ) can receive "event" , and change one of its property( field), so that the object looks like dynamic in the scene. This is quite like the Windows programming: object can receive message and change itself.

Here is a sample file I just created , save it to a .wrl file and you'll be able to play it in a VRML-enabled brower.

As you can see, I created a green ball , and give it a name : "green_ball". And then create a timer , named "timer", then create another PositionInterpolator node , named "pi". The timer will generate an event regularly, and throw the event to the PositionInterpolator node, pi. When the pi receives the event , it generate another event and throw it to the green_ball, then the green_ball receives the event and change its position.

Here I use the ROUTE statement to define which object genereates what event , and throw it to which object.


Q : What is the default light source when it is not defined?
A: This default light is created by your browser and it is attached to the current viewpoint. This light always points to where you're looking at. It is like if you had a light attached to your head. This light can be turned on or off using the browsers options or with the NavigationInfo node.

VRML supports three additional types of lights. They are:
1 Directional Light
2 Point Light
3 Spot Light

When using a Directional Light the light rays are all parallel. This light has no defined location, only a direction. It is as if the light is far, far away from your world.

A Point Light is a light, placed in your world, which brightens everything around it, the light rays go in all directions from the light's location. Think of the sun for instance.

A Spot Light is a ... spotlight. This type of light creates a cone of light.


click here to see the VR world of this sample

#VRML V2.0 utf8

DEF green_ball Transform {
translation -10 1 -10
children
Shape { appearance Appearance
{ material Material { diffuseColor 0 1 0
} }
geometry Sphere {}
}
}

DEF timer TimeSensor {
cycleInterval 8
loop TRUE
}

DEF pi PositionInterpolator {
key [ 0 1 ]
keyValue [-10 1 -10, 10 1 -10]
}

ROUTE timer.fraction_changed TO pi.set_fraction

ROUTE pi.value_changed TO green_ball.set_translation

Back to VRML, MPEG4 seminar page