Creating Assets

From Multiverse

Jump to: navigation, search

Contents

General model requirements and guidelines

Models should be "Y-up" where the Y-axis points up, and the model faces the positive Z-axis. Note: with 3ds Max, you can use Z up instead, but you must then pass the --3ds flag to the model conversion script.

  • Place feet of characters, monsters, and animals, at Y=0 (ground level).
  • Center the model at X=0 and Z=0.
  • Use a maximum of four influences (bones) for vertices in a skinned model.

All named materials and components must use only ASCII characters. All file names must contain only alphanumeric characters and the underscore character. Spaces and dashes are not allowed in file names. Do not use spaces, punctuation characters, or special characters in object or mesh names.

Triangles

Use 3-sided polygons (triangles). Do not use four-sided or n-gon polygons. Follow these additional guidelines:

  • Use one-sided polygons with a manifold or "closed" model.
  • Triangles should have good edge loops for good joint deformations.
  • Match armor to the underlying armors and base body with mesh topology. This reduces problems with the mesh-on-mesh system. Try to match triangles as much as possible; exact match is not required. Triangles for clothing or armor may be displaced outside of the skin.

The following limits are not absolute, but will lead to best performance in most cases.


Suggested Triangle Limits
Model Triangle Limit
Player characters

3000 total (up to 3500 if necessary)

  • Head:1000 triangles. (1500 for 3500 triangle models)
  • Torso: 1300
  • Legs: 750
Mobs (humanoids)

1500 total (base body)

  • head: 1000
  • hair: 500-1000
Buildings 1500
Complete suit of armor or set of clothing 3000 for (2000 if no helmet or hat)
Weapons 200

Note: These suggested limits are appropriate for a small-scale game/world. For a larger game/world, polygon limits of 1000 to 2000 are probably more appropriate.

Setting triangle count targets

The optimal triangle count target depends largely on the hardware you expect users will have. The rendering time for a triangle is dependent on many factors including rendering mode and shaders.

Another factor is the number of distinct rendering calls the graphics engine has to do on your behalf. Current hardware is capable of drawing about 1000 objects to the screen each frame. If you use multiple materials for a 3D model, the engine has to break up the model into submeshes, and before it renders each submesh, it has to load the material. The overhead of loading materials and setting up rendering calls increase relative to the cost of rendering a triangle as graphics hardware gets faster. So, in general one object with 10,000 triangles will render much faster than ten different objects each with 1,000 triangles.

For example, the target triangle counts for Kothuria, are on the order of 100,000 for terrain, 100,000 for character models, and 100,000 for all other models (buildings and mobs) that a player can see at any time.

Skeletons

Make sure that the model is the correct size before constructing its skeleton. A skeleton must be the same size and orientation as any model rigged to it. Important: You must do this from the start—scaling or orientation transforms made to a skeleton do not carry over into the Multiverse client. All skeleton bones should have unit scale.

Before binding the skeleton to the mesh, set the skeleton into its bind pose, and perform a modify/freeze transform on it, making sure the joint orientation is correct. When binding the skeleton, bind as much of the mesh and the base body at the same time to reduce problems with the mesh-on-mesh system.

Skeletons should be limited to 64 bones, since this is the limit that will be processed in hardware skinning. This limit shouldn't be that hard when creating player/human models. A "typical" skeleton rig with arm, leg, foot, spine, head and hands has on the order of some 50 some bones - and that's including fully jointed fingers and thumb.

Textures

Texture colors can use an unrestricted palette, and can include an alpha channel. Recommended sizing:

  • High-profile animations such as skin, armor, important buildings: 1024 x 1024
  • Common textures such as peasant clothing and normal buildings: 512 x 512

To make maximum use of the available space for UV maps:

  • Use relatively large amounts of the texture area in complex regions of the model.
  • Use small amounts of the texture area in simple areas of the model.
  • Try to use all of the texture area, to avoid wasting resources.

When using the alpha channel, there are a couple of things to keep in mind.

  • If there are multiple submeshes within the same object that incorporate an alpha channel, they may not be drawn in the correct order, and one surface may appear to be in front of the other.
  • Textures where the alpha channel has various levels of alpha that requires blending are much more expensive than a simple alpha bit.

Submeshes

In addition to the number of triangles, pay attention to the number of submeshes in a scene. Each submesh turns into a separate DirectX draw call that is very expensive. The total budget for submeshes in a scene is generally from 300 to 1000, depending on desired framerate and target hardware. The number of draw calls is a key performance metric to pay attention to, as well as the number of triangles.

For more details, see this NVIDIA paper that explains the problem.

Animation guidelines

