Lighthouse3d.com

Send me bugs and suggestions, please
VRML Script Tutorial
Full list

VRML Interactive Tutorial

Introduction
VRML File Structure
Drawing: Shape node
Geometry Nodes:
Box
Sphere
Cone
Cylinder
PointSet
IndexedLineSet
IndexedFaceSet
Extrusion
ElevationGrid
Example: Chessboard
Text
FontStyle
Appearance
Material
Textures
Image Texture
Movie Texture
Pixel Texture
Texture Coordinate
Texture Transform
Let there be Light
Directional Light
Point Light
Spot Light
Materials with Colored Lights
Hierarchical Node Structures
Group
Transform
Collision
Anchor
Billboard
Switch
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Creating Paths between events: ROUTE
Generating Events based on Timers or User Actions
Timers
Touch Sensor
Visibility Sensor
Dragging Sensors
Plane Sensor
Sphere Sensor
Cylinder Sensor
Proximity Sensors
Example: Proximity sensor
Interpolators
Color
Coordinate
Normal
Orientation
Position
Scalar
Example
Let the Music Play
Sound
AudioClip
Bindable Nodes
Who Am I: NavigationInfo
Where Am I: ViewPoint
Adding Realism to the world
Background
Fog
Information about your world
WorldInfo
Definition for Auxiliary Nodes
Coordinate
Color
Normal

MovieTexture Node


This node specifies the location of the movie to be used for texturing the shape. The movie must be in the MPEG format. , as well as if the image is to be repeated vertically, or horizontally, along each of the faces of the shape.

The following fields are present in this node:
  • loop specifies if the movie is to play repeatedly, see notes after field definition.
  • speed specifies how fast the movie will play, for instance if speed is 2 then the film will play twice as fast. Negative speeds play the film backwards.
  • startTime specifies the starting Time of the movie in seconds. The value of this field is the number of seconds since midnight, January the first, 1970.
  • stopTime specifies the stopping time of the movie in seconds. The value of this field is the number of seconds since midnight, January the first, 1970.
  • url which specifies the location of the movie. You can specify multiple locations if you want to, the browser will look for data in those locations in decreasing order of preference.
  • repeatS which specifies if the movie is to be repeated vertically.
  • repeatT which specifies if the movie is to be repeated horizontally.
  • Notes:
  • In VRML the world was created at midnight, January the first, 1970. Some say that the reason for choosing this date as the beginning of time as to do with the birth of the Unix system.
  • If the loop is set to TRUE and startTime >= stopTime then the movie will run forever. However if startTime < stopTime the movie will stop as soon as stopTime is reached.
  • If startTime >= stopTime then the movie should start as soon as startTime is reached. Note that some browsers only start the movie when startTime > stopTime. This is because in the early drafts of the VRML 2.0 specification this later condition was required to start the movie.
  • All fields are optional, the default values being applied if the field is not specified. Note: if you do not specify the location of the movie, url, then no texturing takes place.

    Syntax:
    MovieTexture {
    loop FALSE
    speed 1
    startTime 0
    stopTime 0
    url [ ]
    repeatS TRUE
    repeatT TRUE
    }


    The MovieTexture node has two eventOut fields: duration_changed and isActive. A duration_changed event is generated when the current url is changed, the value for this event is the time in seconds of the sound. Note that changing the speed does not produce a duration_changed event. The event isActive will output a value TRUE when the movie starts playing, when the movie stops the event isActive will output FALSE.

    Note: for the example on the right the movie will be repeated twice in each direction if the values for repeatS and repeatT are set ot TRUE. See the node TextureTransform to see how to set the repetition rate.