View Full Version : building up an height map

04-21-2004, 07:05 AM
hi all,
after some time spent doing boring stuff, i am back on opengl (lucky me the boring stuff brought me a cycle!)

i was working on the displacement demo of frustum and i was asking myself: how can i make an height map??? ok for the normals, i downloaded the nvidia tool for generating em on the fly, but what about height map? I was thinking it was just a BW version of the texture, but it is not true, so...
how do u generate it? are there any tools? By hand? (good ole force solution)

any help will be gratefully received...
bye the Gunslinger

04-21-2004, 10:08 AM
Getting height/normal maps from the standard texture map is somewhat hard to guess in my experience. Sometimes, doing a luminance computation works (especially true for old, somewhat pre-lit content) however, I think The Right Way is to simply tell the artist to generate them for you.
I don't know if this is difficult but I really don't care. It's their business.

If you don't have normal or height map... just hope you can do it with the BW image or simply forget about it.

I somebody knows, I would also be interested in knowing that.

04-21-2004, 10:10 PM
Originally posted by Obli:
I think The Right Way is to simply tell the artist to generate them for you.
I don't know if this is difficult but I really don't care. It's their business.
way to speack obli, ;)
unfortunatly the artist working with me are already fed up with work, so i guess i'll have to manage myself, that's why i was looking for a way of generating maps in a fast way.
Come on, no one knows how to generate an height map on the fly?
On a tutorial I've read that sometimes u can use photoshop to apply a photocopy filter to the original texture, to have a sort of BW effect. I've tried, but with scarce results...

OT: Nice to know you are italian too Obli :)

04-21-2004, 10:41 PM
Seems to me that the situation is ambiguous, at best.
Say you have a dark pixel in a texture; is it dark because it's sunken and in a shadow, or because its simply a dark color. There's no way to answer that mathematically, unless you declare a explicit mapping between height and intensity, or something else intrinsic to the image.

04-22-2004, 01:41 AM
that's right portal, and actually is the point where i stopped.
BTW: i worked to make a little displacement texture with my *lovely* hands :)
Now, apart from my awful dwawing skills, i've noticed this problem: my normal map and my height map does not match... I mean, looking at the final result the height map looks a lot shallower than the projected shadows...
I am using the NVidia normal map generator, so how should i scale the map? there is a lil text box asking me the scale factor, but right now i am using it quite randomly.

thank you the G.

04-22-2004, 12:45 PM
That's right gunslinger, a scale is exactly what you want, since the virtual distance between pixels is arbitrary. I've never used the normal map tool you mentioned, but if it's got scaling options, I'm sure they would do the trick. I don't know if it scales the height, or the distance between pixels. If it scales the height, then scale it up; if it scales the distance between pixels, then scale it down.