[Help] Assert Material is null error

grizzley90

08-12-2006 00:13:28

Hey I have been getting this error for a while and im trying to figure it out but i haven't gotten anywhere.

This is the error message i get.
Assertion failed at file OgrePagingLandScapeTexture.cpp

Expression: !material.isNull() && String(mMaterialBaseName + "Must exists in the" + opt->groupName + "group").c_str()"


I am using the PLSM2 from tuans website.

This is my resources.cfg

[PLSM2]
FileSystem=Media\PLSM2\
I only have one media folder which is that one (i manually load ogrecore).

This the config file i pass to setworldgeometry

#Needed to run map

DefaultMap=level1
level1=level1config
GroupName=PLSM2



#----------------------------------------------------------------------------------------
# Level Options
#----------------------------------------------------------------------------------------
GroupName=PLSM2
LandScapeFileName=testmap
LandScapeExtension=png
LandScapeExportExtension=png
TextureExtension=png

#----------------------------------------------------------------------------------------
# Paging Option
#----------------------------------------------------------------------------------------

Width=2
Height=3

#----------------------------------------------------------------------------------------
# Datasource
#----------------------------------------------------------------------------------------
Data2DFormat=HeightField

#----------------------------------------------------------------------------------------
# Texturing
#----------------------------------------------------------------------------------------
TextureFormat=Image
ImageFilename=testmap_c0

This is the map config file.

Everything needed is in that one folder so i dont know what the problem is...

OgreLog doesn't display any exception.

tuan kuranes

09-12-2006 12:59:33

PLSM2 cannot find a material...
Did you load PLSM2 resource, as it's done in Demo ?

grizzley90

09-12-2006 13:06:06

PLSM 2 cannot find which material exactly? I copied all the stuff that the demo uses and added it to my app and it still won't work.

tuan kuranes

09-12-2006 13:29:39

the one you're using : Image

grizzley90

09-12-2006 23:46:21

k since i couldn't find an example of anything like that I did this:
material Image
{
technique
{
pass
{
texture_unit
{
texture testmap_c0.png
}
}
}
}
I dont know if its right or anything but now im getting this:

18:37:24: Viewport for camera 'MainCam', actual dimensions L: 0 T: 0 W: 800 H: 600
18:37:24: Creating resource group PLSM2
18:37:25: Added resource location 'Media\PLSM2\' of type 'FileSystem' to resource group 'PLSM2'
18:37:25: Initialising resource group PLSM2
18:37:25: Parsing scripts for resource group PLSM2
18:37:25: Parsing script Image.material
18:37:25: Finished parsing scripts for resource group PLSM2
18:37:25: Initialising resource group PLSM2
18:37:25: PLSM2 : Cannot find map named testmap.2.1.png
18:37:25: Texture: testmap_c0.png: Loading 1 faces(PF_B8G8R8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
18:37:26: PLSM2 : Cannot find map named testmap.2.0.png
18:37:26: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 4
Function: PagingLandScapeData2D_HeightField::_load
Description: Error: Invalid height map size : 256,256. Should be 2^n+1, 2^n+1.
File: ..\src\OgrePagingLandScapeData2D_HeightField.cpp
Line: 320
Stack unwinding: <<beginning of stack>>
18:37:30: *-*-* OGRE Shutdown
18:37:30: Unregistering ResourceManager for type Compositor
18:37:30: Unregistering ResourceManager for type Font
18:37:30: Unregistering ResourceManager for type Skeleton
18:37:30: Unregistering ResourceManager for type Mesh
18:37:30: Unregistering ResourceManager for type HighLevelGpuProgram
18:37:30: Unloading library Plugins/Plugin_CgProgramManager.dll
18:37:30: Unloading library Plugins/Plugin_ParticleFX.dll
18:37:30: Unloading library Plugins/Plugin_PagingLandScapeSceneManager2.dll
18:37:30: Render Target 'Pure3D - Testing' Average FPS: 57.4827 Best FPS: 57.4827 Worst FPS: 57.4827
18:37:30: D3D9 : Shutting down cleanly.
18:37:30: Unregistering ResourceManager for type Texture
18:37:30: Unregistering ResourceManager for type GpuProgram
18:37:30: D3D9 : Direct3D9 Rendering Subsystem destroyed.
18:37:30: Unloading library RenderSystem_Direct3D9.dll
18:37:30: Unregistering ResourceManager for type Material
18:37:30: Unloading library OgrePlatform.dll


Which doesn't make any sense because my height map is 1025 * 1025... :?

grizzley90

10-12-2006 15:25:13

does anyone have an example of a working runtime cfg? or a working binary version of terrain generator because for some reason my terrain generator always gives me an error when it tries to run the map splitter app....

tuan kuranes

14-12-2006 13:53:38

TerrainGenerator is a WIP. will be in next plsm2 binary distribution, so you'll have to wait.