8

644 Chapter 20: Managing Scenes and Projects
Use primitives whenever possible. For example,
a scene containing only a sphere exports to a
VRML97 file of about 400 bytes, but if you apply
an edit mesh modifier and move one vertex on the
sphere, the V RML97 file is about 7,400 bytes.
Use the
Polygon Cou nter (page 3–6 45)
to keep
track of the number of faces in your scene.
Call your V RML97
.w rl
files from a standard
HTML page and constrain the viewer to a limited
window on the screen using the embed command.
This decreases the number of pixels that must be
rendered on ever y f r ame and makes the V RML97
environment more responsive. Many users use
high resolution (800x600 or more), so the number
of pixels during rendering and navigation can
belargeandthevideodisplaymayslowdown.
Frames may be dropped as the browser attempts
to keep up its real-time rendering, and navigating
the scene will become "chunky. Use the embed
command to avoid this, for example, <embed
SRC=myworld.wrl WIDTH=300 HEIGHT=200>
Hidefacesonanobjectinthesoftware,then
export th e objec t. The hidden faces appear as a
hole in the object. While the VRML97 plug-in c an
export hidden objects, it does not export hidden
faces. Hide faces that you know will never be
visible in t he scene, such as the backs of objects or
the bottom faces of objects resting on a surface.
Use inst a nces to reduce file size for objects that
havethesamegeometry.
Whenever you us e a Mirror t ran sform, us e t he
Reset Transform utility i mmediately afterward.
You can also use a Normal modifier immediately
followed by U nify Normals. VRML97 does not
allow mirror transforms (negative scales). The
Reset Transform utility modifies the data in the
actual mesh object to create the mirroring effect.
Don’t change units when modeling for VRML97.
To model in meters, keep the units set to the
default and use one world unit as one meter.
Animation
B eware of large file sizes when you use tra nsfor m
anim ation and coordinate-i nter polated
animation. The VRML97 plug-in expor ts
transform animation (move, rotate, and scale),
and coordinate-interpolated animation. For
example, you can animate mod ifiers such as
Taper and Bend and you can animate changing
parameters, such as increasing or decreasing the
radius of a sphere.
When s cenes u s i n g the In h erit Link s fu n cti on
are expor ted to VR ML97, child objects always
inher it t heir p arents t ra nsform s. Inverse
kinematics export correctly to VRML97 with the
exception of the Inherit Links function, which
determines whet her child objects in herit the
transforms of parent objects.
Always u se TCB controllers for VRBL
animations. These controllers provide precise
control and generate the smallest possible file size.
Other kinds of controllers, such as the default
Bezier controller, create larger VRML97 files that
do not perform as well.
Ma ke sure your anim ations never change the
face or ve rtex count over time. VRML97 can
not add or delete faces or vertices over time.
CoordinateInterpolators support morphing a
mesh only, not changing the number of vertices
or faces.
Totriggerananimationthatisnotonan
object at the top-level of the software’s l inking
hiera rchy, use a TimeSens or helper object. If you
trigger an animation directly from a TouchSensor
or ProximitySensor , without a TimeSensor , you
can animate only top-level objects. Animating
from TimeSensors does not have this limitation.
Tu r n off the Generate Pr im it ives tog g le
in t he Expor t dialog if you animate the
parameters of primitives (like the radius of a
sphere), and want the animation exported with