Normal Mapping In Games


#1

Can someone please explain what normal mapping are? … it is used in the game painkiller, and farcry i think. both games look super great, and I suppose normal mapping has something to do with it… So, what exactly is it? And how does it affect the grafics in games?


#2

Normal Mapping = Bump Mapping +

Quoted from: http://encyclopedia.thefreedictionary.com

normal mapping is an application of the technique know as bump mapping In computer graphics, bump mapping is a technique where at each pixel, a perturbation to the surface normal of the object being rendered is looked up in a texture map and applied before the illumination calculation is done.The result is a richer more detailed surface representation that more closely resembles the details inherent in the natural world.

While bump mapping perturbs the existing normal (the way the surface is facing) of a model, normal mapping replaces the normal entirely. Like bump mapping, it is used to add details to shading without using more polygons. But where a bump-map is usually calculated based on a grayscale image, the source for the normals in normalmapping is usually a more detailed version of the objects.

Normalmapping is usually found in two varieties: Object-space and tangent-space normalmapping. The difference is which coordinates the normal of the model is given in. The idea of storing the exact normal, instead of a gray-scale image as in bump-mapping, was first presented in “Appearance Preserving Simplification”, by Cohen et al.

How it Works: To calculate the light on a surface, the vector for an incoming light source is dotted with the vector normal to that surface, and the result is the intensity of the light on that surface. Imagine a polygonal model of a sphere - you can only approximate the shape of the sphere, and how good your approxmation looks depends upon the number of polygons you use. Each point in the sphere will have a specific light value. To get smooth-looking geometry, this light-value is usually interpolated across the sphere linearly. The result is an almost perfectly smooth sphere. If we on the other hand, want a bumpy sphere, i.e. a sphere with small variations in the surface, we might construct such a sphere geometrically - e.g. model it by hand, or scan a bumpy sphere from a real-world object. A bumpy sphere constructed using geometry alone, needs a lot of triangles to approximate the bumps. Since the lighting of the surfaces is calculated based on the normal, a great deal of the appearance can be controlled using the normal. Hence we might apply the normals from the very detailed object, to an object with less detail. This gives the impression, that the low-detail object has details.


#3

A pain in the arse that’s what it is … :sad: You’ll see one game cycle /developer once this becomes the standerd ( Doom 3 had 4 year dev time )


#4

Normal Mapping = Bump Mapping

No.


#5

Yes. Basically.


#6

Let’s say bump mapping at its best


#7

Or, bump mapping but better.

Unless you want to paint it.


#8

It’s basically more similar to bump than to displacement since it works on the normals instead of creating new geometry, that’s it.


#9

That thread is dedicated to it, check there. About Doom 3, as far as I know that 4 year dev cycle was counted from all the way at the beginning. From the moment they decided to start working on it. And at that time it was only Carmack working on the engine. ID is a pretty small team too, right?


#10

Will u guys decide already??? Damn!

… eheheheheh … jk!

Lets say NORMALMAP is a BUMPMAP but with more information stored in it and with more capabilities. Basically it can “deform” the output image not only in a “up-down” way but also in “sideways”. But the base geometry remains the same, so u get sharp low-poly edges all the same. The advantage is, given a low-poly and a high-poly version of, say, a character, u can calculate the normalmap between the two, and make the low-poly render (illumination-wise, that is) the same way as the high-poly, except in the mesh boundaries, there u’ll still see the low-poly.
Take a look: http://www.3dfaculty.com/print.php?sid=239

have fun!!!


#11

Layman’s terms: Normal texture mapping allows for real time lighting/shadow effects and heavy detailing on lo-poly geometry. (Whereas before, you need more polys or system resources to achieve the same details.) You squeeze more game framerate, or can allocate more system/console resources to other gameplay mechanics/features, out of your engine/hardware since you’re using less polygons yet not sacrifice eye candy.

Tangentially, having drawing, painting, and sculpting fundamentals are all the more crucial if you wanna be or succeed in the games biz. Otherwise you keep relying on the ole Photoshop lensflare and wierd filters syndrome.


#12

My take on normal mapping is the ability to put the information from a high poly character into a low poly character and still have it lit the exact same way.

Sort of like an optical illusion, in reality the curves and details of the character really isnt there, but normal maps trick you into believing they are (alowing light to play off the surfaces as if the curves and details were really there)

How to do normal maps? First model your high poly character (as high as you can) then model a replica of that character but VERY low poly like 5000 to 7000 polys, then using the magic of normal mapping, you basically take a picture of the high poly mesh and slap it onto the surface of the low poly mesh. and shazam you got a highly detailed character at the cost of only a few polies. in the end its a CHEAT… lol

the difference between bump mapping and normal mapping i believe is in the lighting abilities of normal mapping, I think you can apply any kind of lighting situation to a normal mapped character and it will act just like those details really were in the mesh, where as bump mapping wont do this for you…


#13

Riddick is another game that uses Normal Mapping well. Say theres a light within a scene that is swaying side to side. The Normal Map on a wall will create highlights and cast shadows according to the position of the light giving the illusion of detailed geometry insted of just a flat wall face, which it is. Lighting isnt baked into the textures.


#14

from a programmers pov a bumpmap is a normalmap, there is no difference between them.

when you have a greyscale bumpmap and you want to get it into a game you havto convert it into a normalmap.

so infact you might say that bumpmapping is normalmapping.


#15

Bump mapping uses luminance, or straight value, to create the illusion of perturbing the surface along its normal.

Normal mapping uses the RGB values of a given surface pixel to create the illusion of perturbing the surface in XYZ from the.

So value equals straight out perturbing in bump maps. RGB = XYZ direction and amount in normal maps.

Hope that didn’t add to the confusion…

-L


#16

go to http://www.drone.org/tutorials/normal_maps.html

should help in discovering normal maps (maya specific)


#17

OK first of all, I had to LOL at calling 5000 to 7000 polys in game art VERY low. Considering extremely high for poly counts sits at about 10,000, and that’s usually reserved for games like Dead or Alive, where you only really have 2 characters on the screen with a simple backdrop.

Earlier this week, I was modeling a game character, and my count was [i]350 triangles.

[/i]I think that typical counts for normal mapped models are going to be between 3000 and 5500 triangles.

Any less, and there’s not really enough curvature to hold the normal map up, they’re really not a lot better than a bump map, and you need to have fairly close topography to the hi-res one.

Any more, and there’s not really much point in using a normal map. Normal maps aren’t free, bump maps are cheaper, and if you were expending 10,000 triangles on a model, the amount of extra detail you’d likely need would probably be picked up with a bump map.

I think this all can be served with an example of what normal maps are capable of.

You could use normal maps (only, no extra geometry) to add buttons on a vest, or wrinkles on a jacket. Fingernails, and details like the sinew in hands, and that vein that runs down the back of them, great for normal maps. You could probably get away with only using normal maps to apply a fairly tight fitting t-shirt, but a loose fitting one that changes the silhouette, no. YOu couldn’t use a normal map to add a nose, but you could use it to add the nostrils.

They aren’t some magical make a high poly low poly miracle. But they take it pretty far. It’s probably the trickiest “trick” we’ve gotten to make for games. But it does the job!

I hope that’s some help.


#18

Thanks alot guys… that really helped… something like baking the texture of a high poly, and map it on a low poly, only the light isnt baked… and then you use that “baked” map as bump map on the low poly dude… I get the basic idea… so that is really twice the work for at game artist to do… damn… but it sure looks great


#19

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.