Triangles or Quads For Video Games?

Let’s start by looking at the basic shapes of polygons used with 3d modeling:

polygons

Triangles are made up of 3 sides which meet at the corners (called vertices). Quads are made of 4 sides. You can see in the above image how every shape can be broken down into smaller triangles.

ngon

Ngon example

There is also what is call an ngon, which is used to refer to a polygon made of more than 4 sides and has not been divided into triangles or quads. Ngons are not acceptable for games.

What to use:

Since all surfaces are automatically broken down into triangles in the game engine anyway which should you model with?

tri-to-quad

Dividing a triangle into quads.

Edge flow on organic models is important when you go to animate them to avoid problems with deformation. In these instances quads are preferred and should give you better results.

Additionally with programs that subdivide your model many times, such as Zbrush, quads will give you cleaner results because of the way triangles are subdivided.

eye-good-edge-flow

Good edge flow around an rhino’s eye.

On low poly (like those used in games) or hard surface (e.g. a table) models, modeling with triangles is perfectly acceptable. Just make sure that you have good edge flow where there will be joints so that during animation the model deforms properly!

Once your model goes into the game the cost of that model will largely come down to how many triangles (commonly referred to as tris) the model is divided into, so plan wisely!

Comparison of silhouettes based on triangles used.

Comparison of silhouettes based on triangles used. Source

 

 

Types Of Texture Maps for Video Games

which texture maps to use

Once you start to texture your models you will run across the different types of texture maps. It can be confusing about when and where each type should be used, and even how they are different from each other.

Based on which modeling software, renderer, or game engine you use, some map types may work better than others or not at all they also require the maps to be provided in certain formats. I will be focusing on a Maya to Unity workflow, but I will include information for 3ds Max, Blender, CryEngine, and Unreal Engine where I can. For this chart, I am going to be sticking to the types of maps commonly used with gaming, there are many many more which I will not cover. If you want to learn about those, check out the Further Reading section down at the bottom of this post.

One thing that is consistent throughout various software is how texture maps are applied:

Mesh in Maya

Mesh in Maya

  1. First a model has a mesh, the mesh is the polygonal faces that you can see (wireframe draws the edges of the mesh). The mesh is typically represented by a gray color.
  2. Materials are applied to the mesh. Common types of materials are Blinn, Lambert, and Phong. The type of material will effect the quality of the render, how much it costs (cost is how much processor time the render will consume), and which attributes can be changed.
  3. Texture map(s) are applied to the material (these can be color, specular, bump, etc.). A texture map is laid out in a UV texture space from 0-1.
    Blinn in Maya

    Blinn on mesh

    Typically texture maps are square and sized in base 2 number of pixels (ex: 64×64, 128×128, 256×256). Some engines and platforms allow odd sized maps such as a few games made for the PlayStation 2.

Color

Color is what really defines a model. These should have the base color of the model, variation in that color, and even dirt or wear that has come to the surface. Use many reference images to get it right. For the most part, these are the only required maps in a game.

Color Map (Sometimes called Diffuse (3ds Max, Unity) or texture):

blinn-color

The color map is a texture space used for the color. Shadows can be drawn into the color map to define geometry that doesn’t exist on the model through a technique known as “baking”.

It is worth noting that some software (including 3ds Max and Unity) refers to the color map as the diffuse map, however diffuse is something different. This confusion is likely due to a fast developing industry where no standards where in place at the time of naming.

Color Map Examples:

UVtemplateColor

UV Template

Color map for various tools

Color map for various tools

color map for 3d

Color map for tillable floor

Color map for a blue gas pump

Color map for a blue gas pump

Light

Maps can be used to define how light reacts to the material by controlling how much light is absorbed by the material and how reflective it is (ex: metal, wood or even cloth) as well as other emulating other elements we see in the world.

Specular Map:

blinn-color-spec

The specular map defines where in the texture space it is and is not shiny. These maps are drawn in gray scale where white is shiny and black is not.

Specular maps can be used to decrease the shine is areas with dirt or moss.

Specular Map Examples:

checkered specular map

Specular map for example

Specular map for tile floor

Specular map for tile floor

Specular map for wound

Specular map for wound

Diffuse Map:

Honestly, diffusion maps aren’t used in gaming much because of their cost but are baked into the color and specular maps. I am including it here to clear up some confusion that Autodesk’s 3ds Max caused about what a diffuse map is.

Using the word properly, diffusion determines how much of the color you can see by regulating how much light is reflected and absorbed by the material.

Diffuse maps are in shades of gray, with white causing the surface to become more diffused, and black having no effect.

For example a perfect mirror that reflects all light (and has no color) would have low diffusion and be represented by a black diffuse map. Wood has a higher diffusion and would be represented by a shade of gray on the diffusion map.

Another way of seeing how this effects your color map is to set the diffusion map to multiply in Photoshop over the color layer.

 

Gloss Map:

 

Ambient Occlusion Map:

 

Reflection:

 

Texture

Maps that add texture to the model are powerful. They allow models with a low polycount to appear to have much more geometry than they have in actuality. These types of maps do not modify the silhouette (see the rendered normal map example below) so you will need to be careful when adding them near edges.

Bump Map:

The way bump maps are represented is that white is high on the model, and black is low, gray is neutral and is inline with the mesh.