When generating the meshes and animations for use with the Multiverse client, there are two types of files.

  • Composite mesh file: Contains the nude figure as well as the armor or clothing. There must be one and only one composite mesh file per object. Multiverse uses this file for the mesh data (skin weights, positions, normals, texture coordinates, and materials) and to determine the bones in the skeleton and their bind position.
  • Animation file: Contains the nude figure (skin data for animated bones). Multiverse uses these files for the skeleton animation data (positions and orientations of the bones at a given time).

The Multiverse game engine references a single skinned model of any set of armor or clothing. The clothing can't be skinned differently for different animations. The graphics engine dynamically assembles the nude figure mesh and any clothing meshes, and then moves those meshes based on only the animation data from the animation files. If an individual animation file has different skinning information from the composite mesh file, it will be ignored by the graphics engine.

Blended animations

Blended animations enable you to combine multiple animations; for example you could combine animations for simultaneously running, firing a gun, and looking up. Instead of building separate animations to cover all possible combinations (which could be very time-consuming), use blended animations and combine them as desired.

The Multiverse Client supports cumulative anmiation blending, so that if one animation does not affect the arm, and another animation does affect the arm, the arm moves.

In contrast, average animation blending transforms each blended vertex by the average of all of the currently playing animations. If one animation caused the arm to move, and another animation left the arm standing still, it would move the arm halfway. This is rarely useful.

Caveats

When blending multiple cumulative animations, it is easy to accidentally include a transform multiple times. If the bind position has the arms in T pose, but the run animation has them at the side, and the look animation has them at the side, the combination will not be correct. The run animation causes the arms to be bent downward by around 90 degrees at the shoulder, and the look animation causes them to be brought down around 90 degrees. The product of the two of these will rotate the arm around 180 degrees at the shoulder, completely destroying the arms.

In this situation it is particularly important to know what the engine is using as the bind position, since the offset from bind position is what is important. The skeleton's bind position is determined by the base model used in the ConversionTool process. This bind position is not necessarily the bind position in the modeling tool. Unfortunately each submesh can be skinned in a different position, and the skeletal animation infrastructure requires a single common bind pose for the model.

To address this, use the initial position of the base model as the bind pose, and reskin the model to that bind pose. It is a good idea to make the initial pose of the model the same as the bind pose to avoid confusion.

Recommendations for character positions

Build an animated character's skeleton to accommodate future animations, more than you might initially specify. Even if the only animations you specify initially are "idle" and "walk", build a skeleton that can accommodate such animations as "attack" "jump" and "die".

In general, provide at least the following animations for each mob or character.

Animation Position Guidelines
Position Description
Idle A relaxed, standing position that plays in a loop when a character is not doing anything specific.Generally, it should not have much movement, but have some breathing, a turn of the head or a shift of weight. Idle animations should be short and not have too much movement because players see the motion repeating over and over.
Combat idle Used for any combat situation, and therefore as the start and end pose for each fight animation. Since a character can potentially hold a variety of weapons, combat idle should have the character's hands and arms in a neutral position, with bent elbow, and hands forward.

Test a combat idle animation using several different weapons (for example, shield and a dagger) to be sure it looks good. Combat-idle is cyclical animation. It starts and ends in combat idle starting pose, which can be different from the idle or neutral pose.

Run Displayed when a player moves, or when an NPC is moving quickly.
Walk Used primarily by NPCs. Player characters don't generally display this animation (they run, not walk).
Recoil (get hit) Displayed when a character receives a strike or attack. Generally shows a strike to the body in the chest area from a right handed opponent striking with a swing from top right to bottom left motion. Starts and ends in combat-idle starting pose.
Strike Basic one-handed slash with a sword that starts and finishes from combat idle. Starts and ends from combat-idle pose.
Die Played when a character dies. Start death animations from combat idle, and finish with the character dying. Characters should retain their weapons when they die.

Duration and complexity

In general, make game animations under one second long. Since animations are generally based on 30 frames per second (FPS), this means that most animations will be 30 frames or less. Exceptions: idles (for example, idle and combat idle), looping animations (for example, walk and run) deaths, and special attacks that require long durations.

Some animations will play repeatedly, so keep this in mind when conceptualizing how everything will play out. If a player is fighting a pack of wolves and every time a wolf is hit it plays a get hit animations that takes 24 frames, even though this is less than a second, by the time the player watches that 24 frames for the tenth or fifteenth time, they're going to get pretty frustrated and not like the gameplay.

For this reason it's important that most common animations be as simple and short as possible. A common death animation should be just falling over, without much fanfare. a get hit animation should be even shorter, a strike animation should be quick and repeatable.

The exception to this rule is when a player uses a special attack, or a very strong opponent is killed, or when there is some magical attack or special animation. These animations are meant to be the punctuation in a conflict. The vast majority of fights that a player will have will be over in less than 30 seconds. More difficult adversaries will take longer, perhaps a minute or two, and there will be more time and opportunity for the player to use special moves and have a more interesting fight experience. In such cases, a more dramatic death animation may also be warranted.

