Scuola3D Help ~ COB Support

COB Support

 
COB is a 3D object file format generated by trueSpace, a 3D design package from Caligari Corporation. Because of its power, ease of use, and relatively low cost as compared to other high-end 3D packages, trueSpace has become the 3D design program of choice for artists who are creating complex new objects and avatars for use in Active Worlds.

Active Worlds includes direct, native support for COB files. In other words, 3D objects and avatars created in trueSpace and saved in COB format can be used directly in Active Worlds without conversion to the RWX format first.

To use a COB file in Active Worlds, simply place it in a .zip file and upload it to your world's object path (just as you would for any .rwx file.) For building objects, simply include the extension ".cob" on the object name when building so that Active Worlds knows to interpret the file as COB. For avatars, specify the file name with the .cob extension on the "geometry=" line in the avatars.dat file.

Active Worlds also supports trueSpace "scenes". To use a scene file as an object, simply include the extension ".scn" on the object name when building.

Active Worlds supports the COB files generated by trueSpace 2, trueSpace 3, and trueSpace 4.x.

Important Note: When adding COB objects to your world, be sure to use names for the objects that do not conflict with any existing RWX files in your world. For example, if you already have a "table.rwx", do not add a new object called "table.cob" or it will not work correctly. The reason for this is that for downloading, both file names will map to the same file on your object path: "models/table.zip", which of course can't be both an RWX file and a COB file at the same time.

COB extensions

While most COB files should work unmodified in Active Worlds, we have created some Active Worlds specific COB conventions in order to provide access to some of the additional functionality in Active Worlds.

Avatars

To have Active Worlds treat a COB file as an avatar, include "_avatar" in the top level GROUP name. For example, a GROUP named "aw_bigdude_avatar" would mark the model as an avatar. Also, when building an avatar in trueSpace, you should save the COB file with the avatar laying down on its back, head towards you, from the Front view (i.e., rotation X=90, Z=180 in trueSpace).

In Active Worlds 2.2, avatar joints were calculated with the expectation that the axes of each polyhedron and group were in the center (the default axis) of the poly or group. Beginning with Active Worlds 3.0 you now set the axis of a polyhedron or of a group at the joint. This is the preferred method, as it allows for proper jointing and movement of sibling clumps, such as fingers on a hand, and makes the interface more consistent and predictable for the avatar creator. To use the version 3.0 type joint processing (which is strongly recommend), include "_V3" in the top level GROUP name, for example, "aw_bigdude_V3_avatar".

In order to allow animation of avatars created for Active Worlds in trueSpace, we have created the following AW-specific clump tags:

aw_pelvis
aw_back
aw_neck
aw_head
aw_rtsternum
aw_rtshoulder
aw_rtelbow
aw_rtwrist
aw_rtfingers
aw_lfsternum
aw_lfshoulder
aw_lfelbow
aw_lfwrist
aw_lffingers
aw_rthip
aw_rtknee
aw_rtankle
aw_rttoes
aw_lfhip
aw_lfknee
aw_lfankle
aw_lftoes
aw_neck2
aw_tail
aw_tail2
aw_tail3
aw_tail4
aw_obj
aw_obj2
aw_obj3

To use these tags, place them as labels on the appropriate trueSpace OBJECT chunks in your avatar. The "aw_" prefix is a signal that Active Worlds should treat the label as something special. So, for example, the pelvis would be indicated by naming the OBJECT chunk that contains the pelvis as "aw_pelvis" (without the quotes). Note that each tagged object should be in the chunk hierarchy alone - child chunks only, not siblings. If you have two chunks that are siblings (for example, you might want the lfwrist and the lffingers to be in one chunk, ending up in one RenderWare clump) then only the first tag will be applied.

Shading

In order to implement flat shading (the equivalent of "LightSampling Facet" in RWX script), select "Faceted" in the trueSpace Shader/Maps. To implement smooth shading (equivalent of "LightSampling Vertex"), select "Smooth" in the Shader/Maps. Note that the Shader/Maps also allows "AutoFacet" shading which Active Worlds does not currently support.