Sides of where the bump maps effects the model can look jagged since they only work in one direction; up and down. Normal maps are an attempt to improve on bump maps and should be over bump maps where they can.

Bump Map Examples:

Bump map for bark

Bump map for bark

Bump map for roof tiles

Bump map for roof tiles

Normal Map (also called bump maps):

textured mesh for 3d video game

Normal maps are an improvement over bump maps and are more commonly used in game design. They are mostly blue, rainbow colored maps.

A very common use is to model a highpoly version of a model and then bake the geometry from it onto a lowpoly version as normals. This technique can save millions of polygons and allow a complex model to be used in a game where otherwise it would cost too much.

Normal Map Examples:

square normal map

Normal map for example

Normal map for K-rail barrier

Normal map for K-rail barrier

 

Other

Alpha Map:

Opacity

 

Further Reading

Photorealistic Texturing for Dummies (mirror)

Resources

 

Getting A Good Education in 3d Design

 

Earlier this week Issac asked:

Hey Scotty….. quick question.

Know any online schools that do majors in 3d graphics or 3d animation…?

Been talking to the parentals recently and have decided that online schooling is a bit more….. efficient than other schools….

Got any ideas/suggestions?

 

Thanks for the question Issac! Unfortunately I don’t have a quick answer, but here we go anyway…

Full Sail is the only credited school that I know of that has 3d design. Yes it costs a bunch, but if you apply yourself, you can be making $70k/yr right out of school.

However, most companies in the field don’t really care if you’re graduated or not. They want people who are good at what they do and know their stuff (Take a look at your favorite studio’s job section to get a better idea). If you’ve worked on shipped titles your chances of getting the job are much higher, however that introduces a catch-22.

By the time you are done learning, the tools (software/hardware) you learned on will be outdated so focus on learning the techniques not the tools.

While a lot of the tools and techniques are similar, choose if you want to focus on movies, games, or mechanics (like airplane parts and stuff). What do you want to be doing in 2, 3, 4 years? Also you need to look at yourself and figure out how self motivated you are. Online courses which allow you to work at your own pace and pay monthly/yearly can be much harder to focus on than having to physically go to class (trust me, I’ve done both!). But go at your own pace courses can be extremely rewarding!

I have heard great things about Gnomon. And they offer many different courses.

Digital Tutors is an amazing resource. You can start with the beginner courses free (in fact, follow along with some free courses RIGHT NOW. Forget about if they’re hard or not. Do you enjoy what you’re doing?). Follow the learning paths they provide and learn everything you can about topics. Allow learning to become an addiction

Photoshop… Learn it while in high school. Edit photos, create concepts, paint textures. This is the backbone of EVERYTHING that you will create!

Software… Go legit, don’t waste your time trying to get cracked versions. If you later sell your work you WILL BE found out and no reputable studio will hire you. Student discounts are great, but upgrade to the full version if it costs only a little more so you can make a little profit on the side if you want to.

Blender… Yes you can learn it and create amazing things, but it isn’t yet popular in any industry (except with indie game design). Again, learn techniques, not software. However additionally learn a few extra tools (ex: Maya) so you are knowledgeable and can easily switch between programs.

Choose a program and stick with it! Don’t be learning Maya one day and 3ds Max the next. You’ll probably never learn ether that way.

Autodesk… has some of the best software you will come across. They provide watermarked versions for students completely free of charge. Use it, love it, but remember you will have to pay for it someday.

Updates… Check how long you will receive software updates for after buying, are you covered for the major version? For a year? Lifetime?

Hardware…Get hardware you don’t have to worry about, don’t save $200 on a generic only to have to spend hours trying to get the drivers to work.

Windows vs Mac vs Linux… Use Windows or Mac. Don’t use Linux for 3d development, there simply isn’t support from most companies for it. Both are respected in the community. Use whichever is most transparent to you so you don’t have to learn a new operating system ON TOP OF new software (it’s a pain). Popular software is the same on both systems (Photoshop, Maya, etc…).

Don’t just do classes… Find something away from keyboard that makes you feel alive and that you enjoy, or you’ll find that you missed out on something huge once you come out of the “learning coma”.

Save often and save versions of files as models progress.

Look around, and check out different schools. Ask what software they use. Have the instructors worked in the industry? Checkout what projects graduated students have worked on.

–Scotty

 

Leave a comment with what tips you’d offer about getting a good education.

Have a question? Send a note!

Learning The Basics of Maya

Progress of modeling an airplane

Over the past few weeks I have been learning the basics of Maya with the Introduction to Maya 2013 course by Digital Tutors. Most of the course was review for me from Blender and Inventor, but it was very helpful learning where menus are located and the shortcuts in Maya. The course takes you from simple concept art (shown in the base layer in the image above) are teaches you the techniques to model and animate an airplane. I found it encouraging following along with the project and seeing my model progress.

I need to remember that I will not be using NURBS models with Unity 3d, but need to focus on polygonal modeling. This is where you may want to change your path if you want to model for movies as NURBS modeling will be perfectly acceptable in that field.

 

To review my knowledge of Maya and 3d modeling I decided to work on a small project. I remembered some old concept art I had of a sword and I had a go at modeling and texturing it.

fantasy sword with markings

Sword Concept Art

UVs layed out on sword

Unwrapping UVs on the sword for texturing