User Tools

Site Tools


arma:texturing:normal_maps

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
arma:texturing:normal_maps [2007-07-09 05:35]
snakeman
arma:texturing:normal_maps [2017-10-06 13:59] (current)
snakeman http to https switch.
Line 1: Line 1:
 ====== Normal Maps ====== ====== Normal Maps ======
 +
 +====== Overview ======
 +
 +**Normal Mapping**
 +
 +Say goodbye to dull surfaces with 3D World'​s high-speed tour of the games industry’s hottest new technique
 +
 +If you aim to work in games, it’s worth playing around with normal mapping. Now one of the industry’s hottest topics, normal maps make the surface of a game model look much more detailed and impressive. This detail is displayed in real time: the images in the article are screenshots,​ not renders. To create a normal map, a 3D software package samples the directions in which the surfaces of a detailed model (a higher-resolution version of the in-game object) face, storing the information as colored pixels. The map is then applied to the lower-resolution object, passing information about the hi-res model to the lighting calculations.
 +
 +At present, a common approach is to build the hi-res source model immediately,​ but I feel it can be more effective to start with the lo-res final model. Firstly, starting low makes it easier to revise proportions,​ and allows for vital early rigging and animation tests. Secondly, once the lo-res is finished, it is a simple job to add polish. I recommend exporting the mesh to ZBrush 2: a great tool for sculpting in organic detail.
 +
 +
 +====== ArmA guys ======
 +
 +Panda[PL]: IIRC one of devs once said how specular texture should look like:\\
 +Red = diffuse\\
 +Green = specular\\
 +Blue = specular power.\\
 +So if you don't intend to change specular power and diffuse then both R and B should be both set to full. If diffuse is not all white (full) then the material gets darkened, if Blue is not all white then the value you input as specular power in rvmat gets multiplied by this value (which is treated as a number between 0 and 1, not 0-255). Texture for specular should be "​1,​x,​1,​1",​ where x is specular, unless you want to modify the diffuse and specular power.
  
 Panda[PL]: The problem with specular map is: it needs two channels to work! The texture is 2D, so one channel supplies only information on how the light is applied along one axis. Panda[PL]: The problem with specular map is: it needs two channels to work! The texture is 2D, so one channel supplies only information on how the light is applied along one axis.
  
 My advise on normal maps:\\ My advise on normal maps:\\
-1) draw a height map (lighter ​th color the higher the point), you can use the normal texture here if you're really in a hurry, but I advise making it by hand.\\+1) draw a height map (lighter ​the color the higher the point), you can use the normal texture here if you're really in a hurry, but I advise making it by hand.\\
 2) use programs like Xnormal to convert it to normal map.\\ 2) use programs like Xnormal to convert it to normal map.\\
 The correct channel settings seem to be:\\ The correct channel settings seem to be:\\
