Quick tutorial: Generating normal maps from a texture

Questions specific to OpenMW-CS can be asked, and content development related topics can be discussed here
Post Reply
User avatar
lysol
Posts: 1513
Joined: 26 Mar 2013, 01:48
Location: Sweden

Quick tutorial: Generating normal maps from a texture

Post by lysol »

There are great ways to make normal maps, there are good ways to make normal maps and there are really bad ways to make normal maps.
  1. The great ways include making a super high-poly version of the model you are texturing and sculpt the details in the model. Then you bake a normal map from that high poly model. This is hard, but it gives you the best possible result.
  2. The good way include the much easier way of generating a normal map from a texture, a 2D file, in an application like CrazyBump, MindTex2 or AwesomeBump. This is easier. But you have to do stuff with the texture, otherwise you'll end up with...
  3. The really bad way of making a normal map is by throwing a diffuse or albedo texture straight into CrazyBump, MindTex2 or AwesomeBump. This is bad, because the application will not actually understand the shape of the object the texture portrays.
Doing number three on the list will give you something like this:

https://imgur.com/M3dWxlI

The dirt on the texture will be regarded as something to make a shape out of. The same thing with the wood grain. The program simply don't understand how the object actually looks and how it is shaped. Don't do this, in 99% of all cases. It is a waste of time and a waste of server space to upload it.

If you instead alter your texture quite a bit by removing dirt and other detail that isn't actually shaping the object in any way, then, by using contrast to tell the application how the shape actually looks, create sort of a height map so to speak, you'll end up with something like this:

https://imgur.com/VQMbF7m

Note how it actually understands how the metal frame looks, that the hinges should be on top of the frame, and how the wood grain isn't giving that much detail in the normal map compared to the space between the wooden planks.

What I did was to remove a lot of contrast from the wood, but at the same time I added contrast in the space between the wood. Then I removed a lot of contrast (both brightness and color contrast) in the metal frame and the hinges, while also making them brighter than the wood so that the application understands that the metal parts are on top of the wood. Then I did the same idea with the bolts, while also adding a slight round shape to them. Finally, I removed all the layers of dirt on everything, because the dirt is not shaping the object, it's just flat, kinda like paint.

You would actually be doing the same thing with something that is painted actually. Imagine if there would have been a painting with the Hlaalu symbol on the wood. I would have removed that painting completely in the texture I generate the normal map from, otherwise, the painting would be something "shaped" in the normal map. Bad!

Oh! And a quick note for everyone: OpenMW uses the Direct X-style of normal mapping, despite being an OpenGL application. This is very important to make sure your normal map displays correctly. So make sure you generate the normal map in the correct way. Most normal map generators will generate the Direct X style by default, so most of the time you will not have to do anything. Baking a normal map in blender however will give you the OpenGL format by default, so you will have to do some stuff to convert that to Direct X-style.

While we're at it, how do I make a specular map then? Like this:

https://imgur.com/MpMin4n

All these textures together ended up like this:

https://imgur.com/deodvcP

There are probably way better ways of doing stuff, but this is how I do them at least. It does take time, and it's not a one-click solution. But it works. :) Good luck!
darkbasic
Posts: 153
Joined: 18 Apr 2016, 15:45
Contact:

Re: Quick tutorial: Generating normal maps from a texture

Post by darkbasic »

It does take time indeed! Thanks for sharing.
User avatar
lysol
Posts: 1513
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: Quick tutorial: Generating normal maps from a texture

Post by lysol »

I added some info regarding different normal map styles and which one to use for OpenMW (TL/DR; it's DX, not OpenGL)
josephbburg
Posts: 10
Joined: 04 Jun 2021, 05:15

Re: Quick tutorial: Generating normal maps from a texture

Post by josephbburg »

My process in Krita:
- Get a nice albedo texture of the material
- Adjust contrast and curves to get the most "texture" out of it as possible
- Set the color space to 16 Bit scRGB !
- Use "Height-to-normal-map" filter at various scales (You can choose different swizzle settings here, it defaults to what Blender uses)
- I like to make a big-scale, medium-scale, and small-scale normal map and then combine them using the "Combine Normal Map" layer blend mode.

This is my usual process, I find it does a good job of getting a lot out of one map.
I made a video about normal-mapping a while back, may be helpful: https://www.youtube.com/watch?v=Eb-W0Qx4ukQ
Post Reply