Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Exporting Options

Now that all of your settings are complete, you are ready to export the completed scene to Shockwave 3D. The Shockwave 3D file format is called the .W3D file. You must have the right plug-in to make the exporter work correctly. There is no workaround for the plug-in; you must have it to write the .W3D file because it is the only method of getting your 3D data into Director. If you have 3ds max, you can get the plug-in from Discreet at http://www.discreet.com/products/3dsmax/ or off the CD-ROM that comes with this book. For 3ds max users, the plug-in goes into the Plugins folder. Make sure you install the correct version of the plug-in that matches your application version.

If you have any problems with the exporter, you can reset the exporter's preferences and delete the sw3d_exp.cfg file from the 3ds max Plgcfg folder.

Character Studio 3.0.2 is the only version of Character Studio 3.0.x that will work with the exporter. Using other versions of Character Studio 3.0.x may cause random functioning or crashes.

With the plug-in, you should be ready to export the house scene. To launch the exporter from within 3ds max, select the File menu, then select Export, and choose Shockwave 3D Scene Export (*.W3D) as your export type. A Directory box should appear [3.24].

Figure 3.24. The Shockwave 3D exporter is found in the Export dialog pull-down menu.

Name your scene and export it. Then, you will get the Shockwave 3D Scene Export Options dialog window [3.25].

Figure 3.25. There are a lot of options you can choose from when exporting a Shockwave 3D file.

There are a lot of options to choose that will determine how your Shockwave 3D movie looks, functions, and animates. These settings will also determine the quality and speed of your file(s). I cover these options in great detail, as they are a very important part of creating your Shockwave movies.

The Export Options window is broken up into six sub- windows, which are as follows:

  • Preview Options

  • Shockwave 3D Resources to Export

  • Animation Options

  • Compression Settings

  • Texture Size Limits

  • Additional Options

Each sub-window includes options, as noted in the following tables.

Preview Options Window

View W3D Scene After Export

When this option is checked, you will get a window that shows you what your Shockwave 3D scene is actually going to look like in Shockwave, after you export it. You can spin this view around with your mouse, or you can hold down a modifier key (such as Shift, Alt, or Ctrl) to zoom in, dolly, and so on. The Preview window will always show your entire scene, including the resources that you have disabled for export, except the Geometry Resources option.


Shockwave 3D Resources to Export Window

Geometry resources

When this checkbox is enabled, your 3D models are exported into your .W3D file. Meshes and any bones for the meshes are exported as well. If this option is deselected, the Preview window will be completely black. The only reason you would not make this active is because you can export 3D models, shaders, textures, and animation as separate .W3D files. Then, you can use Lingo's loadf ile command to put them back together in Director. The Lingo you use to load .W3D contents is as follows: member(whichCastmember).loadFile("myName",FALSE ,FALSE)

 

See your Lingo manual for more specifics about the loadf ile command.

Shaders

This option determines the rendering type that is exported to your file. This option should be enabled in conjunction with texture map resources and material resources. Shockwave 3D does not see the difference between shader types, such as Blinn, Phong, or anisotropic. The only shading types that are supported are Blinn and Phong, and they are exported as Gouraud shading. Shockwave 3D shaders are used to point to the location of texture maps and materials. If you leave this option off, your models will be invisible, because they have no shading information. You can use Lingo later to attach shaders to these models, and they will magically reappear.

Texture map resources

With this option enabled, the textures that you apply in your 3D application will show up on your models. If you deselect it, your models will not contain textures when loaded. After the export, you can use Lingo to assign the textures to the models if you want. This is useful for a billboard sign, for example, that you might want to have different textures.

Material resources

The material data option should almost always be active. It determines if materials are exported with your W3D file or if they are stripped out. The only time that you wouldn't use this is if you are exporting a series of bones as keyframed animations, which require new materials.

Light resources

This option determines if your lights are exported or not. You always want this option turned on (the default), except for when you are exporting animation, geometry, or texture data separately.

 

Remember, you can only have a maximum of eight lights, and each light results in a noticeable performance decrease, so you should use them wisely.

Animation

You probably assumed that this option exports the animation in your scene. Animation data is sampled at every frame, and then compressed into a streaming format. You may find that there are times when you only want to capture parts of your animation or sample the animation steps less than once per frame. This is where you would change the sampling interval and animation range. If, for example, you have a 100-frame animation sequence and you set the sampling interval to 2, then Shockwave would look at every other frame to determine the motion. Straight-line motion can handle high sampling intervals where curved motion needs smaller intervals to be accurate.

Scenegraph hierarchy

This option contains the parent-child hierarchy among all of the objects, including geometry, lights, groups, and cameras. Always select this option when you are exporting an entire scene. The only time you should deselect this option is when you are exporting libraries of either animation or texture data.


Animation Options Window

Sampling interval

The Sampling interval setting determines the accuracy at which your animation is played back. If you set it to 1, every frame of your animation is sampled, and your animation looks as close to the original as possible. If you set the sample to 2, every other frame is sampled and saved into the .W3D file. The higher the number, the less accurate the animation becomes.

Animation range

The animation start and end range allows you to specify which portions of your animation you want to save into the .W3D file. You can, for example, have a 3ds max file that contains 500 frames of animation and export out five different .W3D files with each having 100 frames of the animation.


Compression Settings Window

Geometry quality

This setting determines how true to the original model you stay. 100 is the maximum quality, and it has the least file savings compared to a lower value.

