Game Assets Workflow

March 31st, 2014

In this tutorial, I will show you an overview of a workflow for creating game assets ready to use in the CryEngine SDK.
The main focus of the tutorial is to discuss every step required to model, unwrap, bake, texture, and export a game asset using 3ds Max® tools and CryEngine plug-ins.

Software used: 3ds Max 2014, Photoshop CC, CryEngine 3

The first step is to get the reference images required before starting to model. Get as much information about the asset you can. Sketches of your own creations are great as well.

For this tutorial I choose a plasticade type barricade asset. Now it’s time to organize the process:

  1. Getting References: blueprints, sketches of the model
  2. Modeling Process: high poly and low poly
  3. Unwrapping process
  4. Baking Process: normal map
  5. Texture Process: diffuse, AO, and specular
  6. Exporting Process: textures, objects, and collisions
  7. Testing Process: using CryEngine

Modeling Process

We are going to use two versions of our asset—the high poly version and the low poly version of the model, which is the one we are going to export.

The high poly is the detailed version of our model; the polygon count is higher. The low poly version is less detailed and has less polygon density. When we talk about game assets, we focus on the low poly version because a game engine has to render tons of objects and there is usually a polygon budget to care about if we want a scene to render at a high frame rate.

In Figure 1, we have both meshes of the same model. Remember to name the meshes to identify them properly.

Tip: Use the Viewport statistics to control the density of your low poly mesh—press Hotkey 7.

Figure 1: Low poly and high poly meshes.

You can see the differences in the polygon count between both meshes, the high poly mesh has better quality over the low poly, which is okay. Later we will do the normal bake over the low poly to get the details we lost.

Unwrap Process

In order to paint over the mesh, we need to unfold the seams of it—make it a decal sheet, a 2d template where we will start the painting texture process. Unwrapping a mesh can be an overwhelming task, but don’t worry—once you practice the process you will be able to do it faster.

Unwrapping the low poly mesh:

  1. Use a checker texture to identify stretching UVs
  2. Apply UVW Unwrap Modifier
  3. Unwrap

Tip: The checker texture will help you by showing you where the texture is stretching and also will help with normalizing the texels.

Figure 2: Unwrapping Phase.

In Figure 2, you can see how the texture is finished. You can have variations of your UVs layout—just make sure it is normalized.

Baking Process

Once we have the unwrap layout and both versions of the mesh, it is time to start baking the normal. 3ds Max offers an option to allow us to bake the normal. Normal maps add the details of the high poly mesh that we missed when we created the low poly mesh.

To start the baking process in 3ds Max we need to:

  1. Prepare the meshes, move them, and fit them correctly.
  2. Select your game model, the low poly mesh, and apply the projection modifier.
  3. On the projection modifier options, under Reference Geometry, pick the High Poly Mesh.
  4. Pdjust the cage if needed. It is required to wrap the entire model.

Tip: Sometimes it is better to reset the cage and increase the amount 0.1.

Figure 3: Baking process 01

Once you are done adjusting the cage, it is time to proceed to setting up the RenderToTexture feature.

  1. Select the low poly mesh and open RenderToTexture (shortcut 0), or Rendering - RenderToTexture.
  2. Select the output directory of the baked maps.
  3. In Render Settings, enable Global Supersampler to Max 2.5 (see Figure 4).
  4. In Projection Mapping, enable and choose projection.
  5. In Projection Options, pick up the face tangent under Normal Map Space.
  6. In Mapping Coordinates, SubObjects, pick up Use Existing Channel.
  7. In Output, select ADD and add normalsMap and pick up the size 1024 x 1024.
  8. Choose file name and type. I prefer to use TGA extensions.
  9. Render.

Figure 4: Setting up RenderToTexture.

Note: You can see the results in the output directory. If the render shows red color of some of the parts it means that you are required to adjust the cage because some rays are missing. The same happens if you got a wave-like effect on your normal.

When the baking is done you will have to edit the normal map using Photoshop. Just clean up any artifacts or holes produced in the baking process. Use the NVIDIA Normal Map filter plug-in in Photoshop to get more control over your normal map.
.
Tip: NDO plug-in for Photoshop is another great tool for enhancing your normal maps.

Texture Process

Diffuse, specular, and normal maps are used most often to create the game asses. Sometimes other maps such as ambient occlusion, height map, cavity map, and others are used to create more details over the model. For the purpose of this workflow, we are going to use only the diffuse, specular, and normal maps.

Use Photoshop to do the textures. Diffuse texture is the color of the object; the specular texture has the “shininess” values of the object (the more white, the more shiny). For example, metal will be whiter and normal maps that were already done “fake” the lightening of bumps, creating more details over our objects.

Save your map as .DDS or .TGA. TGA is “heavier,” while .dds is more optimized; .DDS is preferable.

Exporting Process

For exporting, we are going to use CryEngine tools for 3ds Max. At the end of this article you will find the links to download and install the tools needed in the workflow. Remember to properly name the objects, materials, and exported files. Textures: Use Crytek shader and put the textures on each map slot of the material. Use Material sub/Object for the purpose. Material id 1 for the render mesh and material id 2 for the proxy (collisions), assign the materials id on each object corresponding to its id.  Another thing to consider is to open the CryEngine before you export the materials.

Objects: Create a dummy object and move it to position 0,0,0 and attach the low poly mesh to it. Place the low poly mesh above the grid. You will have to attach the collisions to the mesh and the mesh to the dummy.
Collisions: Create primitives to surround the low poly mesh and name as $physics_proxy_01 in incremental if you use more than one.

Tip: Use Crytiff plug-in for Photoshop to save the materials properly.

Figure 5: Exporting process.

Note: It is important that you create a new folder in the gameSDK Directory.

For example: C:\Cryengine\GameSDK\Objects\Street Assets. 

Testing the asset in CryEngine Editor

Finally, open the CryEngine Editor, test it in any level, and when the level is opened press “M” to browse the materials, search for the material you just created, and configure them.

You should see three materials slots: For “proxy” (the name of the collision material) choose shader, No draw. And in the main material (assigned to the low poly material):

  • Shader: Illum
  • Surface Type: The one that represents the object such as plastic or metal.
  • Textures Maps: Assign your textures on each main slot of the type of map you have created.

Now, go to Brush, then place your model. You now would be able to test it.

Figure 6: Testing process.

The main goal of this tutorial is to show you a workflow for creating game assets for CryEngine. Some tips and tricks appeared and I really hope you take the best from it. The link below has information about how to set up the CryEngine in 3ds Max and Photoshop. Feel free to email comments and suggestions—I’d like to hear from you.

http://freesdk.crydev.net/display/SDKDOC3/Getting+Started

Israel Uriel is a CG freelance artist from Mexico. He studied Systems Engineering at The Technological Institute of Higher Education of Monterrey. After working as a freelancer web designer, Israel dedicated his time and effort to follow his passion as a 3d artist. He is passionate about hard surfaces advanced modeling and game asset creation. Contact him at izrael_net@hotmail.com.

Join AUGI Today

Become part of the largest Autodesk community


Appears in these Categories