Difference between revisions of "Creating detailed Normal Maps"

m
Added Table of Contents
imported>Katan
(New page: Category:Modeling_and_Texturing_Tutorials Category:Tutorials '''Why Normal Map?'''<br> You need to create a Normal Map first and foremost because if you don't, you...)
 
imported>Katan
m (Added Table of Contents)
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Modeling_and_Texturing_Tutorials]]
{{Featured}}
[[Category:Tutorials]]
 
{| width="100%" style="border:0pt;"
! align="left" | __toc__
! align="right" | {{Tools|req0=Adobe Photoshop|req1=Can be applied for any (re)texture tool}}
|}


'''Why Normal Map?'''<br>
==Why Normal Map?==
You need to create a [[Normal_Maps|Normal Map]] first and foremost because if you don't, your texture wouldn't reflect light and therefor appear black ingame. On the other hand, there is an even better reason why you want to do one too. Normal Maps are designed to make an object look much more detailed than it actually is. On basis of the lighting and the stored information of the file a congrous surface is simulated. That means, that you can stay in front of a completely flat stone wall that looks like it has an uneven and rocky surface, just due to the Normal Map.
You need to create a [[Normal_Maps|normal map]] first and foremost because if you don't, your texture wouldn't reflect light and therefore appear black ingame. What is more there is an even better reason why you '''want''' to do one. Normal maps are designed to make an object look much more detailed than it actually is. Based on illumination and the information stored in the file, a congrous surfase is simulated. In other words, you could stay in front of a completely flat plane with a stone texture that appears to be uneven and rocky, thanks to the normal map.


Not all textures have a Normal Map, just that ones that are rendered ingame such as tables, books, clothes, etc. Icons, book images, menus and whatnot aren't rendered ingame and therefor don't need one. The Normal Map's file nime is the same as the texture itself, with the exception that '''_n''' is attached to it.
Not every texture has a normal map, only those that are rendered ingame such as tables, books, clothes, etc. Icons, book images, menus and whatnot aren't rendered ingame, hence they don't need one. The normal map's file name orientates itself by the texture, with the sole exception that '''_n''' is attached to it. E.g., the normal map for the texture ''Texture.dds'' would be ''Texture_n.dds''.


You can have an endless amount of textures relating to one Normal Map. Example: You have a Normal Map and two textures. The Normal Map is called ''normal_n.dds'' and the two texture files ''normal_tex01.dds'' and ''normal_tex02.dds''. The game will relate both textures to the correct Normal Map, because the letters behind the underscores will be ignored. That's why you should avoid naming your texture something like ''my_uber_sword_texture.dds''.
One normal map can relate to an endless amount of textures. Example: You have a normal map and two textures. The normal map is called ''normal_n.dds'', the two texture files ''normal_tex01.dds'' and ''normal_tex02.dds''' respectively. The game will recognize both textures as belonging to the one ''normal_n''; it simply ignores the letters that come after the underscores, in this case ''tex01'' and ''tex02''. So you may want to avoid texture file names like ''my_uber_sword_texture.dds''.


And why's the Normal Map's detail important? Because it depends on the Normal Map how uneven and rocky your stone texture looks ingame. Less detail for the Normal Map means less detail for the texture itself.
And why is the normal map's detail important? Because it is the normal map that defines how uneven and how rocky your stone texture looks ingame. Less detail for the normal map equals less detail for the object.


Many roads lead to normal maps. The most common is to just fire up Photoshop or Gimp or your software of trust, use the Normal Map PlugIn on the color map and than think to be done with it. That's how it works, but it doesn't work well, because this way created normal maps make an object pray for a bag to pull over its polygons. There are ways to improve normal maps drastically. Even '''EASY''' and '''FAST''' ways '''EVERYONE''' can take the time and nerves for. For example, there is the blur method. It is, basically, a monotone and easy way, but gets the job done pretty well.
<br>
'''Further reading:'''
'''Further reading:'''
* [[Choose_the_right_DXTC_compression_algorithm|DXTC Compression]]
* [[Choose_the_right_DXTC_compression_algorithm|DXTC Compression]]
Line 16: Line 22:




