Material error :FIXED:

alex_dergian

09-05-2006 07:17:07

Iv tryed alot of things to get past this error so i figured i could use some help

when i run the program it crashs with a assertion failed !mMaterial.isNull()

my maps are 257x257 8 bit raw files and my textures are 4096x4096 iv named my files acording to the flow being;
filename.x.y.raw & filename.base.x.y.png

i think my cfg is good it has the following relivent points
LandScapeExtension=raw
PageSize=257
Data2DFormat=HeightField
TextureFormat=InstantBaseTexture
TextureStretchFactor=16

so what do you think? can anyone offer me some insight

tuan kuranes

09-05-2006 07:37:33

sdk, cvs ?
Can you find (file.cpp, line number) where the assertion do happens ?

alex_dergian

09-05-2006 07:43:02

SDK; The error happends line 83 of OgrePagingLandScapeTexture_BaseTexture2.cpp

tuan kuranes

09-05-2006 08:08:22

does this happens in demo ?
is plsm2 resource group loaded ?

alex_dergian

09-05-2006 08:14:12

No the demo works fine and the reacorce group is not plsm2 i changed it but i have all my directorys in the filesystem setup to locate the files. I messed with the demo for quite awhile and went off to do somthing of my own; so no the error is not likly in the plsm2 core, nor my application im assuming it is in the map configeration file but it looks like everything is checking out just fine?! that is why im confused. I tryed to change the map that im loading to the alpes that come with the demo and it didn't have that error, but dose this mean that plsm2 dose not support 4096 sized textures for a base or are the raw files i got having the error?

tuan kuranes

09-05-2006 08:32:02

no, it just mean Ogre cannot find material "BaseMaterial" which is defined in plsm2 resource group.

did you defined "GroupName=PLSM2" in the config file ?

alex_dergian

09-05-2006 08:42:30

The plsm2 recorece group dose not define a base matrial it is as follows

[PLSM2]
FileSystem=../../Media/paginglandscape2

FileSystem=../../Media/paginglandscape2/gui
FileSystem=../../Media/paginglandscape2/fonts
FileSystem=../../Media/paginglandscape2/models
FileSystem=../../Media/paginglandscape2/overlays
FileSystem=../../Media/paginglandscape2/materials
FileSystem=../../Media/paginglandscape2/materials/scripts
FileSystem=../../Media/paginglandscape2/materials/textures
FileSystem=../../Media/paginglandscape2/materials/programs

FileSystem=../../Media/paginglandscape2/datasrcs
FileSystem=../../Media/paginglandscape2/terrains


And the orginal map cgf is as follows

DefaultMap=HorizonTestMap

TerrainScene=TsmTerrain
puget_sound=ps_height_1k
grand_canyon=gcanyon_height_4k2k
terragen_genrated=terragen16bits
European_Alpes=Alpes
HorizonTestMap=hf_129_3

# resource group name where to find map definition
GroupName=PLSM2

# Try forbidden textureformat combinations
TextureFormatDebug=no


Also not listing a base matiral?!

Mine follow the same pattern


[AERO]
#Terrain configerations
FileSystem=../Aero/DataFiles/Terrain/Configurations


In the recorace and the cfg

#Aero Map Information file
DefaultMap=worldmap

worldmap=worldmap

# resource group name where to find map definition
GroupName=AERO

# Try forbidden textureformat combinations
TextureFormatDebug=no


And just like there maps the locations of the basemaps and hightmaps are listed in the map.cfg

tuan kuranes

09-05-2006 08:47:48

in ../../Media/paginglandscape2/materials/scripts you should have a BaseTexture.material file.

You should make a copy and put it in AERO group, if you don't load PLSM2 resource group.

alex_dergian

09-05-2006 09:20:00

!Fixed! thank you