Line 40: Line 59:
  
 ====== Normal Maps Tutorials ====== ====== Normal Maps Tutorials ======
 +
 +
 +
 +===== Normal Maps Tutorial by freddern =====
 +
 +**Normal Maps Tutorial for ArmA  by freddern**
 +
 +Tools used in this tutorial:
 +  * Photoshop
 +  * xNormal plugins for Photoshop (install the program and it installs the plugins too) http://​www.xnormal.net/​
 +  * TexView2
 +
 +First of all I would like to say that this may not be the best way to make normal maps for ArmA, but I't works for me and I'm satistfied with the results. (My native language is not English so bare with me)
 +
 +In this turitorial I'm going to show you how to make a new normal map for a us soldier. I'm using my own diffuse texture as an example to show you what I want the new normal map to be based on.
 +
 +{{ https://​pmc.editing.wiki/​images/​freddern_diffuse_texture.jpg }}
 +
 +As you can see in the diffuse texture , most of the changes are on the vest and the new armpads. The rest of the texture will look great with the original normal map. So this means that I'm going to add my own vest and armpads to the original normal map.
 +
 +{{ https://​pmc.editing.wiki/​images/​freddern_original_normal.jpg }}
 +
 +But how do you do this?
 +
 +If you have created your own texture you probably have the whole thing separated in different layers, right?
 +Just delete everything except the parts you want in the new normal map, and all you have left are the layers that makes the details you want (In this case the vest and armpads).
 +
 +Then desaturate everything (I think just turning the image to grayscale will give you trouble later on).
 +Now, give the whole image a gray background and then kind'a play with the image so that you get something similar to a height map. (White is high and black is low).
 +
 +It dont have to be a perfect height map. The trick is just to give all the little details some depth.
 +
 +Now you have somthing like this:
 +
 +{{ https://​pmc.editing.wiki/​images/​freddern_my_vest_height.jpg }}
 +
 +Use the xNormal plugin and choose Height2Normals.
 +
 +As source you may choose Gray scale (seems to be the most logical choise), and set Swizzle to X+ Y- Z+ (I read somewhere that this would give the most similar result to the ArmA original Normal map).
 +
 +Now, copy the image you've created and paste it as a new layer over the original normal map, but wait! The Normal map you created with xNormal got a more red'​ish look than the original.
 +
 +Don't worry. Just press Image -> Adjustments -> Channel Mixer and drag the "​Red"​ slider down to zero %.
 +
 +**Note**: //I think you need to leave the red channel as it is, your original normal map above seems to be missing the red channel. Did you use TexView2 or Kegety'​s plugin to open the original normal paa?, if you used Kegety'​s plugin the red channel gets put in the alpha channel and needs to be copied into the red channel to give you a proper normal map.//
 +
 +Now you can cut this layer so that you get the new vest and arm pads with the old pants and shoes etc...
 +
 +Looks finished now don't it?
 +
 +{{ https://​pmc.editing.wiki/​images/​freddern_my_normal.jpg }}
 +
 +Not quite.
 +
 +You also have to modify the alpha layer. Make sure you have the channles window open and press "alpha 1".
 +
 +Now you see this:
 +
 +{{ https://​pmc.editing.wiki/​images/​freddern_alpha_channel.jpg }}
 +
 +Select the whole image\alpha picture and copy it, select RGB channel, then paste so that you get a copy of the alpha channel in a regular RGB layer and can modify it as you wish.
 +
 +Now you can make your details (vest and armpads) in to something similar as the alpha map (Maybe use xNormal plugin -> Normals2Cavity and a little Brightness\Contrast untill the colours fits the rest of the image.)
 +
 +Merge these "alpha looking"​ layers you have been working with, copy the image, press "alpha 1" channel in the channel window and paste the image.
 +
 +Now press the RGB channel and make sure your normal map is showing (not the "alpha looking"​ layers you were working on).
 +
 +Flatten the image and save as 32 bit TGA. Load it in TexView2 and here you can look at the alpha channel or RGB channel seperatly or blended together.
 +
 +Save it as a Paa file and there you go! Your own normal map.
 +
 +I'm not going to write about how you get the normal map ingame, partly because that's a different subject and partly because I have not figured it out myself yet.
 +
 +Have fun!
 +
  
 ===== Normal Maps Tutorial by Skaven ===== ===== Normal Maps Tutorial by Skaven =====
Line 196: Line 291:
  
 Source [[http://​developer.valvesoftware.com/​wiki/​Creating_Normal_Maps|valvesoftware]] Source [[http://​developer.valvesoftware.com/​wiki/​Creating_Normal_Maps|valvesoftware]]
 +
 +
 +===== Normals Maps by Jérôme '​JeGX'​ GUINOT =====
 +
 +**Introduction**
 +
 +Normal-map, also called bump-map, is a texture in which each texel (texel = texture element) contains a normal XYZ vector. In an usual texture, still called color-map, diffuse-map or base-map, each texel contains a RGB color. Fundamentally,​ there is no difference between a normal-map and a color-map except the interpretation which is given to the texels.
 +
 +The normal vector contained in a texel of a normal-map represents the vector perpendicular to the surface of an object on the considered texel. In this quite particular case, the normal vector has the {0.0, 0.0, 1.0} triplet as XYZ components. Such a vector indicates that there is no deformation (or relief) at the level of the pixel. In order to modify the surface, using a different vector is sufficient, for example vector {0.2, 0.3, 0.93 }. An important detail for those which would like to generate their own normal-map: a normal vector is always a unit length, i.e. sqrt(X2 + Y2 + Z2) = 1.0 where sqrt() is the square root function.
 +
 +The main use of a normal-map is the (per pixel) description of an object'​s surface. This very accurate description,​ as it is made at a pixel level, is used in the bump mapping and per pixel lighting algorithms. The built-in lighting algorithms of the graphics controllers use the per vertex normal, which leads from far to a non-realistic lighting, unless the number of polygons becomes very large (but in this case we will have some rendering speed problems!). Thanks to the programmable shaders (vertex and pixel shaders), one can from now on achieve lighting calculations at the pixel level by exploiting the normal-maps which leads to get a very realistic rendering without having high polygons models.
 +
 +Generally, a normal-map comes from a color-map. This is done with normal-maps generators. Let us see all that in detail.
 +
 +First, here is a color-map:
 +
 +{{ http://​www.ozone3d.net/​tutorials/​images/​normal_map/​color_map.jpg }}
 +
 +And here is the normal-map generated from the color-map:
 +
 +{{ http://​www.ozone3d.net/​tutorials/​images/​normal_map/​normal_map.jpg }}
 +
 +The tool that I've used to create the normal-map was available at a time on the nVidia website. May be it is still there but in a hidden directory. To save time, you may download it at the end of this page. This tool, nmapgen.exe,​ is a small software that works only in command line (I love this type of tools!). I also include the bat file that goes with it and that makes it possible to directly generate the normal-map with a simple double click. The [[http://​www.ozone3d.net/​xp_conf.php|XpConfigurator]] tool enables you to install the opening of a Dos Shell with a mouse right click within Explorer. This is very convenient to generate anywhere a normal-map.
 +
 +The Photoshop plugins provided by nVidia to create a normal-map may be downloaded from the following page: [[http://​developer.nvidia.com/​object/​photoshop_dds_plugins.html|Adobe Photoshop Plug-ins]].
 +
 +A normal-map may be recognized by its bluish color. I told you that each texel contains a XYZ vector. If one tries to directly visualize a normal-map with a simple image viewer, each texel will be interpreted as a RGB color. That means that the X coordinate of the normal vector will be read as the R (red) component of the color, Y will be read as the G (green) component and finally the Z coordinate will be comparable with the B (blue) component. As the normal-map representing the surface of the object is expressed in tangent space (for explanations,​ please refer to this tutor: [[http://​www.ozone3d.net/​tutorials/​bump_mapping.php#​tangent_space|Bump Mapping with GLSL]]), most of the normal vectors will have a Z coordinate much greater than both the X and Y coordinates. Z being interpreted as the blue component of the color, the normal-map will be overall bluish.
 +
 +The use of normal-maps in bump-mapping is explained in this tutorial: [[http://​www.ozone3d.net/​tutorials/​bump_mapping.php|Bump Mapping with GLSL]].
 +
 +Download [[http://​www.ozone3d.net/​downloads/​tutorials/​normal_map_tutor.zip|here]].
 +
 +====== Misc Tutorials ======
 +
 +http://​www.drone.org/​tutorials/​normal_maps.html
 +
 +http://​www.drone.org/​tutorials/​displacement_maps.html
 +
 +http://​www.drone.org/​tutorials/​displacement_maps_mental.html
 +
 +http://​www.drone.org/​tutorials/​rayDisplace_workarounds.html
 +
 +http://​www.drone.org/​tutorials/​rayDisplace_mental.html
 +
 +http://​www.pinwire.com/​article82.html
 +
 +http://​amber.rc.arizona.edu/​lw/​normalmaps.html
 +
 +http://​www.ionization.net/​tutsnorm1.htm
 +
 +http://​be3d.republika.pl/​howto_d3_normalmap.html
 +
 +http://​reblended.com/​www/​alien-xmp/​Tutorials/​NormalMap/​NormalMap.html
 +
 +http://​dynamic.gamespy.com/​~polycount/​ubb/​Forum8/​HTML/​002497.html
  
 ====== Utils ====== ====== Utils ======
  
 This article lists all known Normal Map tools. This article lists all known Normal Map tools.
 +
 +===== Normal Mappr =====
 +
 +Normal Mappr by TomorrowPlusX [[http://​www.idevgames.com/​forum/​showthread.php?​p=129292|topic here]].
 +
 +Enter NormalMappr!
 +
 +It's document based ( and the dev version which I'll release soon handles batches ).
 +
 +Document window:
 +{{ http://​zakariya.net/​shamyl/​etc/​NormalMapprWindow.png }}
 +
 +Batch drag-n-drop window:
 +{{ http://​zakariya.net/​shamyl/​etc/​NormalMapprBatch.png }}
 +
 +It's UB, and works pretty well. Below are links for the app and the source. Consider the source "free, as in speech (or whatever you want to do with it)". That being said, batch operation isn't ready to roll yet so it's not included in the links below:
 +
 +Here's the app:\\
 +http://​zakariya.net/​shamyl/​etc/​NormalMappr.app.zip
 +
 +Here's the source:\\
 +http://​zakariya.net/​shamyl/​etc/​NormalMappr.zip
 +
 +Let me know if you like it, or have any feedback for me.
 +
 +(as a side note, I didn't just write it for myself. Somebody on Ars Technica'​s Macintosh Achaia (http://​episteme.arstechnica.com/​eve/​...m/​726000575831) expressed the same complaint with NMG as I felt, so I figured, why not write it.
 +
  
 ===== Nvidia Tools ===== ===== Nvidia Tools =====
  
-Nvidia tools are supposedly doing normal maps (automatically?), some filters or something. Check out [[http://​developer.nvidia.com/​object/​photoshop_dds_plugins.html|Nvidia Adobe Photoshop Plug-ins]].+Nvidia tools will create ​normal maps automatically. Check out [[http://​developer.nvidia.com/​object/​photoshop_dds_plugins.html|Nvidia Adobe Photoshop Plug-ins]].
  
 Includes: Includes:
Line 234: Line 411:
  
 Download [[http://​www.codeproject.com/​cs/​media/​NormalMapCompressor.asp|NormalMapCompressor]]. Download [[http://​www.codeproject.com/​cs/​media/​NormalMapCompressor.asp|NormalMapCompressor]].
 +
 +===== xNormal normal mapper =====
 +
 +xNormal can read almost all the 3D and picture formats in the market directly so no exporters are required ( although you could use the 3DSMAX included ones to export your cages! ). It supports 3D Studio, 3DSMAX ASE, DirectX, Alias|Wavefront OBJ, Lightwave LWO, Collada 1.4,  Kaydara FilmBoX, AutoCAD DXF, Softimage dotXSI, BMP, TGA, TIFF, JPG/J2K, PNG, DirectX DDS, Photoshop PSD, HD-Photo/​Windows Media Photo, Greg Ward's HDR, ILM's OpenEXR and many many more formats.
 +
 +Comes with an OpenGL/​Direct3D interactive 3D viewer where you can see at realtime the final result and also with some useful tools like height map to normal map conversion, height map to occlusion map, etc...
 +
 +It supports advanced options like object/​tangent space, multipart loading, swapping coords, fine detail using heightmaps, floating geometry support, mirror UV/​Cylindrical coordinates,​ ambient occlusion/​displacement map generation, projective UV texture baking, non-uniform ray distance cages, advanced antialiasing,​ dual core/​hyperthreading,​ etc...
 +
 +It includes a complete C++ SDK to write plugins, compute tangent basis and generate normals, etc...
 +
 +xNormal normal mapper:
 +http://​www.xnormal.net/​
 +http://​santyhammer.blogspot.com
 +
 +===== Nvidia Melody =====
 +
 +**NVIDIA Melody**
 +
 +NVIDIA Melody creates high quality normal maps that make a low-poly model look like a high-poly model. Simply load your low-poly working model, then load your high-poly reference model, click the "​Generate Normal Map" button and watch Melody go to town.  The normal map generator can also create texture coordinates from your high-poly reference model using a projection technique.
 +
 +You can rotate your models and see the normal map in action. A command line version is provided to help you integrate Melody in your content creation pipeline. Read more about how you can get the most out of Melody in the accompanying User Guide.
 +
 +Please note that progressive mesh decimation (LOD creation) has been removed in the latest release. ​ This allows Melody to generate normal maps for significantly larger models.
 +
 +{{ http://​developer.nvidia.com/​docs/​IO/​12030/​Melody_1.2_Small.jpg }}
 +
 +Web page [[http://​developer.nvidia.com/​object/​melody_home.html|here]].
 +
 +
 +===== Misc Tools =====
 +
 +Bake AMAZING normal maps from 2D assets. Enhance normal maps, and blend different maps together. Bake displacement maps and cavity maps.\\
 +[[http://​www.crazybump.com/​beta/​download.html|CrazyBump]]
 +
 +What are Zbrush or Mudbox?
 +
 +http://​www.3d-brush.com/​
 +
 +http://​www.blender.org/​development/​release-logs/​blender-236/​normal-maps/​
 +
 +ORB is another normal map generator, converts 3D models into normal maps. Also generates displacement maps, diffuse maps, vertex-color maps. Imports ASE/OBJ/LWO formats. Previewer included. [[http://​www.soclab.bth.se/​practices/​orb.html|here]]
arma/texturing/normal_maps.1183959318.txt.gz · Last modified: 2007-07-10 09:52 (external edit)