Normal Mapping in Computer Graphics
Last Updated :
29 Nov, 2023
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:
- Polygons: In computer graphics, 3D objects are made of 2D shapes such as triangles or rectangles. These 2D shapes are called polygons. The more polygons a model has the more detailed it will look and the more computation it requires to render.
- Normal Maps: Normal maps are 2D colorful images that show information about the normal vectors of 3D objects. A pixel in a normal map has three channels R, G, and B whose values represent the X, Y, and Z values of the normal vector of that point. For example, if a pixel is completely red meaning that its RGB value is (1,0,0), then the normal of the vector would point in the X direction.
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 modelThis 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 modelThis 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 mappingUse of Normal Maps
There are several places where you can see normal maps being used:
- 3D modelling and texture painting software: 3D modelling software like Blender, Maya, 3DS Max, Cinema 4D, Houdini, and Zbrush and texture painting software such as Adobe Substance Painter extensively use normal maps.
- Game engines: Game engines such as Unity, Unreal Engine, and Godot also use normal maps for creating a detailed view of the characters, background scenery and other 3D assets.
- Shader programming language: Shader programming languages such as OpenGL and Vulkan also use normal maps.
Advantages of Normal Mapping
- Detailed surfaces: Using normal maps along with 3D objects makes them look much more realistic having a detailed surface. They capture every minute detail of the model.
- Efficient computation: Normal maps require fewer calculations and produce better results than using extra polygons in the object mesh. They are computationally less intensive.
- Reusability: Once a normal map is generated it can be reused again and again. However, if the object is made up of actual polygons then it may require computations every time it is rendered, which is not the case with normal mapping.
- Memory efficient: Normal maps are stored in texture images which are smaller in size than actual geometry information.
Disadvantages of Normal Mapping
- Limited use: Normal maps do not modify the underlying geometry, so they are suitable for only creating small details in the geometry. In other cases, the actual geometry should be modified.
- Creating normal maps: Creating high-quality normal maps requires special skills and specialized software. In some cases, the normal maps are needed to be created manually, which is a difficult task.
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.
Similar Reads
Polygonal Modeling in Computer Graphics
Polygonal modeling is a very beneficial technique that is used in 3D computer graphics to model objects by utilizing polygon meshes to approximate or represent their surfaces. For real-time computer graphics, polygonal modeling is the preferred technique for its features, since it works well with sc
6 min read
Parametric Modeling in Computer Graphics
In this article, we will cover all the necessary detail that is acquired to know about Parametric Modeling. Let's start with the simple definition, just go through all the points and headings. It will give you a brief intro about what is parametric modeling and why we use it. Parametric ModelingIt i
6 min read
Polygon Mesh in Computer Graphics
A polygon mesh is a type of computer graphics technique used for creating 3D models. It is a collection of vertices, edges and faces that define the shape and surface of a 3D object. It is often used in computer games, animation, virtual reality, and computer-aided design (CAD). Polygon MeshA polygo
3 min read
Phong Shading Computer Graphics
Phong shading is a more accurate interpolation-based approach that can be used for rendering a polygon. It was developed by Phong Bui Tuong.It improves upon the Gourand Shading and provides a better approximation of the shading of any smooth surface. It interpolates the normal vector instead of the
1 min read
Projections in Computer Graphics
Representing an n-dimensional object into an n-1 dimension is known as projection. It is process of converting a 3D object into 2D object, we represent a 3D object on a 2D plane {(x,y,z)->(x,y)}. It is also defined as mapping or transforming of the object in projection plane or view plane. When g
5 min read
Vector Graphics in Computer Graphics
Vector graphics are a flexible and scalable way to create images using mathematical equations and geometric shapes, unlike pixel-based raster graphics. This method ensures that images maintain high quality and sharpness at any size, making them ideal for logos, illustrations, and other designs. In t
6 min read
Multiple Windowing in Computer Graphics
Pre-requisites: Line Clipping Clipping is the process of removing undesired parts of an image and displaying only a certain portion of the image. Clipping is used to remove lines or objects that are not inside the viewing pane. The portion that is being removed or clipped is called the clipped part.
2 min read
Gouraud Shading in Computer Graphics
Gouraud shading is a method used in computer graphics to simulate the differing effect of light and color across the surface of an object. Intensity- interpolation is used to develop Gouraud shading. By intensity interpolation, the intensity of each and every pixel is calculated. Gouraud shading sha
3 min read
Motion Capture in Computer Graphics
Today, we see many movies, games, animations, 2D and 3D images, and drug designing. Have you ever wondered how these things have been created and how they work? These projections replicate the same of living beings and creatures. This could done with Computer Graphics. What is Computer Graphics?Comp
5 min read
Radiosity Rendering in Computer Graphics
Rendering is the process of generating images which look realistic, these renderings can be based on either 2D rendering or 3D and computer graphics are used when we want to manipulate a set of images in the form of pixels to show to computer devices. Computer graphics is used in many digital types
8 min read