previous//next//start

The Structure of BW Tools Actors

The BW Tools actors are based on a combination of "subparts" (essentially mesh + geometry) and the connections ("joints") between them organized as a skeleton. These subparts come in groups, called outfits. For example a jacket outfit contains subparts for arms, chest, etc. and the joints between them. Using the actor studio, the end user can combine these outfits into complete actors and save them as actor files (with .actor or .star file extensions).

 

Subparts Joints

The outfits are made by creating a textual description of the subparts and joints, the assembly text, and compiling it into a binary .outfit file using the assembly editor.

There are special body outfits describing the basic body structure. Exactly one outfit of this type must be contained in every actor. Let's take a look at a male body outfit assembly text (contained in <BW Tools installation folder>\Resources\AsmTemplates\Outfit):

 

//
// Male Body Outfit
//
// Replace "malebody.jpg" with "*SKIN"
// for skin coloring based on head values
//
// Copyright (c) 2005 Brand Worlds. All rights reserved
// Copyright (c) 2005 moove. All rights reserved
//

This is just a comment block and will be ignored by the assembly compiler.

OUTFIT
    NAME "Body, Male"
    ONLYFOR MALE
 

The OUTFIT statement begins the outfit definition. The next two lines are the header part of the definition. They set the name and restrict the outfit to male actors.

Neck:    DIM 12.00 12 13
         ORIGIN 6.00 0 6
         FROM Chest 0.00 30 -4.53
         AXES X Y Z
         RANGE 320,40 340,20 340,20
         TO 0 0 0
         JOINT ChestNeck
         SRF none
 

This is the first subpart definition for this outfit. Let's take a detailed look at it...

The first item, Neck: is the name of the subpart. This name must be unique and consistent. In other words, if you are creating a subpart to replace the chest, it should always be named Chest. Please study the files supplied  in <BW Tools installation folder>\Resources\AsmTemplates\Outfit folder for the Brand Worlds standard names.

The next statement, DIM, describes the dimensions of this subpart, its bounding box:

As you can see, the values can be floating point values (12.00) or integer (12). The unit is always centimeter. Closely related to the bounding box is the pivot point of the subpart, called origin. The statement ORIGIN is used to specify the relative position of this.

The next statements describe the connections of this part inside the skeleton, the joints. The FROM statement specifies the parent of this subpart and the distance of the connection point relative to the origin of the parent. In plain English it says "the neck is connected to the chest; the connection point is 30 cm above and -4.53 cm in front of the chest origin". The next statement, AXES, determines the order and direction of the flex, twist and pivot axes. The RANGE statement defines recommended ranges for these axes in degrees. The TO allows to offset the connection point on the subpart side relative to the origin. This is usually 0 0 0, i.e. the joint ends exactly at the origin of the subpart. Finally, the JOINT statement specifies a name for this joint. Again, this name must be unique.

The following picture demonstrates the rotation axes . Please move the mouse to the rotator symbols to see the different axis directions:

 

The last line of the subpart definition declares the mesh/surface (SRF) of this part to none, making this part virtual. The graphical content of this part (mesh and material) will be defined somewhere else. This is the standard technique for creating skinned outfits. The virtual part will be part of the skeleton and influence (typically bend) a common mesh.

Alternatively, you can define a single mesh file (3DS, X or SRX) with the SRF statement. In this case, BW Tools will fit this mesh into the bounding box and move it according to the skeleton motion. In such a case, you would use a PAINT statement to define the material of the subpart.

Here an example (from "Item In Right Hand.ASM"):

RightItem:    DIM 30 30 30
              ORIGIN 15 15 15
              FROM RightHand 16 9 0
              AXES X -Y -Z
              RANGE 0,360 0,360 0,360
              TO 0 0 0
              JOINT RightItem
              SRF "*SPHERE"
              PAINT DIFF 1,0,0 AMB 1,0,0 SPEC 1,1,1 POW 75

This would add a shiny, red ball with a radius of 15 centimeters to the right hand.

Now going back to our current example, let us find the subpart with the graphical content. It is _ChestSkin:


_ChestSkin:    DIM 35.418 57.653 27.2945
               ORIGIN 17.709 0 14.8449
               FROM abdomen 0 0 0
               AXES -X Y Z
               RANGE 320,80 340,20 330,30
               TO 0 0 0
               JOINT _chestskin
               SRF _"male_chest.x"
               WRAPS (head,chest,hips,abdomen,neck,RightUprarm,RightJoint,LeftUprarm,LeftJoint)
               PAINT "malebody.jpg"

The SRF statement declares the file male_chest.x to be the mesh file. All files referred in the assembly text must be stored in their appropriate \ART folders ( e.g. 3DS files in <BW Tool installation folder>\ART\3DS ) or use full path specifications.

The WRAPS statement declares the list of subparts influencing this surface (also called the "bones"). In order to react to the wrapped subparts (bones), the mesh file must vertex "weight" information. For this purpose, BW Tools supports Microsoft .X files containing bones and influence values, i.e. weights. The recommended way is to create the meshes in 3D Studio Max® and use the subpart names as bone names. The mesh needs to be exported in .X format using one of the several available exporter plug-ins. For your convenience, we have included a sample 3D Studio Max® file with a corresponding assembly file ( <BW Tool installation folder>\ART\3DS\MAX\female jeans.max  and .asm ).

Finally the PAINT statement specifies the texture map for the subpart. As mentioned in the header comment, the system supplies a special skin texture, which will automatically match the head texture specified by the end user with the help of the head editor. Use the reserved texture name "*SKIN" to activate this capability.

There are many other options available for colorizable parts, bump mapping etc. Please consult the syntax reference for further details.

previous//next//start


Would you like to provide us with your comments on this topic?