Animation help

There is an excellent short tutorial on creating a walking loop animation available at http://www.anticz.com/Walks.htm.

Example: typical animation package

A typical animation package for a human male model with an outfit might include the following components:

  • Model containing clothing and armor
  • Nude figure texture
  • Armor/clothes texture(s)
  • X number of animations on nude figure

Guidelines for 3D Studio Max

This section provides information on creating models with 3ds Max. For information on exporting assets from 3ds, see Exporting from 3ds Max.

Start with a clean work environment

Be sure to reset the 3ds environment, so left-over settings from previously-used models don't affect new models. Follow these steps:

  1. Choose File -> New File to get rid of existing settings
  2. Choose File -> Reset resets the 3D Max environment to the original settings
  3. Choose Customize -> Units Setup and then set the World Units to 1.0 = centimeter. This is especially important when importing models into Max using other formats such as COLLADA.

Skin Controller

When creating a skin controller for setting a model up with skeletal animation, be sure that if a bone is included in the skin, that that bone's ancestors are also included.

Time configuration settings

Use the following time configuration settings for animations:

 3ds animation settings

Create the socket/node object

  1. Click the Dummy button of the Helpers section of the Creation tab.
  2. Create a dummy box and position it where you want the socket to be created. This point is where a particle effect or other attachment will be placed.
  3. Rename the dummy node to the node name appropriate to the socket name you want. For example, if the socket name is chimney, the dummy node should be renamed mvsock_chimney.

Rotate the pivot point

Rotate the pivot point of your new socket so that the Z axis points in the direction your attachment should have. For example, if you are creating a chimney, you will want the smoke particle effect to go up, so the Z axis of the socket should point up.

  1. In the Hierarchy tab, click the Pivot button on, and click Affect pivot only.
  2. Rotate the pivot point to the desired direction
  3. Unclick the Affect Pivot Only button.

Attach the socket to the bone

  1. Go to Graph Editors, which is a new schematic view.
  2. Use the Connect tool to make the new socket the child on one of the new bones.

Correcting system units

The current versions of COLLADA have been broken by Feeling Software and do not correctly embed the system units information into the .DAE file durring export of the model. To properly reflect the system units of development, you must edit the .dae file as follows:

  • Open the .DAE file.
  • Find the line that looks like this: <unit meter="0.304800" name="feet"/> or <unit meter="0.025400" name="inch"/>
  • Change this to <unit meter="0.01" name="centimeter"/>
  • You can then then run this file through the export process end end up with the right size model.

Tips for animated models

When creating animated models:

  • Create an animation of you character that is just the bind pose. Use this animation as the base animation (the file that is converted into the first st of files including the skeleton file). Do this so the weighting data of the skin comes across uniformly into all of the animations that get folded into the file after this point.
  • Hide any cameras, lights or objects that you don't want to export. When you hide an object, it will not export.
  • Un-hide and Un-freeze the entire skeleton except for end nubs that aren't weighted in the skin modifier.
  • Un-hide and Un-freeze the skinned mesh(s).
  • The one skeletal hierarchy must reside under a single root node.
  • Do not attach meshes to the skeletal heirarchy.
  • Skin all export meshes to the skeleton.
  • The skin modifier is the only currently supported way of skinning a mesh to a skeleton.
  • There can be no separate meshes in the file that are unskinned to the skeleton.
  • Animated model exports must contain an animation component (two keyframes) for proper export.
  • Collision volume primatives such as obb are not currently supported by animated models.
  • The only current collision volume supported for animated models is a single capsule. This limitation will be removed in future releases.
  • For every skinned mesh, the skinned modifier in the Add Bones dialog box must contain all bones in the skeleton (except nubs) even if they don't have weights associated with them, to maintain an export chain for the conversion tool.

Guidelines for Maya

Save all Maya models in .ma format. If you plan on redistributing the asset, then the model must render without any plug-ins.

Follow these guidelines:

  • Set the near clip plane to 100 and the far clip plane to 10000.
  • Set Up Axis to "Y" in Maya Settings/General Application Preferences.
  • For animations, set the frame-rate to NTSC 30 frames per second.

Before building skeleton

After conceptually defining a model, but before building a skeleton, use the "Freeze Transforms" command to reset all transform defaults to the current position. Perform this function on the skeleton before to binding it to the skin. Also perform this step on architecture and other unrigged models when delivering a final model.

Before rigging

After conceptually defining a model, but before rigging it, use the Polygons | Cleanup tool to to identify any problems with the polygon mesh, such as manifold surfaces (polygons with four sides or more). Maya has some odd ideas on how things should be triangulated, so if you do use the auto clean up from the Polygon | Cleanup tool, check the topology and make sure that it still works. Also perform this step on buildings and other unrigged models. Remove any history from the meshes before binding.

Personal tools