Why chalk blue?

Blitz3D Forums/Blitz3D Programming/Why chalk blue?

Whats My Face(Posted 2008) [#1]
I was wondering how I would go about drawing a env. bump map. Why is it that chalk blue? And what determines what appears bumped-in or bumped-out? I know there is probably a thread on this already but I can't seem to find anything anywhere.


Stevie G(Posted 2008) [#2]
Never used them myself but I'm pretty sure the RGB components define a vector representing the normals for lighting ...

Nx# = ( Red - 127 ) / 127.0
Ny# = ( Green - 127 ) / 127.0
Nz# = ( Blue - 127 ) / 127.0

There are loads of discussions and code re this.


Ross C(Posted 2008) [#3]
Yeah, i have a height map to normalmap convertor in my sig below. I may need tweaking though, as someone complained of an error. Works ok for me :D

And Stevie is correct in how it works. Blitz really only works well with world space normalmap, but you can use tangent space normal maps with a cubemap, to produce good results.

Look for a thread also in the showcase part, started by Devils Child. It's about his engine.


Whats My Face(Posted 2008) [#4]
Thanks for the explanation Stevie G and thanks for the converter Ross C.