PLSM and Lighting

CrxGames

08-01-2006 22:57:45

Hi, I'm having an issue with any kind of lighting on my PLSM terrain, both ambient lighting and LT_POINT lights have absolutely no effect on it.

CFG:

GroupName=PLSM2

Data2DFormat=HeightField
LandScapeFileName=terrain
LandScapeExtension=png

TextureExtension=png
#TextureFormat=Image
ImageFilename=path_blend

PageSize=513
TileSize=65

MaxPixelError=3

ScaleX=4000
ScaleY=1100
ScaleZ=4000

#SplatFilename0=splatting_sand.jpg
#SplatFilename1=splatting_grass.jpg

Width=4
Height=4

VisibleRenderables=256
CameraThreshold=5
HorizonVisibilityComputing=yes

Deformable=yes
VertexCompression=yes

VertexProgramMorph=no
LODMorphStart=0.5

MaxAdjacentPages=4

MaxPreloadedPages=8

NormalMap=yes

CoverageMap=yes


GEN.CFG:

GroupName=PLSM2
LandScapeFileName=terrain
LandScapeExtension=tga
LandScapeExportExtension=png
TextureExtension=png
Paged=yes
ScaleX=1
ScaleY=1
ScaleZ=1
PageSize=513
TileSize=65

OutDirectory=terrain

Data2DFormat=HeightField

ColorMapName=path_blend.tga
ColorMapSplit=yes

MaxValue=3000
MinValue=0


NormalMap=yes

CoverageMap=yes

HeightMap=yes


All my lights will effect other models, just not the terrain, yes I have tried building it with NormalMap=yes.

Please help.

EDIT: I have another smaller question

I would like some form of splatting, where I have an alpha map, where transparent gets replaced with say... dirt and non-transparent gets replaced with say... grass, how would I go about that with PLSM, I know how to do it with just normal materials and such.

tuan kuranes

09-01-2006 06:51:30

in cfg file
VertexLit=yes

But you'll get good results only using normal mapped terrain.

CrxGames

09-01-2006 21:36:59

(I'm still testing a few things)

It doesn't 'work' with the SDK, I have it mapsplitted with normals, and normals in the cfg file, and that VertexLit=yes, lighting still has no effect.

CrxGames

09-01-2006 21:44:55

Wait I solved it, VertexCompression=yes was causing it not to work =)

NormalMap looks wrong, and VertexNormals are ugly, I guess I'll end up having to use lightmaps?

tuan kuranes

10-01-2006 09:51:50

NormalMap looks wrong
NormalMap is only used if you made a texturemode using a material template using those.

VertexNormals are ugly
Unless incredible terrain resolution, yes.

I guess I'll end up having to use lightmaps
that's a solution.

You can try to use "InstantBaseTextureShadowed" texture mode and generated the Zhorizon files using mapslitter. (or modify it to suit your needs.)
It uses normal maps to light terrain and create horizon lightmap on the fly.