Texture quality

This setting determines how applied textures look. The compression method used for textures is JPEG, so there is substantial file savings if you lower this setting. I would recommend a setting of 50% for starters, since this helps reduce your overall file size.

Value Ranges

The three compression values range from 0.1 to 100.0. The higher the value, the less compression is applied to your model. The less compression is applied, the more realistic the original source model will appear, including texture and animation. The values for compression are measured in percentages, not linear values from 1 to 100. Thus, doubling the values does not double the quality.

Animation quality

This setting is used to determine how much information of your keyframes is saved. Low numbers can yield a jerky animation playback, but they also yield smaller file sizes.

Texture Size Limits Window

There are three options for texture size limits—No limit, 512x512, and 256x256. No limit uses the original source size of the texture you applied and can result in substantially larger files. 512x512 and 256x256 reduce your textures to these respective sizes; then you can apply any texture quality compression before saving it into the .W3D file.


Sampling Interval Versus Animation Quality

The difference between the Sampling interval and Animation quality is that the Animation quality setting is a compression function that is performed on the animation. The Sampling interval looks at your animation sequence and saves every other keyframe, for example. If it is set at two, then the Animation quality setting compresses those samples.

Additional Options Window

Enable Toon and SDS

While in Director, the Toon modifier allows you to shade the entire Shockwave 3D scene, just like a cartoon. There are several options with this setting that have different results, from black-and-white sketches to full-color cartoons. The SDS is a modifier that adds detail to your models by subdividing the surfaces into smaller polygons and triangles. If you are planning on using the SDS modifier in Director, you must first enable this option.

Report .W3D file contents

Enabling this setting results in an Error dialog box after the export is complete. It's a good idea to keep this enabled. It will show you error messages, such as, "Wrong shader type" or "Unsupported texture mapping used." If you receive these errors, you will have to correct the problem in 3ds max, and then export again.


As you can see, the exporter has several options and can be thought of as a Control Panel for converting 3ds max files into the Shockwave's streaming .W3D format, which is no small task. You will find that even small, numerical changes in the exporter options can create significant differences in the final Shockwave 3D file. Because of this, I suggest you experiment with different versions of your exported 3D scenes. You want to find that perfect blend of quality and performance.

After you determine your options and compression setting, select Export, and the exporter will construct the mesh for your objects. A dialog box, the Preview window, appears [3.26].

Figure 3.26. The Shockwave 3D exporter in action.

This window enables you to examine the 3D scene's content [3.27]. You can rotate, zoom in or out, or spin around in the scene. This preview shows you exactly what your scene will look like in Director, in Shockwave, and on the web. If you are unhappy with the quality, appearance, or animation that you see in this Preview window, you will need to correct it in 3ds max, and then export the scene again.

Figure 3.27. Use the Preview window to examine your scene.

A Piece of the Pie

The Pie Chart window [3.28] opens after you close the Shockwave 3D export Preview window. The Pie Chart window gives you a way to examine your content. In a sense, the Preview window represents the right side of the brain, and the Pie Chart represents the left side of the brain. The Pie Chart window gives you a complete breakdown of your file contents by size. You can see how large the final Shockwave file is in addition to the individual files.

As you can see [3.28], the final size of the house .W3D file is 869.7K, and 688.5K of the total (or 79.2%) makes up the geometry in the scene. The textures account for an additional 20% taking up 173.6K. If you were trying to target the file for a specific size or if you wanted to achieve the smallest file size possible, you can increase the compression (lower the number) on the textures. This would make the files smaller and the total file size would also decrease.

Figure 3.28. Use the Pie Chart Preview window to examine your scene in more detail.

Notice that the texture memory is 2304.0K. This is the amount of RAM that is necessary for the target machine to display the textures correctly. This isn't a large amount by most standards, but can easily cause "out of memory" errors in a browser that doesn't have much RAM allocated to it, especially if you use too many textures in your Shockwave 3D movie.

In practice, it's a good idea to create textures that are as small as possible either by size reduction or JPEG compression. Your users will thank you for it when your movies load faster.

Crashing Exporters

There is no trick to debugging the exporter. It is just like a Boolean. That is, the software usually works or it doesn't work. I have run into issues with the exporter that I will share with you in an attempt to alleviate the frustration you might experience on your projects.

Often, the exporter crashes for no apparent reason. On second attempts, it suddenly works. Random crashes are rare, but they do occur. Luckily, I have never lost data because of a crash.

The exporter has also crashed on me when I accidentally gave textures or materials the same names. This took some considerable debugging to figure out. Because 3ds max has no problem with duplicate texture names, I couldn't figure out that Shockwave's exporter does have a problem with it. The exporter crashed during the mesh building process and reported an error message that says, "I'm crashing now." It gives you a dialog box that lets you choose OK or Cancel! Believe me, I've tried to cancel the crash to no avail. The lesson here is that you shouldn't duplicate file names for textures and materials.

There has been one other situation in which the exporter crashed, and I had to forcibly quit the application. I was trying to test for a size limit for a mesh with a three million-polygon model that had mesh smoothing and seven lights on it. Needless to say, it crashed and I had to reset the exporter's preferences by deleting the sw3d_exp.cfg file from the 3ds max Plgcfg folder.

Save your debugging strength for Director—you'll need it.

  • + Share This
  • 🔖 Save To Your Account