Intro To Models - Page 1

Lets now look at the pipeline of getting models from softare to Unreal Engine.


Index


  1. Anatomy of a Model
  2. What Makes a Good Real Time Model?
  3. What Makes a Good Real Time Model Part II?
  4. Scale
  5. Levels, Props & Skeletons
  6. Materials
  7. UV Mapping
  8. Bad UVs
  9. LOD
  10. Pivot Point
  11. Collisions

What you will need?

For this project you will need to be install Unreal Engine 4.22.x , have a GitHub account (which is free of charge) as well as GitHub Desktop.


Anatomy of a Model

Lets look at the some terminology and what it means for a 3-D Model.


  1. UE4’s models need consist of polygons. It will not take models that are made with NURBS or other surface types. A polygon is a plane that has at least three lines that connect to form a closed shape.

    The best format to take into Unreal is the FBX format. Most 3-D software will allow you to export your model as polygons in the FBX format. This is a proprietary format that is used by most software but is owned by Autodesk.
Create new sprite with button

  1. Lets look at the simplest polygon a face. Here it is displayed in Maya 2019:
Create new sprite with button

  1. A polygon is made up on vertices, edges and faces. Lets look at a vertice. It is an X, Y, Z point in 3-D Space. So a plane consists of 4 vertices. They all connect to each other to form a closed shape.
Create new sprite with button

  1. So this plane consists of 4 Edges. Every pair of vertices contains one edge.
Create new sprite with button

  1. Every group of edges that form a closed polygon is called a face:
Create new sprite with button

  1. Now even on a single plane, it can contain multiple faces. If we divide this one plane up into a 4 by 4 grid. We get 16 planes. Make sure you have no faces made up of more than 4 lines. These Ngons (N stands for any number greater than 4) will be problematic in Unreal.
Create new sprite with button

  1. Now lets look at some hidden attributes that you don’t see but are very important to how surfaces are displayed. Each face has a normal which is a perpendicular line to the tangent plane of the surface. The normal is used for determining the surface’s orientation for lighting.
Create new sprite with button

  1. A vertex normal has the normals from all adjacent faces. This way the renderer can figure out where the edge lies for lighting and shading.
Create new sprite with button

  1. These normals can be adjusted to behave differently without adding geometry to the model. In 3D Studio Max is is called Smoothing Groups. In Maya you can affect the surface normals by softening the edge of the vertex normals on a face.
Create new sprite with button

  1. This takes an average of the three vertex normals and softens the edge. This will be exported and viewable in UE4.
Create new sprite with button

  1. Download the Unreal Engine project in GitHub Classroom. The link can be found on Moodle. Clone the project using GitHub Desktop and open the new project you just created.
Create new sprite with button

  1. The game should boot up to the Test Map. If not go to the Maps folder and double click on Test. Go to the Geometry | Static Mesh | Smooth Edge folder. You should see to static mesh models.
Create new sprite with button

  1. Drag SM_Hard_Edge and SM_Soft_Edge into the level next to each other.
Create new sprite with button

  1. Play the game and you should see a difference between the two edges. If you look carefully it is not the same as a fully rounded edge (with additional geometry) but does “soften” the edge.
Create new sprite with button

  1. There is another way of simulating geometric details that are not in the base model. Lets look at these two objects. Here is a low poly sphere with 144 faces:
Create new sprite with button

  1. The other model is made of 40,000 faces.
Create new sprite with button

  1. The faces are so small that the ball looks perfectly round. So we see we have one model that is much smaller (and therefore faster in the engine) than the other.
Create new sprite with button

  1. What we can do though is grab the normal’s from the high poly spheres and use those normals to shade our low poly model. This is done by saving them as a texture as opposed to geometry. What the RGB channel holds is XYZ data of a vector. This uses the face normal on the high polygon model and encodes it in a pixel on a texture map. The texture normal map of this sphere looks like this:
Create new sprite with button

  1. This texture matches the UV coordinates of the low poly sphere.
Create new sprite with button

  1. A UV is a texture map that assigns pixels in the image to a face on the model. So this is what a sphere would look like with a map texture applied to the UVs.
Create new sprite with button

  1. If you go to the game and double click SM_Low_Poly that is located in the Geometry | StaticMesh | LowHiSPhere folder. Notice that it has 552 vertices.
Create new sprite with button

  1. Open up SM_High_Poly mesh by double clicking on it. Notice that is uses 40,399 vertices. These were both generated from the model we saw above in Maya.
Create new sprite with button

  1. Drag SM_High_Poly and SM_Low_Poly mesh into the scene.
Create new sprite with button

  1. Now lets see how we can use the normal map to get some of the benefits of the high polygon model with a reduced cost to processing time in the computer. Go to the Materials folder and right click on M_Rough and select Duplicate.
Create new sprite with button

  1. Name the new material M_Rough_Normal.
Create new sprite with button

  1. Go to the Content Browser and select Textures | T_Sphere_N.
Create new sprite with button

  1. Go back to M_Rough_Normal material and right click on the empty graph. Select a Texture Sample node.
Create new sprite with button

  1. Now the material selects for you the texture you have selected in the engine. If not you can change the textre and select T_Sphere_N.
Create new sprite with button

  1. Now we want to preview this material on our actual model. We can do this by returning to the Content Browser and selecting Geometry | Static Mesh | LowHiSphere | SM_Low_Poly.
Create new sprite with button

  1. Now go back to M_Rough_Normal material and select the Sets Preview Mesh button to load that mesh in the previewer.
Create new sprite with button

  1. You now see the low poly sphere in the preview window.
Create new sprite with button

  1. Connect the RGB pin from the Texture Sample node to the Normal pin on the material.
Create new sprite with button

  1. Connect the RGB pin from the Texture Sample node to the Normal pin on the material.
Create new sprite with button

  1. Duplicate SM_Low_Poly mesh and call the new mesh SM_Low_Poly_Norm. Assign the M_Rough_Normal to this new mesh.
Create new sprite with button

  1. Duplicate SM_Low_Poly mesh and call the new mesh SM_Low_Poly_Norm. Assign the M_Rough_Normal to this new mesh.
Create new sprite with button

  1. Add it to the game and go next to the sphere with and without the normal map. Now it is clearly not as convincing as the high poly mesh. We would have a higher polygonal model for a sphere in a real project, but I wanted to exaggerate the difference to demonstrate the use of normal maps. Now you can really tell the illusion when you look at the edges. It only affects normals that are on the face, and the silhouette is identical on both models. The normals cannot project outside of the faces of the model. But the procedure of having a low poly mesh and applying the normals of a high poly mesh in software like ZBrush is a very common workflow in real time engines. Next up we will look at what makes a good game model.
Create new sprite with button



Home    Continue ->