4:建立模型尽量使用box, plane, Sphere等shockwave支持的几种model resource来建立模型。
6:模型上面不管有没有贴图最好都加上UV modifier 。
2：Modefier stack里面太多modefier，可能会导致导出错误，解决方式：Convert to editablemesh。
4：导出的时候Compression Settings的Texture如果要保证贴图质量的话不要选择80以下数据，建议是85.Texture Size Limits建议选择 No Limits on texture。测试时候可以选择256 by 256 pixels。
2：如果要实现灯光效果，建议使用烘培到贴图（Render to texture）来实现。
只支持Free camera,不支持target camera
3：Resources to Export
如果不是特殊需求，去除Enable Toon and SDS选项。
5：Texture Size Limits
最终导出都要选择No limit on texture.测试时可使用256 by 256提高测试速度。
Sampling 1，Range 默认参数。
2：Camera命名，使用”Cam_“ or “Camera_”作为前置标识。后缀用来区别用途，比如 “Camera_AutoView” 表示自动行走的Camera，”Cam_Gate”，表示大门处的Camera。
AreaName 3-6个字符，一个Max文件里面标识不同区域的字符，同一区域的AreaName相同（最好也设置相同的Object Color，这样在wireframe显示的时候更直观）。
ObjName 3-6个字符，模型真正代表的意义，比如”_chair” “_desk” “_roof” “_tree”等。如果有很多相同的desk，可以用这种标识 “_desk01”，”_desk02” 等。
5:Material ，Texture命名，原则上没有太多要求，不过不要重名。否则导出会覆盖重名Material or Texture。
下表是max自带的Render to texture 参数设置图表。
Setting User Properties
User properties may be set by the following process:
Select a model in 3D Studio MAX.
Right-click the model and open the Properties dialog.
Select the User Defined tab.
In the text box, type the user property name and value.
User Property Syntax
User properties are specified as property name and property value pairs. Property names are associated with property values with the equal (=) sign. Property values are terminated with a semicolon (;). Property names are alphanumeric, starting with an alpha character. No spaces are allowed between the user property and the equal (=) sign, and between the equal (=) sign and the start of the property value.
There is no limit to the number of user properties. Currently, property values are restricted to 512 characters.
MyProperty1=A Monster called Fred;
Reserved User Properties
The following user property names are reserved by Shockwave 3D and trigger the following described behaviors when the .w3d file is loaded into Director. The exporter should be used to assign these properties to a model and programmatically implement them at export.
Note: All strings starting with "sw3d_" are reserved for future use by user properties in Shockwave 3D.
[Unsigned Integer: 0...256]
Specifies the relative stream priority of a model and any textures used by the model (0 indicating the highest priority, with larger numbers indicating a lower priority). By default, texture priorities are set to 4 times the model priority.
Note: Priority 0 denotes inclusion in the initial Load Segment.
[Unsigned Integer: 0...1024]
Specifies the relative stream priority of a texture. This control allows you to override the priority given a texture after setting the sw3d_stream_priority user property on a model that uses the texture.
Note: Priority 0 denotes inclusion in the initial Load Segment.
Controls initial visibility of a model.
Note: If set to none the model is streamed but not initially visible. A Lingo programmer may make the model visible later by setting model(1).visibility=#front
When true, creates new normals to track the new surface curvature as a model is simplified.
When false, uses normals from original model and generates no additional normals to track the simplified surfaces.
Note: When sw3d_lod_adjust_normals is set to true, the new normals are calculated according to the values of sw3d_lod_minimum_crease_angle and sw3d_lod_max_normal_error.
Hint: Set this value to false to obtain the smallest file size.
Integer value in 10ths of a degree
750 (75.0 degrees
Sets crease angle value. As an object is simplified the angles between the surfaces change. When the angles exceed this value, a hard edge is formed by introducing separate normals for each surface.
A small value results in a more faceted, chunky model. A large value results in a more realistic, smoother model with occasional shading errors.
Note: This is only used when sw3d_lod_adjust_normals is set to true.
Hint: The default value seems to work well for most models, so you probably won't need to change it.
Integer value in 10ths of a degree
1350 (135.0 degrees
Trades off file size for lighting quality. Large values result in smaller files with more lighting errors. Small values result in larger files with better lighting through the generation of additional normals.
Note: This used only when sw3d_lod_adjust_normals is set to true.
shockwave 3D exporter FAQ
When I export my model, its textures look wavy in the preview window, and I can see through the triangles. What's wrong?
The preview window shows how the model will look after it is compressed for output to the Shockwave 3D* file format.
Gaps between triangles can appear when a vertex that is shared among multiple triangles is replicated into multiple vertices by the level-of-detail calculations. This can happen when the UVW Modifier is used in 3D Studio MAX* to create tiling, which causes very rapid changes in the texture coordinates on the mesh. Replication can also occur at the boundary between two materials on a model by assigning different material IDs to different parts of a mesh and then using a Multi/Sub-Object Material to texture each part of the mesh. These multiple copies of the vertex are compressed differently, disconnecting adjacent vertices. To get rid of these gaps, either adjust the UVW Modifier or the Geometry Quality to decrease the compression errors.
Wavy textures are another symptom of excessive geometry compression. The lack of gaps indicates that the triangle vertices were not replicated when creating the level-of-detail representation of the mesh. Instead, the single vertex shared by all triangles is getting shifted slightly, which distorts the resulting texture. Increase Geometry Quality until you reach an acceptable level of distortion.
My exported models look creased where a number of faces come together. How do I fix this?
This is a result of geometry compression. Increase the Geometry Quality level (which decreases the compression), balancing this with the need to keep the file sizes small.
In my animation, the scene elements slowly float apart as the scene loops. Why is this happening?
Object animations are specified relative to their starting position (Animation Range Start). When the animation loops, the object is not reset to its original position and moves again starting at its current position. This results in the object floating away as the animation loops. To create a looping animation that stays in one place, make sure that your objects return to their original locations and orientations by the end of the animation sequence in 3D Studio MAX.
Why are all of the textures on my model exporting as a single texture, or all the materials on my model exporting as a single material?
The most likely cause is a naming conflict. All materials and textures must have unique names in Shockwave 3D; otherwise, materials and textures with the same names are assumed to be the same despite their internal settings. Use the 3D Studio MAX Material Editor to change the default "Material #n" or "Map #n" names assigned by 3D Studio MAX to something meaningful for your scene.
Note: Textures are assigned a name in the Material Editor and do not derive their names not from the bitmap they use.
Why does my sharp-edged model have dark-shaded triangles along its edges when I export it?
The edges of the model are not perfectly sharp, being modeled by a number of very small triangles where the edges meet. One part may be modeled by a series of triangles that are much larger than the tiny triangles used to "blunt" its edges. This can cause problems when the mesh resolution drops, as a large triangle on the flat face of the model is as likely to be thrown out as one of the tiny triangles. This causes sudden changes in the normals of the remaining faces, and the appearance and disappearance of large triangular dark spots.
One solution is to select all the vertices at the very edge of the model with the 3D Studio MAX Mesh Select modifier. This will mark these vertices as "base vertices," meaning that they will be the last vertices to vanish as the mesh resolution drops to zero faces. The problem, however, is that sharp edges are typically modeled by many vertices, so selecting all the edge vertices as base vertices defeats the purpose of having multiresolution mesh representation. This can also cause poor streaming behavior, or scenes where only the base vertices of the model are rendered. Another solution is to model the edges with a smooth range of triangle sizes near the edges. The problem with this approach is that it creates a more complex mesh, which will slow streaming.
A final solution is to make use of the sw3d_lod_adjust_normals and sw3d_lod_minimum_crease_angle user properties. Decrease the value for the sw3d_lod_minimum_crease_angle user property, and the dark triangles will go away. This procedure can increase file size, however. Increase the value of the sw3d_lod_minimum_crease_angle user property, and the dark triangles will also go away. This procedure can cause different lighting errors. Which user property to use will vary depending on the model. Try extreme values of either of these user properties to see how their effects differ when the model is viewed in Director, and then adjust the values until you have reached an acceptable visual quality and file size compromise.
When I export, the light, camera, and group aren't animating. What's wrong?
These scene entities are only able to move when they are the child of a mesh, because only meshes and bones can be animated in Shockwave 3D. Be sure to attach the light, camera, or group to a mesh, and then animate the mesh when setting up the animation for export.
Note: A group that has a group as its parent will animate when it has a mesh as its child, because the group and the mesh get collapsed into a single model node which can be animated. See Scenegraph Hierarchy Rules.
Why does my scene get clipped when I use the Dolly tool in the Preview window?
The scene was probably exported in Orthographic view. Export in Camera or Perspective view from 3d Studio Max to avoid clipping.
Why does my character start animation at the end of its cycle?
Because of the way 3D Studio Max sends the animation position information, the time slider must be set to 0 or else the animation starts at the last frame.
Why are the objects that are animated showing tiny vibrations?
The vibration is a result of animation compression. The exporter Animation Quality value controls the degree to which the animation is compressed. At lower values with higher compression, the motion is represented with less accuracy. This means that the positions of all the bones will have a random element in them from one keyframe to the next, resulting in a vibrating image. Keep in mind that there is a trade off between inaccuracy in the motion and file size when adjusting the Animation Quality control.
Why are objects that I hide in 3D Studio MAX showing up when I export?
Marking an object as "invisible" in the 3D Studio MAX simply hides it when working in or rendering a scene, but does not remove the object from the scene. The Shockwave 3D exporter sees all objects in the scene whether or not they are marked as invisible. If you want the models to remain invisible in Shockwave 3D, mark them with the "sw3d_visibility" user property. If you don't want them in the exported scene, to save download time and disk space, remove them from the scene before exporting.
I have two meshes, one of which is the child of the other. When I export, why is the animation of only the parent mesh captured? Likewise, when I have a mesh contained in a group, only the animation of the group is captured. Why?
According to the Scenegraph Hierarchy Rules, parent-child meshes are collapsed into a single mesh by the Shockwave 3D exporter. This means that the animation of the child mesh will be lost as it becomes part of its parent. Only bones will cause the child mesh to move relative to its parent after this collapse.
To animate both meshes separately, place a group node between the parent mesh and the child mesh. Alternately, use one or more bones to animate the child mesh with respect to its parent.
When 3D Studio MAX nodes are collapsed into a single node by the exporter, only the animation of the top node in the set being collapsed will be captured. The animation of a child mesh contained within a group will not be captured for the same reason that its animation was lost under a parent mesh: all children of a node become part of that one node and are animated by that top node's animation.
The scene looked fine in the preview; but when I exported it, the scene was blank and using Lingo script "put member(x).model(1)" returns "<VOID> or the name of the model." What happened?
If Lingo returned <void>, you probably exported the scene without having the Scenegraph Hierarchy export option selected. When this option is not selected, the only things written to the export file are the shader, texture, model, and motion resources. All the information that specifies how they exist in the scene, how the scene is laid out, how the scene is lit, and how the scene is viewed is lost. Re-export the scene and make sure the Scenegraph Hierarchy option is selected.
If Lingo returned the name of the model, you probably exported the scene with having the Shader export option or the Light Resources option selected. When these options are not selected, the model exports but is not shaded or lighted, which renders it invisible. Re-export the scene and make sure the shader and light resources options are selected.
I have placed a camera as a child to a mesh. When I animate this mesh, thereby causing the camera to animate, the view from the camera vibrates. How do I fix this?
The vibration is be caused by the animation being too compressed. To avoid this, set the Animation Quality compression control to a value of 100.0. In general this setting is too high for most animations. When you must use this value, create a special scene containing only the camera's parent, and export only the animation on that object. Then use the Lingo loadfile command to load the animation into the full scene.
Shaky motion can also result when keyframes have very different positions from the beginning or the end keyframes. In this case, the shaking won't go away even when the Animation Quality control is set to 100.0 because of the way the animation keyframes are compressed. The fix is to try to keep all keyframe positions within a tight range whenever possible.
I want to export a lip sync animation built by using a morph compound object, but cannot get it to work after the export, because only bones-based deformations will export. How do I get around this?
The Morpher modifier and Morph compound objects will not export because the deformations they create are not bones-based. Only bones-based deformation will export. Morphing can be achieved by using bones to generate phoneme targets, and then by copying the bone keyframe information as needed to reproduce the target pose. Other options include creating a model using bones and applying the Physique modifier to the lips and head, or generating a series of morph targets, and blending them using Director.
Why does the Shockwave 3D exporter stop responding or cause 3D Studio Max or my system to fail when I export a scene containing a large model?
Converting a MAX model containing over more than 10,000 faces to the Shockwave 3D multi-resolution representation is a memory-intensive operation. On systems with less than 256Mb of memory, but even on systems with more memory, very large models can exhaust a system's memory. This can cause the exporter to slow and, in some situations, can cause 3D Studio MAX or your operating system to fail. As an example, a 260,000-face teapot required 610 Mb of system memory to export, and produced a 4Mb Shockwave 3D file.
Because large models will take a long time to stream to a remote computer over the Internet, and are unlikely to render at full resolution on all but high-end systems at frame rates longer than one second, we recommend that you simplify large models before attempting to export them.
What is the difference between geometry compression and the level-of-detail (LOD) representation of a model?
Geometry compression removes no vertices from a model (including keyframes and texture colors), but rather causes the vertex positions (including normals and texture coordinates) to be represented with less precision, causing them to drift from their true positions. This drift increases as the compression rises, eventually resulting in a noticeable wrinkling or crumpling of the object. A geometry quality setting of 100 means least compression of the mesh data with the highest possible accuracy.
When models are exported, their meshes are processed and simplified one vertex at a time. This process works in the opposite direction when the model is streaming into a Shockwave 3D scene.
Simplification does not create gaps in a model, although it will cause any existing gaps in a model to get larger as the model is simplified. The degree to which a model is automatically simplified depends on the target framerate, the hardware used, the complexity of the model, the distance between the model and the camera, and the complexity of the entire scene. Very large models need to be greatly simplified just to obtain approximately 30 frames per second, even using fast machines, or when the model is far from the camera.
Level-of-detail (LOD) calculations, on the other hand, remove vertices from a model. This is done by looking at the local smoothness or non-smoothness of the surface around each vertex. Smooth surfaces are retained and jagged surfaces are removed.
Sharp but important features, like an antenna on a vehicle, which would be removed, can be preserved by being marked as base vertices using the Mesh Select modifier. This effectively indicates that these vertices are the last to be removed. Do not mark too many vertices with the Mesh Select modifier, however, as this can create poor streaming behavior, or scenes where only the base vertices of the model are rendered.
Further tuning of level of detail can be done with the sw3d_lod_adjust_normals, sw3d_lod_minimum_crease_angle, and sw3d_lod_max_normal_error user properties.
Default settings of user properties can result in the the removal of vertices that drastically change the surface normal, resulting in a hole in model. Models with faces with a normal direction or winding order that is inconsistent with the adjoining faces, or having faces that have zero area, for example, can cause tearing of the model when it simplifies. Decreasing the sw3d_lod_max_normal_error or increasing the sw3d_lod_minimum_crease_angle user property values can often remove these holes as the model simplifies, but often at the expense of creating a larger Shockwave 3D file that will take longer to stream.
Streaming and Load Priorities
What is load priority?
Load priority is the method used by a .w3d file to define the general ordering of models and textures in the data that is streamed. Load priority values are unsigned integers that range from 0 to 256 for models, and 0 to 1024 for textures. Models and textures with the highest load priority significance appear before those with lesser significance. Load priority significance increases as the value decreases.
How is load priority specified in the Shockwave 3D Exporter?
For a model, this is done by setting a sw3d_stream_priority assignment for the model's user properties. For all textures used by a model, this is done by setting a sw3d_texture_stream_priority assignment for the model's user properties. See User Properties for more details.
What is the default load priority for all models in the Shockwave 3D Exporter?
The default load priority of all models is 256. A model's default load priority is overridden if the sw3d_stream_priority user property is specified for the model, and its value is less than the default of 256. If there are multiple model instances using a common resource, the most significant priority value (that is, the numerically smallest load priority value) is used for the model resource geometry and any associated textures.
What is the default load priority for all textures used by all models in the Shockwave 3D Exporter?
The default load priority of each texture is the most significant load priority specified for all of the models that use the texture, multiplied by 4. If all of the models using the texture have the default load priority of 256, then the default load priority of the texture will be 1024. If some of the models that use the texture don't have the default load priority and 10 is their most significant load priority, then the default load priority of the texture will be 40. A texture's default load priority is overridden if the sw3d_texture_stream_priority user property is specified for the texture, and its value is less than the calculated default.
How does load priority affect what's in the initial load segment for Shockwave 3D file (for example, the ILS or what will have been loaded when the Lingo state reaches header loaded or 2)?
The load priority for a model and its textures only affects where the geometry update records and texture image data are placed in the .w3d file. All of the other types of data are placed in the ILS without respect to the load priority. This includes group nodes, model nodes, lights, materials, animations, motions, initial model resource definitions, initial texture definitions, etc. If the load priority for a model is 0, then its geometry update records and texture image data will be placed in the ILS. If the load priority for a model's textures is 0, then the texture image data is placed in the ILS. The ILS equals a load priority of 0.
Does the texture image data required for a model appear in the Shockwave 3D file before or after the associated geometry update records?
By default, if the exporter is set to save the textures, some of a model's geometry update records will appear before the texture image data used by the model. However, if a load priority for the textures is specified that is more significant than the model's load priority, the texture image data will appear before the geometry update records.
Are material colors, vertex colors, and face colors saved by the Shockwave 3D Exporter?
Only material colors are saved by the exporter. The vertex and face colors are not saved because they are not currently supported by the .w3d file format.
Shockwave3D Export SDK
3D Lingo 参考
Maya 4.5 导出w3d的插件