Examining the Sweater in Interactive 3D
over the Web, using TGS 3Space Technology
back to the tutorial
back to the tutorial

If you have never viewed a 3Space document with your browser, please load the plugin or player first. This is a short download and available for several platforms and browsers (Netscape &  I.E. on PC, Netscape on Mac as of this writing).
 

You will see a button "Get and Update 3Space" to load the player. 

To install the plugin for Netscape browsers, make sure you have Java enabled.


Here are a few of the sweaters, in 3space:
The files below were exported to 3Space format from Amapi 6.
Smoothing method
no smoothing
Bezier
DooSabin
Catmull
C-loop
Butterfly
Size of ZAP file (.z3d)
 2 kb
2 kb
2 kb
43 kb
2 kb
43 kb

Note that the file size can be very small: Of course, the original file (with the low polygon mesh) counts just 132 polygons (mostly quads, some triangles). The small file size is 2,337 bytes only (!) (i.e. about 2 kb). That's for the geometry in what's called the ZAP file (*.z3d). There are up to three files involved in a 3Space document:

  1. the Zap file (.z3d) containing geometry (and possibly textures)
  2. the scene description placed in an XML file (.xml)
  3. the HTML code (.htm) setting up the player as an active X object or plugin.
In the examples above, the XML files are just around 600 - 700 bytes in size when they come out of Amapi 6. I have edited a few (using Notepad)  to clean them out further and remove unneeded code, such as depth cueing (fog), gravity force field or other attributes of the object. Keep in mind that 3Space includes a physics engine, so you'll find a phenomenal collection of features available for very complex and interesting interactive behaviours through the XML scene description.

The HTML code is of course also very short (~400 bytes) and loads in essentially no time. Granted, it may call for a bunch of JavaScript files, such as the basic 3SpaceLib.js containing the core functions for interactive behaviours, but if you don't have any such behaviours assigned to the models, you can strip that code out and make the loading extremely fast anyway.

You can use the mouse (click & drag) to examine the object once it is loaded and shown in the browser window. Hold the SHIFT key down at the same time to Zoom. Click the right mouse button to switch a few options (e.g. to wireframe to see the model's mesh density).

Why are some smoothed results 2 kb and others 43 kb? Amapi can cache the smoothing when exporting to 3Space, but not for all smoothing methods. For Bezier, Catmull and C-loop, it is cached, which means that it doesn't have to save the resulting high density polygon mesh. Instead, it can save the original coarse mesh, i.e. just few polygons, and a few more bytes of data to indicate how it was smoothed within Amapi (e.g. which method was used, and how much subdivision). This information is used by the player locally in your browser to reconstruct the smooth look. The only thing you wait for in terms of downloading is a few polygons from  the coarse mesh, and the time it takes to re-apply the smoothing on your computer, which is essentially instantaneous with today's computers.

So, while you may have downloaded a file with just 132 polygons in it, after re-applying Bezier smoothing with a subdivision count (range) of 5, you will be looking at 13,000  polygons and a very very smooth, organic look.

Various results for Bezier Smoothing
with changing the Subdivision Range count

Subdivision Range count
3
4
5
Number of polygons 4,752 8,448 13,200
ZAP file size (bytes !)
2,331
2,328
2,330
Click icon to load:

This of course also applies to NURBS cases, i.e. if you make a part in NURBS mode, only the NURBS parameters (control points, knot verctors, u-v subdivision count parameters....) are saved in a ZAP file for 3Space use, not the actual resulting polygon meshes you end up seeing. There again, a phenomenal compression is achieved, making it possible to view 3D models of great complexity and geometry detail without waiting hours for downloading.

The 3Space Player can thus reconstruct geometry to a complex look from small file sizes. But it can do more - it has a particle system built into it which can be used to add smoke, explosions, fire, rain, snow, hail, shooting stars and just about anything else you see in games these days when it comes to visual effects. The 3Space player also incorporates a physics engine which allows solids to collide, interact with eachother through spring forces, timers and proximity sensors, submit them to wind and gravity forces etc... The possibilities are endless.

Here's a simple example, using several particle systems to create fire, smoke and hot coals (under the shirt), two more for colorful smoke coming out the arms, and another for the shooting stars in the background. There's also a sinus deformer in use to give the sweater a waving effect as if in the wind.

cool 3Space example

For more on the 3Space Technology, visit www.tgs.com/3space

The complete physics engine's syntax can be seen there in the Developer Zone. (look for the Schema document - if your browser has an XML parser it will view it directly, else you may need to save it to local disk and use a text editor to view it)