== Creating a detailed Normal Map: The blur method ==
==Preparing the Texture==
There are many ways to make Normal Maps. Unfortunately, the most common is to just fire up Photoshop or Gimp, use the Normal Map PlugIn on the color map and than think to be done. That's how it works, but it doesn't work well, because this way created Normal Maps make a texture pray for a bag to pull over its head. There are ways to improve Normal Maps drastically too. Even '''EASY''' and '''FAST''' ways '''EVERYONE''' can take the time and nerves for. <font size="1">(Easy, Fast, Everyone - the holy advertising trio.)</font>
Before you can prepare a texture, you need a texture. However, acquisition and preparation of the texture is not part of this article; I will use one that's ready to go, if it were not for the normal map.
 
 
[[Image:NMTut01.jpg|thumb|center|This is the texture I prepared.]]
 
 
'''Note''': The images I uploaded to the Wiki are compressed and low-quality to maintain a reasonable loading time. They should, however, sufficiently show what they are meant to.
 
I open the texture in Photoshop and make it greyscale via ''Strg+Umschalt+U'' (or ''Image > Adjust > Desaturate''). Rule of the thumb, the darker the deeper, the brighter the higher. The thing is: the common texture most certainly has some spots with darker or brighter color, which would be translated as depth and height. Those are the spots you need to work on, brighten too dark spots (e.g. Dodge Tool) and darken too bright spots (e.g. Burn Tool). For a general increase of contrast strength, I like to play around with the Curves (''Image > Adjust > Curves'') or duplicate the texture and try out different blending options. There is not really an all-round solution for this step.
 
[[Image:NMTut02.jpg|thumb|center|This is what I ended up with.]]
 
Since my texture is still a background layer, I double-click it to make it into a regular layer and then double the size of the image (via ''Image > Canvas Size''; I make sure that the anchor is set to center), copy the base texture eight times and tile the copys around the center image. This is to prevent seams in the normal map due to the blurring process.
 
[[Image:NMTut03.jpg|thumb|center|The tiled texture.]]


