Skip to main content
GameDev.net gamedev.net
🔒 Locked

Normal Mapping Issue

Started by gamma_strahler Apr 11, 2007 at 9:50 AM 5 replies 1.7k views
Original Post
gamma_strahler
gamma_strahler
Hi, i´ve got normal mapping working in my project, but only based on some sample normal maps i have downloaded from the web. The problem is that i want to create my own normal maps from my diffuse textures, but i don´t understand how it works. I know there are tools that do this automatically (NVdias Plugin for Photoshop, or the D3DXComputeNormalMap function), but they alle require a height map as the input to generate the normal map. But which algorithm do i need to create the heightmap from the original texture in order to convert it to a normal map? i´m a bit confused since each paper about normal mapping leaves out this explanation. would be very happy if someone could help me :) thanks in advance! gamma_strahler
therealremi
therealremi
I doubt there is universal algorithm for heightmap generation from textures. Using RGB intensity works only in some cases (when the dark parts are more distant from the viewer). It would be nice to have a Photoshop plugin that lets you choose a range of colors that should be brighter in a heightmap and colors that should be darker (EDIT: I bet you can do that with standard Photoshop tools). E.g. if you had a red brick wall with white concrete between the bricks then you could manually set the red color to be white in a heightmap and white to be dark.
lc_overlord
lc_overlord
You can't, well not directly or accurately anyway, it really depends on your image.
Most artists either create the heightmaps required by hand or use a program to build them from a ultra high poly version of the mesh in question using 3d modelers like maya.
The simplest and cheapest way is probably just to convert it to grayscale and add a little contrast to it and so on, maybe invert it if needed, or use just the green channel.
It all depends on the source material.
lordciriuz
lordciriuz
Hi!

The algorithm depends of what kind of normal mapping are you doing. Commonly, its come in two flavors: Tangent Space and Object Space normal mapping.

If you want to mimic the fine details of a high poly mesh into a low one, you can use a normal map generator tool such us NVidia's Melody. You can found it in: http://developer.nvidia.com/object/melody_home.html.

What kind of normal mapping are you trying to achieve?

Regards,
Ariel Brunetto



Lord CiriuzAquadize Studios
gamma_strahler
gamma_strahler
Quote:
Original post by lordciriuz
Hi!

The algorithm depends of what kind of normal mapping are you doing. Commonly, its come in two flavors: Tangent Space and Object Space normal mapping.

If you want to mimic the fine details of a high poly mesh into a low one, you can use a normal map generator tool such us NVidia's Melody. You can found it in: http://developer.nvidia.com/object/melody_home.html.

What kind of normal mapping are you trying to achieve?

Regards,
Ariel Brunetto


Hi,

i perform normal mapping in tangent space, and currently i only need to apply it to static level geometry (like walls, floors, ceiling).

I have many different sort of decal textures (like cement, tiles, bricks) which i want to generate height maps and then normal maps from.

thanks a lot for your answers!

gamma_strahler
lordciriuz
lordciriuz
Unfortunately there is no single algorithm for generating quality height maps from diffuse maps. You could convert a diffuse map to a grey scale image in order to get an aproximation to the height map, but this usually lacks of quality. The better way should be painted a height map from scratch.

Regards,
Ariel Brunetto
Lord CiriuzAquadize Studios
Defrag
Defrag
Crazybump is meant to be very good. You might want to give that a try.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.