PERIMETER BALL

Here's an eye teaser! Play with the scene rotation (use the right mouse button) to make the ball "jump through hoops" or "skip rope" as the perimeter rotates while the ball does not. Weave side to side while moving in and out of the scene to make the ball "jump all over the place." This world makes use of four Live3D features:

Background Color The world's white background is made with the Live3D Background Color extension. By specifying an RGB (red-green-blue) value, you can specify a particular color for the world's background. For example:

DEF BackgroundColor Info {
    string "1 1 1"
}

Animated Texture Three extensions were needed to make the "bouncing ball." First, an animated texture was constructed. Live3D's Animated Texture feature requires that the texture (image file) be 128 pixels wide by multiples of 128 pixels high (for example, an animation with four frames would result in a 128x512 pixel texture.) In this case, a paint program was used to make the image of a sphere, then replicate the sphere image and distort it for each of 15 frames. Each version of the sphere was then exported as an individual 128x128 pixel image file. Each of these files was then pasted, in sequence, into a 128x1920 image and exported as a 256 color GIF file.

Transparent Texture After the animation GIF file was completed, giftrans.exe was used on the GIF animation file to create a version whose background color was transparency. The new GIF file was then specified as the texture for a VRML Cube (with "0" depth, so that only one ball image would be shown to the user). For example:

Separator {
 Texture2 {
     filename  "ballani1.gif"
 }
 Cube {
     width     4
     height    4
     depth     0
 }
}

Viola! An animation of a bouncing ball on a standard VRML object. But there's more...

Sprite We wanted the Cube with the bouncing ball texture to be visible to the user no matter where s/he would rotate the scene. The object would have to be axis aligned. That makes it a Sprite. For example:

Separator {
    AxisAlignment {
        fields [SFBitMask alignment]
        alignment ALIGNAXISXYZ
    }
    Texture2 {
        filename  "ballani1.gif"
    }
    Cube {
        width     4
        height    4
        depth     0
    }
}

Notice how the ball is always facing you as you navigate through the world, rather than sometimes disappearing like a sheet of paper with its edge turned towards you. That's what Live3D Axis Alignment does: it lets you make a VRML object face the user no matter which way the scene is rotated.


Corporate Sales: 415/937-2555; Personal Sales: 415/937-3777; Federal Sales: 415/937-3678
If you have any questions, please visit Customer Service.

Copyright © 1996 Netscape Communications Corporation