The trueSpace Shader options in Shader/Maps are interpreted as follows: "Flat Shaded" is treated as RWX TextureMode with "Lit" turned off, while "Metal Shaded" and "Phong Shaded" are treated as TextureMode Lit.

Note that if you use the trueSpace "Paint Face" feature this often results in duplicated vertices, which in turn causes those polygons to appear faceted. Since Active Worlds does not know whether the polyhedron should be faceted or smooth, you can force Active Worlds to attempt to smooth polyhedra that use the Paint Face feature. To do this, include "_optverts" in the group or polygon name, e.g., "aw_head_optverts".

Textures

To apply textures to your COB objects, specify "Use Texture Map" in trueSpace Shader/Maps and select the appropriate file. When Active Worlds loads the object, it will ignore the path and extension on the texture file name and assume that the texture is a JPEG. Note that this allows JPEG texture files to be shared between COB and RWX objects.

To apply texture masks, set the "Overlay" checkbox to "checked" in the "Use Texture Map" of trueSpace Shader/Maps. If this option is set, Active Worlds will automatically look for and apply the mask. The mask file name must be the same name as the texture file but with an "m" added to the end.

In order to enable or disable texture mipmapping, name a polyhedron or group "aw_mipmapon" or "aw_mipmapoff", respectively. Mipmaps are on by default.

To change the current texture address mode, you can set the polyhedron or group name to one of "aw_tamwrap" (the default), "aw_tamclamp", or "aw_tammirror".

Scaling

Active Worlds will automatically scale COB objects by 1/10th on all three axes at load time. This ensures that "one meter" in trueSpace will be the same as "one meter" in Active Worlds.

Special Objects - Pictures, Signs, Facers

To create a "picture" object (an object which can have a texture applied via the picture command) in trueSpace, simply name the object chunk which is to receive the picture texture "aw_picture". Similarly, to create a "sign" object, name the the object chunk "aw_sign". You can also name a group chunk "aw_picture" or "aw_sign" to cause all objects within the group to be treated as picture or sign surfaces.

You can also create "facer" objects in trueSpace (facers are objects which always rotate to face the observer, such as the tree and flower objects in AlphaWorld) by naming any polyhedron or group within the object "aw_facer". If the name "aw_facer" is found anywhere in the COB object, then the whole object will be treated as a facer.

Wireframe

To implement the equivalent of the RWX "GeometrySampling Wireframe" directive in trueSpace, start the GROUP or OBJECT chunk name in trueSpace with "aw_" and include "_wireframe" in the name. For example, to make a wireframe cube in trueSpace, you might name the OBJECT as "aw_cube_wireframe".

Note: "pointcloud" GeometrySampling is no longer supported beginning with Active Worlds 3.0.

Vertex Prelight Coloring

To access the new vertex prelight feature from COB files, use the "Paint Vertices" tool in trueSpace. For example, to make a RGB color cube, create a cube with the "Add Cube" tool. Then select the "Paint Vertices" tool, and for each of the six vertices of the cube, select a different color, and left click on the vertex.

Collision

To access the new collision feature from trueSpace, name the group that contains the object as "aw_collisionon" or "aw_collisionoff". By default, collision detection is "on" (i.e. objects are solid). When collision detection is turned off for a group, all objects in that group will have collision detection off, as well as all child groups of that group. A child group may turn collision detection back on using "aw_collisionon" in its name. For most objects that do not require any object heirarchy (avatars usually DO require a heirarchy), create two groups ("aw_collisionon" and "aw_collisionoff") and use the Glue As Child or Glue As Sibling tools to collect objects under the appropriate group.

MetaBalls

Active Worlds supports trueSpace "MetaBalls", however they should be used with care as they can lead to very high polygon counts and correspondingly poor performance.

Sample COB files and conversion tools

You can download the handy cobdump3 utility here. This archive includes sample files that demonstrate each of the above COB features. It also contains cobdump3.exe which performs cob-to-rwx conversion (with support for Active Worlds version 3 RWX extensions). Cobdump3 also allows the creation of animation sequence (.seq) files from trueSpace Key Frames.