bumpmapping dont work plz help


(R4v4G3) #1

hi i wanted to test the bumpmapping in q3
i compiled my map with q3map2 my shader code was
i dont know what i do wrong plz help me :


textures/fiesling_metal/bodengitter
{
qer_editorimage textures/death/bodengitter.tga
q3map_normalimage textures/death/bodengitter_bump.tga
q3map2_normalimage textures/death/bodengitter_bump.tga
{
map $lightmap
rgbGen identity
}
{
map textures/death/bodengitter.tga
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
}

edit

the code from the bat file


q3map2.exe -fulldetail "D:\Games\QUAKE3\baseq3\maps\death.map"
q3map2.exe -vis "D:\Games\QUAKE3\baseq3\maps\death.bsp"
q3map2.exe -light -extra  -samples 3 "D:\Games\QUAKE3\baseq3\maps\death.bsp"
pause



(obsidian) #2

No such thing as q3map2_normalImage

Get rid of -fulldetail and -extra.

Try lowering the lightmap sample size for higher resolution lightmaps. Try something like “q3map_lightmapSampleSize 4” or something in your shader. Default sample size is 16.

Show us your normal map image. Maybe something is wrong with it.


(R4v4G3) #3

i know that q3map2_normalImage is wrong
but i thought that it would work cause q3map_normalImage didnt worked
and heres the image (the bumpmap)


(obsidian) #4

Q3 normalmaps are not the same as D3 normalmaps - they are not per-pixel but per-luxel. This means that the resulting lightmap image baked with the normal maps will still be much lower in resolution than anything that you will see in real per-pixel normalmaps. So fine-line normalmap details won’t be visible since the lightmaps are at a much lower resolution.

This is why I suggested using q3map_lightmapSampleSize to boost the lightmap resolution (at the obvious cost of increased lightmap memory usage). Even if maxing out on the lightmap resolution, your normalmaps will still look rather blurry.

With that normalmap, I doubt if you will be able to get decent results - the image contains too many fine-line details. I would probably just paint shadows into your texture.