For example, there is the blur method. It's a monotone and easy way, but get's the job done very well. I made [http://cs.elderscrolls.com/constwiki/index.php/Image:DNM01.jpg this texture] seamless and now open it in Photoshop. Before you run the Normal Map filter on it, make sure your texture is a background layer, otherwise the filter won't work as desired. I now use the Normal Map Filter on the texture; the file settings are very important to get a good as possible outcome. I strongly recommend to read the Appendix part of the article [[GIMP:_Quality_Normal_Maps|Quality Normal Maps in GIMP]].
Now I copy the now tiled 1024x1024 texture and set its blending mode to '''Overlay'''. I do this several times and usually end up with between four and six overlayed copies. It strongly depends on the texture, though up until now it didn't seem to me that more than a max of eight copies makes any sense at all. In this article, and generally, I use four copies.


[[Image:DNM02.jpg|thumb|center|Settings menu (Normal Map Filter)]]
[[Image:NMTut04.jpg|thumb|center|Current layer structure.]]


The edges of the Normal Map are very sharp, way too sharp. If that's the case it's best to run a slight blur filter on it; the strength depends on the texture.
Next, I blur the copy layers via ''Filter > Blur > Gaussian Blur''. I start with the topmost '''04''' and set the blur value to 8. '''03''' gets blurred with a value of 6, '''02''' with 4, and '''01''' with 2; the basic layer remains unblurred. Now even when creating a normal map you have lots of leeway. You don't have to blur in two stepts, it's just my personal favorite. With the blurring complete, the texture is ready for normal map.


<center>[[Image:DNM03.jpg|thumb|center|Sharp -> Blurred]]</center>


Now I copy the background layer and set it to '''Overlay'''. I use a gaussian blur filter on it. Strength: 0,5 - but that always depends on the texture; you'll have to try until you're satisfied with the outcome. [http://cs.elderscrolls.com/constwiki/index.php/Image:DNM04.jpg The difference is already cognizable].
==Creating the Normal Map==
Once I blurred all the layers except for the base layer, I start with the normal mapping process, again with the topmost '''04''' as point man and in two steps. In Photoshop, the Normal Map Filter is located under ''Filter > NVidia Tools > NormalMapFilter...''. The settings are very important, and for GIMP users I recommend to read the Appendix part of the article [[GIMP:_Quality_Normal_Maps|Quality Normal Maps in GIMP]].


I repeat the above mentioned step: I copy the background layer, set it to '''Overlay''' and blur it slightly stronger than the first time (Again: Depending on the texture "slightly" can mean a difference of 0,5 as well as 3 or whatever).
[[Image:NMTut05.jpg|thumb|center|Settings for copy layer 04.]]


Besides, it's not necessary to move the layer to the top of the layer stack - too circuitous and the outcome will be the same. I go on to copy the background layer, set it to overlay and blur it, every time a bit stronger (about 0,5), and every time I check if the current layer makes a difference to the overall picture. It makes no sense to copy and blur whether it has no effect anymore. This one took 12 blur layers, but the number, as always, depends on the texture.
For '''03''', I set the scale value to 60, for '''02''' to 40 and for '''01''' to 20. From here on, I like to a bit of experimenting. The logical consequence is to use the Normal Map filter on the base layer, too, with the scale value set to 10. I'll do this for now, then flatten the image. It is now time to set it back to its former dimensions (512x512). I do this again by altering the canvas size, with the anchor set to center. At this point a closer look at the channels tab reveals that the blue channel is completely white. It needs renewal, which I will do via Normal Map filter plugin; I open it up and tag '''Normalize Only''' instead of '''Average RGB'''. I save it as a dds file into the same folder as the texture.


'''IMPORTANT''': When you're done, you must merge all layers to the background layer and than again use the Normal Map Filter on the image, but this time with '''Normalize only''' checked. That's to re-create the now white Blue Channel.
[[Image:NMTut06.jpg|thumb|center|DDS Saving Settings]]


[http://www.tikanderoga.net/Katan/o/cswiki/DNM05.jpg That's not for a long time yet Bethesda quality], but it's far better than what the Normal Map Filter produces and with a bit more handiwork you can create very nice and detailed Normal Maps (the quality loss of the image is due to compression; would have been nearly one MB on maxium, just so you know).
Now off to an ingame test of texture and normal map. I predict it will be rocky. Pretty. Damn. Rocky.


Best is to use a 3D program, sure, but the fewest will have the possibility and ability to do so and it can be a bothersome work as well. For the ones who are interested in this method anyway, Councilor at deviantart.com did a good job on two tutorials regarding this matter.
[[Image:NMTut07.jpg|thumb|center|Rock texture plus normal map at work.]]
* [http://councilor.deviantart.com/art/Normal-Map-Tutorial-Part-One-59267706 Normal Map Tutorial Part One]<br>
 
* [http://councilor.deviantart.com/art/Normal-Map-Tutorial-Part-Two-59316237 Normal Map Tutorial Part Two]
Pretty. Damn. Rocky. Which is great for stuff like rocks and stone caves and you know, but what if you have an interior rock wall, nicely processed and smoothened as good as possible? Well, in that case, I get back to experimenting, back to the point where I used the Normal Map filter on the copied layers, but not yet on the base layer. And instead of doing so, I just flatten the image, with the base layer as a greyscale image.
 
[[Image:NMTut08.jpg|thumb|center|No normal mapping for the base layer.]]
 
I press Strg+U, in other words, I desaturate the image again to get a grayscale, and then use the Normal Map Filter on it, with the scale value set to 10.
 
[[Image:NMTut09.jpg|thumb|center|Greyscale and normal map images.]]
 
I rescale the image back to 512x512 and save it as above. As an interior rock wall, it looks a tad better now.
 
[[Image:NMTut10.jpg|thumb|center|New normal map at work.]]
 
There are several ways to further improve the normal map. I can now go back and work with the 1024x1024 greyscale image of the second normal map and repeat the whole procedure, change it where I want, even leave layers out – practically, experiment with it until I am satisfied. I settled for this:
 
[[Image:NMTut11.jpg|thumb|center|My final result.]]
 
This method does not only work with textures that have little detail, like the rock texture. It also works with highly detailed images. The challenge is to take the time that is necessary to get the best result out of the texture. It follows a comparison of all three normal maps next to their ingame result:
 
[[Image:NMTut12.jpg|thumb|center|Comparison]]
 
 
[[Category:Texturing_Tutorials]]
[[Category:Tutorials]]
Anonymous user