Active 2 years ago. Viewed 17k times. Improve this question. Ray Mairlot Old Man Old Man 4, 9 9 gold badges 50 50 silver badges 94 94 bronze badges. Add a comment. Active Oldest Votes. Bump maps use only a black to white map to understand the depth.
Improve this answer. Hyenaman Hyenaman 3 3 silver badges 5 5 bronze badges. Could you maybe explain when you use normal maps and when bumps maps? I guess there are reasons when you chose to use the one or the other? Since normal maps hold more accurate information they are the preferred method of faking geometry light reflections.
There might be some older or simpler real-time 3D engines which are not able to user normal maps. Other than that, you can always convert a normal map to a bumpmap without loosing information. Normal map has 24 bits per pixel and bump map has 8 bits per pixel since bump map is black and white.
Correct me please if I'm wrong. They both contain data for representing apparent detail on the surface of simpler polygonal meshes, but they each store that data in a different way.
Above, on the left, you can see a height map used for bump mapping a stone wall. A height map is a simple black and white texture, where each pixel represents the amount that point on the surface should appear to be raised. The whiter the pixel colour, the higher the area appears to be raised. A normal map is an RGB texture, where each pixel represents the difference in direction the surface should appear to be facing, relative to its un-modified surface normal.
These textures tend to have a bluey-purple tinge, because of the way the vector is stored in the RGB values. Modern realtime 3D graphics hardware rely on Normal Maps, because they contain the vectors required to modify how light should appear to bounce of the surface. Unity can also accept Height Maps for bump mapping, but they must be converted to Normal Maps on import in order to use them. Understanding this is not vital for using normal maps!
In addition, the values in the texture are treated as having been halved, with 0. This allows vectors of all directions to be stored. Therefore to convert an RGB colour to a vector direction, you must multiply by two, then subtract 1. For example, an RGB value of 0. A value of 0. Colours like this can be seen in the bright cyan areas of the stone wall normal map at the top of some of the stone edges. The result is that these edges catch the light at a very different angle to the flatter faces of the stones.
A normal map can be imported by placing the texture file in your assets folder, as usual. However, you need to tell Unity that this texture is a normal map. More info See in Glossary settings. To import a black and white heightmap A greyscale Texture that stores height data for an object. Each pixel stores the height difference perpendicular to the face that pixel represents. You can use this to control how steep the angles in the normalmap are, when being converted from the heights in your heightmap.
A low bumpiness value will mean that even sharp contrast in the heightmap will be translated to gentle angles and bumps. A high value will create exaggerated bumps and very high contrast lighting responses to the bumps. Once you have a normalmap in your assets, you can place it into the Normal Map slot of your Material in the inspector. The Standard Shader has a normal map slot, and many of the older legacy shaders also support normal maps. If you imported a normalmap or heightmap, and did not mark it as a normal map By selecting Texture Type: Normal Map as described above , the Material inspector will warn you about this and offer to fix it, as so:.
This will work if your texture really is a normal map. You may also notice that there is a second Normal Map slot further down in the Material inspector for the Standard Shader.
This allows you to use an additional normal map for creating extra detail. You can add a normal map into this slot in the same way as the regular normal map slot, but the intention here is that you should use a different scale or frequency of tiling so that the two normal maps together produce a high level of detail The Level Of Detail LOD technique is an optimization that reduces the number of triangles that Unity has to render for a GameObject when its distance from the Camera increases.
More info See in Glossary at different scales. This tricks the rendered light into creating highlights and shadows. Both methods leave the geometry unchanged. Knowing the differences between these two techniques can help determine which one is better suited for the application at hand. Read on to learn more about both so you can add them to your bag of tricks. The goal of both of these maps is to give a surface the illusion of texture on a surface that has no texture.
The map creates this illusion by distorting the way the rendered light interacts with a surface. This is also where the bump map can become limiting, depending on what level of detail you are trying to achieve. So, the result in both cases is that a geometrically smooth shape appears to have a very detailed surface texture.
However, the bump map starts to falter when the textured object is viewed from different angles. If you were to create a bump map or just look at one, you will see a black and white image. Essentially, the map uses this grayscale to tell the rendering engine which spots are light and which spots are dark. Most rendering engines do this by relating the shade of gray to the normal vector of the surface.
And any shade of gray between changes the angle of the normal vector. Now, as mentioned earlier, there is a shortfall to this method as it pertains to lighting. The bump map sets a fixed surface normal distribution. In other words, it only creates local lighting effects. It will only tell the rendering engine which areas of the surface are darker than others relative to itself.
So, the bump map does not provide the rendering engine enough to consider where the global light source is coming from in relation to the details on a surface. If the end-user sees shadows where their eye expects highlights, they may find the graphics less believable. They can be used on their own or in conjunction with other maps to really enhance the overall rendering. They do this by providing the rendering engine with a third piece of information or color channel to use. In contrast, a bump map technically only provides two color channels to use; black or white.
Normal mapping uses the RGB color scale to calculate a surface normal from three component vectors instead of two. RGB, in this case, means:. The shade of gray essentially equates to the angle of a vector relative to the surface itself.
That vector is made up of two component vectors in cartesian object space, one on the tangent axis black and one on the normal axis white. The closer the color is to black at a certain location, the lower the angle between the normal vector and the surface itself. Conversely, the closer to white the image is, the closer to orthogonal the normal vector is. This is where normal maps come in with RGB instead of grayscale.
Like the bump map, a normal map has a tangent axis and a normal axis, but it also introduces the bitangent axis. And since there is a third axis, there needs to be a third color to represent it.
The table below illustrates how each map translates colors into vectors. The key to understand here is that the normal map has the ability to define surface normals in 3D global space because there are three vector components making up said normal. Each of the components can be related to the global X, Y, and Z components of the cartesian world space in which a lighting source is fixed. A bump map cannot do this because there is no third component relating the normal to global cartesian space.
The three vector components of a normal map make up a cartesian system, meaning they are all orthogonal to each other.
0コメント