Confuuusing splattiiing... [solved]

Dibalo

10-01-2007 21:21:05

Hi again. This problem may look like easy but it´s extremely difficult for me. Here it is:

I have made a map with GOOF and exported it. Now I have coverage maps, heightmaps and base maps (which are yellow so they are useless (?)). I have tried to run the map with PLSM2 without GOOF. The entire map is grey! Here is the config file which was made by GOOF:# kartta.cfg (in English: map.cfg)
AvgColorsExists=yes
CameraThreshold=1
Deformable=yes
FileSystem=../media/projects/LandScapeFileName
GroupName=PLSM2
Height=2
LandScapeExtension=raw
LandScapeFileName=kartta
MaterialDistanceLod=256
MaxAdjacentPages=8
MaxNumRenderables=256
MaxNumTiles=256
MaxPixelError=6
MaxRenderLevel=5
NumMatHeightSplat=4
NumTextureFormatSupported=1
PageSize=129
ScaleX=258
ScaleY=1024
ScaleZ=258
SplatFilename0=Terrain_Dirt1.jpg
SplatFilename1=Terrain_Rock1.jpg
SplatFilename2=Terrain_Grass1.jpg
SplatFilename3=Terrain_Cobble1.jpg
TextureFormat=PLSplattingShaderLit
TextureFormatSupported0=PLSplattingShaderLit
TextureModifiable=yes
TextureStretchFactor=2
TileSize=65
VertexCompression=yes
VertexLit=yes
VertexNormals=yes
VertexProgramMorph=yes
VisibleRenderables=256
Width=2

I have also a PLSplattingShaderLit.material file, but Falagard said that its corrupted (I understood it like that). Here is the original topic: http://www.ogre3d.org/phpBB2/viewtopic. ... 806#196806 . Sorry for cross posting... :oops:

So.. I´m searching for possibility to use other Splatting modes like Splatting, Splatting2... to do the job. Unfortunately I understand noting about those modes (I have tried to search information but I suck with it :( ). Part reason may be my bad English skills..

That why I´m asking a little favor: Could someone give me a simple working example that uses splatting. I could be even better if the example code would be compatible with my map. Then I could reseach it and maybe learn something about it. Then I have no need to ask this kind of stupid questions... :lol:

Millions of thaks to the possible helper(s)!

Edit: Falagard said that SplattingShader should work. How could I use this? Is SplattingShader compatible with one coverage map with RGBA-channels?

Dibalo

11-01-2007 15:10:40

Hmmm.. I have tried some methods and made a little bit progress.. Here is the current kartta.cfg -file:GroupName=PLSM2
LandScapeFileName=kartta
LandScapeExtension=raw
FileSystem=../Media/projects/LandScapeFileName


Deformable=no
Width=2
Height=2


ScaleX=258
ScaleY=1024
ScaleZ=258
PageSize=129
TileSize=65

MaxPixelError=3
MaxRenderLevel=5
NumMatHeightSplat=4

NumTextureFormatSupported=1
TextureFormat=SplattingShader
TextureFormatSupported0=SplattingShader

SplatFilename0=Terrain_Dirt1.jpg
SplatFilename1=Terrain_Rock1.jpg
SplatFilename2=Terrain_Grass1.jpg
SplatFilename3=Terrain_Cobble1.jpg

TextureModifiable=no
TextureStretchFactor=2

VertexNormals=yes

I have made my textures to show now. But the colors are totally wrong. I mean that where should be grass, there is some dark blue color etc... I think that also texture UV-mappings are messed too. All textures are too big. So.. Could you give me some nice advices to make this map look right?

P.S. Here is the media I use (no current shader or config file, just images): http://koti.mbnet.fi/masa_89/varmuus/Kartta.rar
I´m using Shaders included in PLSM2 binary demo. The PLSM-version I use is from CVS.

tuan kuranes

12-01-2007 13:19:26

PLSM2 comes with maps that has splatting texture mode working.
Try to make them work (hit 'k' to change texturemode when looking a map.)

You'll have to understand how it works.
you specify some height range were you want color/texture to be shown, then goofed/mapsplitter generates texture based on that. If base texture is only yellow, that means it only founds heights that is inside the height range of sand you specified in the config file.
Check ogre wiki on materials - plsm2 - plsm2 config option for more detailed information and samples.

Dibalo

12-01-2007 18:29:49

Thaks again Tuan! :)

After you encouraged me to explore materials, I opened one, "SplattingShader.material". I understood about 0.1 % about that code, but fortunately my eyes sticked to the lines "vertex_program_ref DecompressSplatShadercg/VP". "Hmmm...", I thought. Like that said, there must be somewhere a vertex program where this shader is referring to... But holy hell! I have included no vertex programs! So I opened the Ogre.log -file. I found error lines while parsing SplattingShader.material. "Undefined vertex programs" it said. I made a little search for my GOOF DEV-folder with the keyword "Splat". It gave me some interesting looking names like "DecompressSplatShader.cg", "DecompressSplat.cg" etc... I opened that folder containing many other .program and .cg files. Oh.. I feel stupid! :oops:

After I added these files to my resource system, everything started to play wonderful! I can see all textures in correct colors and UV-mappings. I have tested no lights in the scene but I think they would work fine too.

I´m still not familiar with all config file options, but I think that the testing would be key to the knowledge! :D

leonardoaraujo.santos

28-09-2007 15:59:10

Hi Dibalo I'm also trying to load a map created with Goof Edit in PLSM2 Demo, what steps I should do.

Sorry for my english