Open In App

Normal Mapping in Computer Graphics

Computer Graphics has improved a lot in recent years. Nowadays it is much more realistic whether it is animated 3D videos or games. However, rendering such graphics with great detail can be quite hardware-intensive. That’s where normal mapping comes into the picture. It is a technique in computer graphics that uses mathematical computations to create detailed and realistic graphics without using extra polygons. It is a popular method for optimizing the rendering of computer graphics and adding details to it simultaneously. This technique uses something called normal maps which is a 2D image that contains information about the normals of the 3D object. In this article, we will look at what exactly is normal mapping.

Terminologies of Normal Graphics

Before heading into the article we need to look at some terminologies used in this article:



What is Normal Mapping?

3D models are made up of polygons. The more polygons a model has the more detailed it will look. However, increasing the number of polygons in a model also makes it more complex and the more CPU processing it requires. So that’s where normal maps come into play. At its core, normal mapping revolves around one core concept: surface normals. As discussed in the previous section, normal maps are just texture images where each pixel stores the object’s surface normal vector in the form of RGB colours. Here red channel contains the value of the X axis, the green channel contains the value of the Y axis and the blue channel contains the value of the Z axis. Together, the RGB colour represents the value of the surface normal of that point.

How Surface Normal is Useful?

Because a surface normal vector tells a lot about the object’s geometry and by geometry, I mean all the intricate details of the object. For example, a normal map of a brick wall can tell us about all the intricate details, gaps, bumps, crevices, and cracks on it. The higher the resolution of the normal map the more details it shows. Now you may wonder how does computer uses those normal maps. When a 3D model is viewed in the computer under a light source, the software simulates light rays from the light source which hit the model and reflect away. When these rays hit the camera the model is visible to the screen (similar to how our eyes see real-world objects). Now when there are more polygons, more light rays are required to render the model, making the calculation very complex and time-consuming.



But if we use the normal maps we can utilize the surface normal vector data in it, so we can re-create a more detailed look with a low polygon model as if it were a detailed model. Normal mapping modifies the way light interacts with the model to create a more detailed look without modifying the underlying geometry. Thus, they can simulate minute surface details such as crevices, bumps, scratches, wrinkles, cracks, gaps and so on. Normal maps are computationally less intensive than polygons. Due to this, they are widely used in 3D software and video games.

This is a normal 3D model with very less polygons, you can see at the edges that the model is plain. This is an example of a model with a low amount of polygons.

low polygon model

This is a 3D model with a high amount of polygons. Look at the edges and see that it is in the shape of the rocks the, same as the texture image. However, this model requires a lot of computation.

high polygon model

This is the same as the first model but with normal maps. You can see the details that normal maps show. The shadows and minute details make it look more realistic. If you look at the edges, they are not bumpy like the second one. This denotes that normal maps only create an illusion without modifying the underlying geometry.

a model with normal mapping

Use of Normal Maps

There are several places where you can see normal maps being used:

Advantages of Normal Mapping

Disadvantages of Normal Mapping

Conclusion

Despite some limitations, normal mapping has proved to be an effective technique for creating detailed and realistic computer graphics. It creates a perfect balance between the performance and visual details in a 3D model. However, normal mapping should be used only when applicable and relevant otherwise they may end up creating artifacts and unintended behaviour in the model.

Frequently Asked Questions

1. How are normal maps created?

Normal maps can be created by using 3D modelling software such as Blender, Maya, 3DS Max or it can be hand crafted manually with image editing software such as Adobe Photoshop or specialized software such as Substance Painter.

2. Can normal maps be used with 2D images, or are they exclusive to 3D models?

Normal mapping is primarily designed for 3D models to simulate three-dimensional surface details.

3. What are bump maps? How is it different from normal maps?

Bump maps are grayscale images that stores information about only the height of the model. Normal map stores the direction of the normal vectors which makes it much more detailed than bump maps. Bump maps are much more easier to generate than a normal map.

4. How are normal maps useful in video games?

Normal maps are useful in simulating realistic details such as wrinkles, gaps, bumps etc. They also help in adding details to game assets and terrains as well.

5. Are there any limitations to using normal mapping in certain scenarios?

Normal mapping does not alter the actual geometry of the object. If the model is viewed from very close distance may reveal the lack of actual depth in details in the model.


Article Tags :