terrain lighting problem

Blitz3D Forums/Blitz3D Programming/terrain lighting problem

abacadabad(Posted 2003) [#1]
Hi everyone,
I have a terrain with 3 layers of textures (A main map spread over the whole terrain, a detail map and a lightmap for the detail textures (so they only are shown on particular patrs of the map)). It looks good, but when I change the ambient lighting the area that has detail is the only place that is affected, with the main texture not covered by detail remaining full brighness...I checked through and through, and cant seem to find the problem. Any help wuold be greatly appreciated,
Thanks :-)


tex2 = LoadTexture( "detail.bmp")
ScaleTexture tex2,6,6
grass=LoadTexture( "base2.bmp")
ScaleTexture grass, 1024,-1024
tex66=LoadTexture( "rock.bmp")
ScaleTexture tex66, 512,512
TextureBlend grass,3

terrain2=LoadTerrain ("heightmapa.bmp")
ScaleEntity terrain2, 0.5,8,0.5

PositionEntity terrain2,0,7,0
TerrainShading terrain2, True
EntityTexture terrain2,tex2,0,0
EntityTexture terrain2,grass,0,1
EntityTexture terrain2,tex66,0,2


Sunteam Software(Posted 2003) [#2]
What happens if you remove the texture blend on the grass? Just thinking that your using mul blending for detail, add blending for grass and then mul blending again for rock, in that order on the mesh. It might be this combination is causing areas of the resulting output to have reached a threshold level which might be visually ineffective under ambient light changes.


abacadabad(Posted 2003) [#3]
I removed the grass blend, it the whole map was covered with the detail texture (grass) with the lightmapped areas still affected. I then tried EntityColor terrain2, 10,10,10 and again the only area affected was the area used by the lightmap, as if it seems to only address these areas. The "insaner" multitexturing demo is the same way, you cant change the ambient lighting at all so im guessing its the same problem.


Sunteam Software(Posted 2003) [#4]
What gfx card do you have? Drivers?


abacadabad(Posted 2003) [#5]
A Pentium 4 2Ghz, with NVIDA RIVA TNT graphics card. If it possible to change the ambient lighting on the Insaner demo on other computers, then it could just be my PC set up...


abacadabad(Posted 2003) [#6]
<bump> if anyone here can change the ambient lighting on the insaner demo please let me know :-)


Floyd(Posted 2003) [#7]
EntityFX terrain,1

This is Full Bright, which means lighting is ignored.

The other problem, as Sunteam said, is most likely the blending.
Multiply mode is multiplying numbers between 0 and 1.
These get small very quickly. The Additive blend is thus
the dominant dominant factor.

With EntityFX set to 0 the ambient light will have an effect.
But after all the blending that effect is very small.


abacadabad(Posted 2003) [#8]
How do you think I could avoid that and have normal lighting?