Getting Started Modeling

Overview

This page will go over some general information to keep in mind while creating assets for various uses within CRYENGINE.

Modeling Guidelines

The following are some of the important guidelines that you should follow when modeling an object:

Always think about how you spend the polygons. Keep in mind that a smooth silhouette is more important than the high tessellation of a flat surface.

Take a look at how the polygons have been spent on the following car model. The flat side panels are very low poly, whereas the parts that form the silhouette, like the fenders, have a lot of segments.

Add edges to retain proper geometry shading in the engine. If necessary, chamfer the edges or add additional edges.

By doing this, you can often save normal maps and smoothing groups. By adding just a few extra edges, the shading on the car on the left looks smoother.

Keep the tessellation in mind. Before exporting, always make sure to manually adjust the tessellation. Every triangle should use the biggest amount of space possible.

This helps to keep the shading consistent and the artist can make sure that the tri strips aren't broken. Avoid tri fans.

Use as few shading groups as possible. Adding a new shading group is often just as expensive as chamfering the edges and using only one shading group because the vertices in the different shading groups will be split and effectively doubled in the engine.

Additionally, having chamfered edges in the silhouette helps the shading (they create a highlight) and avoids aliasing issues because a chamfered edge doesn't look as harsh as just two faces in different shading groups.

Also, it looks more natural because most edges aren't 100% sharp. This needs to be decided on a per asset basis.

Always try to use primitives like boxes, spheres, or capsules for the collision/proxy geometry. Even using multiple numbers of these elements is generally cheaper than an individually-modeled collision proxy.

Keep in mind that decals will always be projected in both directions. This means that not everything needs to be covered by collision primitives as long as something underneath or on top has a collision primitive.

Of course, this applies to only the surfaces that the player can't reach or walk on. Always close the collision proxies and apply a smoothing group to them.

Ensure that you use dummies in when exporting the scene. This helps to keep the file clean and enables other artists to easily work with the file.

Work with layers and follow the naming conventions.

It is essential that you get rid of as much stuff as possible from the LOD's:

  • The first LOD should not contain any small details.
  • Transparent objects like glass can be deleted.
  • Retain the silhouette.
  • Try to get rid of some of the material IDs.
  • Compensate for the color change by remapping or by using vertex colors, or even both.
  • The second LOD should not contain any curvature, as long as it's not necessary for the silhouette.
  • Make the most of the surfaces planar and get rid of most of the details in the mesh.
  • The last LOD should be as low as possible.
  • Get rid of everything that is not needed to retain the silhouette.
  • Use only one material ID.
  • Again, compensate by using vertex colors or texture remapping.
  • Reduce the triangle count (by at least 50%) in each LOD.

Spend the polygons in the areas of the mesh that the player can get close to. Neglect the stuff that is farther away.

Think about where the asset will be used. If it is a background object, ensure that it is as cheap as possible (lower tris/texture resolution).

Try to match the smoothing groups/material splits/UV borders with each other.

Every time material splits/smoothing-group splits/UV border-splits share the same edge, vertices will split only once and the tri count won't be affected as much as it is when having splits in different places.

Again, always use as few smoothing groups/material IDs/UV borders as possible.

Get rid of the backfaces. Delete polygons that can't be seen by the player.

Combine the meshes into unique meshes. This saves drawcalls.

Texturing and UVWs

The texture size that you should use for an object is related to the amount of space that the object will use on screen. For Crysis, Crytek aimed for a screen resolution of 800 x 600 pixels. Let's assume that the object will fill half the screen's height at all times (600/2 = 300 pixels); therefore, you should use at least a 256 x 256 screen, and 512 x 512 will be even better. The best case scenario will be to have 1 pixel on screen represent one pixel in the texture. Of course, this depends on how big the object is in all the dimensions, as you can't really translate the texture space in 2D directly to the amount of space it will use in 3D.

Try to keep the texel ratios for all objects, constant. This means that every object on screen uses roughly the same amount of texture pixels per meter. By doing this, you will ensure that all the objects have roughly the same sharpness on screen and that the textures don't look muddy.

Objects that are always on screen and at the same distance to the player (for example, weapons) can use a higher texel ratio in areas that are closest to the player (butt-stock, iron-sights, and the like).

Always keep the textures square. Square textures are quicker to process than a texture with a ratio of 2:1. If you have an object that you would usually map with a non-square texture, try to use a square texture and map something that is very likely to be used together with the the object, onto the texture.

Reuse the textures. Always try to keep the textures tileable if you are building an asset that doesn't use a unique unwrap. Also, share textures between objects in the same level.

Use alpha textures, but don't go overboard. The more the space on screen covered by an alpha plane, the more expensive it will be to render. Alpha planes use alpha testing, and thus, require a second drawcall.

Keep the overdraw in mind. It is often better to cut the alpha-mapped polygon plane to match the shape that it represents. This keeps the amount of alpha on screen as low as possible. This also allows you to put more objects on the texture map.

Merge the UVs. Ensure that all the UV vertices that are on top of each other, are merged. This is especially important for the mirrored parts in the mesh. It prevents the splitting of vertices at the UV borders.

There are some creative ways to create visual variety, while still using tileable textures:

Use vertex colors. It's an easy way to add color variation and shading information to the mesh. Start out with an Ambient Occlusion bake to the vertex colors, and then manually add color.

Before adding another material, consider adding additional vertices to get variance. Use vertex colors to locally add contrast and color information to the tiling textures.

Rely on decals to provide some variance to the textures. Don't apply decals in the Editor; create them in your modeling package by using the floating geometry option and a decal texture.

Keep all the decals in one texture so that you don't need additional material IDs. Always combine textures that use alpha, in one sheet.

In some cases, you may want to add additional details to the texture, like an extra trim or a bottom piece to give it some variation.

This is usually a good idea, but make sure that the main part of the texture is still tileable in itself. You need to add a few more triangles to the mesh to make the texture tile.

Usually, the visual gain is worth it and it gives you a chance to add more variation with vertex colors.

Make the most out of the textures. Do not use an already tiled image as the base. Get as much detail in there as possible, or reduce the texture size.

Use all the available texture space. Don't use black as a background color in the initial texturing phase (also, don't use red ingame because of mipmapping). Black is neutral and it doesn't give you a good idea about how much unused space is left.