Weird PLSplattingShaderLit problem.

Dale_ee

02-10-2006 16:15:57

Something wrong with lighting. Here are screenshots:

This seems to me the right one:




and this is broken:



Scene ambient is set to 0,0,0,1
Light diffuse 1,1,1,1
Terrain lighing is switching between those two states while moving and rotating camera.
Material and shader files are original.

Dale_ee

03-10-2006 09:43:40

Am I first to meet this problem?
It seems like a half of the map isn't processed with PLSplattingShaderLit. But when you move a little then lighting falls directly under the light-source(that yellow "star" on picture is attached to light position) or sometimes terrain is again half-lightened, but somehow different.
Where ever I move my light source only one half of terrain is lightened.
Terrain LOD isn't changed between those states, and material lod doesn't seem like the reason too.

Light type is: Point
Attenuation: range-1024, const-1, linear-0.01, quad-0

tuan kuranes

03-10-2006 12:51:10

You'll have to debug shader that comes with that material.

Dale_ee

04-10-2006 15:52:28

Ok, that was my bad actually. It took too much time for me to realize, that I had to add VertexNormals=yes to config file.
But still lighting is not really smooth. It's like discreet, like black or white on low resolutions. Maybe I could just turn all vertex normals to (0,1,0)? What is the simpliest way to do so?

tuan kuranes

16-10-2006 12:44:05

don't use vertex normals, use normal map and you'll get LOD independant lighting. (per pixel lighthing instead of per vertex.).

PLSM2 CVS also has a new way to LOD so that it goes from highest to lowest independantly of tile roughness, try it.
add

RoughnessLod=no

to you terrain.cfg