assertion failed

ryak2002

12-10-2006 07:14:17

I just spent 4 hours trying unsucessfully to debug an "assertion failed" error on trying to load a terrain. The only error message is:

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


It says the error occurs at ogrepaginglandscapetexture.cpp line 371

Visual Studio says material is being set to null by the following:,

MaterialPtr material = MaterialManager::getSingleton().getByName (mMaterialBaseName);

but i have no idea why the Material Manager wouldn't have my texture, as its in a standard ogre folder (materials).

I suspect i've screwed up the terrain file as the format is *extremely* confusing. I'm trying to get 1 page from an existing height map and terrain image which i ran through the mapsplitter.

I'm setting my world geometry to PLSMterrain.cfg.

PLSMterrain.cfg:
DefaultMap=Mountains

# declare all maps
Mountains=C:\OgreSDK\media\mountains

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

# Try forbidden textureformat combinations
TextureFormatDebug=no


mountains.cfg:
### WARNING
## read Wiki page
##
# resource group name
GroupName=General

#resource either one or other (could also already part of resource "GroupName", so it's optionnal.)
FileSystem=C:\OgreSDK\media\materials\textures
#Zip=TsmTerrain.zip

##
##

################## HeightMap OPTIONS.


#
# Before using the paginglandscape2 plugins,
# you'll have to split your big heightmap file into pages.
# Use the Mapsplitter tool for that

# Base file name for the landscape heightfield data
# The file name MUST be LandScapeFileName.x.z.LandScapeExtension (ex: landscape.0.0.png)
# and MUST be squared.
LandScapeFileName=terrain
LandScapeExtension=png


# Height and Width of the landscape in number of pages
Width=1
Height=1

#
# Size of the Heightfiled in pixels (must be (power of 2) + 1)
PageSize=513
#
# Size of the Heightfield in pixels
#193 is the best spot as its the last power of two size that gives 16bits indexbuffer
TileSize=513

#
# Especialized 2D data loader.
# Currently the only available loaders are 'HeightField', 'HeightFieldTC' and 'SplineField'.
#

# 8bits, grayscale images. (png, jpg, etc) or 16 bits (raw)
Data2DFormat=HeightField
# 32bits, RGBA images. (png, jpg, etc) RGB is normal information, in alpha we store heightmap
#Data2DFormat=HeightFieldN

#
# The HeightField TC is a compresed format and need to know the value range from where the
# heightfield file was compressed
MaxValue=100
MinValue=0
# # 8bits, grayscale images. (png, jpg, etc) or 16 bits (raw)
#Data2DFormat=HeightFieldTC
# 32bits, RGBA images. (png, jpg, etc) RGB is normal information, in alpha we store heightmap
#Data2DFormat=HeightFieldNTC

#experimental spline terrain
#Data2DFormat=SplineField


#
# Scale values
# Beware that scaling is pagesize and heighmap definition range indepedant.
ScaleX=90000
ScaleY=15000
ScaleZ=90000

# if Deformation is no use for you, you can gain fps by saying no here.
Deformable=yes
# VRAM saves. need instant base texture and vertex shader support
# "vertex displacment mapping"
VertexCompression=yes

# Use vertex program to morph LODs, if available
VertexProgramMorph=yes
# The proportional distance range at which the LOD morph starts to take effect
# This is as a proportion of the distance between the current LODs effective range,
# and the effective range of the next lower LOD
LODMorphStart=0.2

# The maximum error allowed when determining which LOD to use
MaxPixelError=3

################## LIGHTING OPTIONS.
# For better looking deformed texture (instantbase)
# for shader (needed to get slope)
# could be automatic ?
VertexNormals=no
#
# For lighting
VertexLit=no


############### TEXTURING OPTIONS
#
## scale factor bettween pagesize and textursize
TextureStretchFactor=1
#
#
#
# Especialized texture loader.
#
#(no pregenerated maps needed)
# Real-time (no pregenerated maps needed) splatting => splatting (needs DX9) and splatting5 (need shaders)
# Real-time (no pregenerated maps needed)Coloring => Base.
#
#(pregenerated maps needed)
# Deformable splatting => splatting5 (need shaders)
# Deformable Coloring => instantBase.
#
#(pregenerated maps only)
# splatting => splatting2, (needs DX9) splatting3 (opengl)
# Coloring => Base2
# Image => Image (generated by any terrain texture generator terragen, T2, etc)
#
#
#
#DX = Base, Base2, InstantBase, Splatting, Splatting2, Splatting4, Splatting6, Splatting7
#GL = Base, Base2, InstantBase, Splatting3
#Both = Base, Base2, InstantBase,
# shaders : Splatting5 SplattingShader InstantBaseShadowed
#

NumTextureFormatSupported=19

TextureFormatSupported0=ImagePaging
TextureFormatSupported1=Base
TextureFormatSupported2=Base2
TextureFormatSupported3=InstantBase
TextureFormatSupported4=Splatting
TextureFormatSupported5=Splatting2
TextureFormatSupported6=Splatting4
TextureFormatSupported7=Splatting6
TextureFormatSupported8=Splatting7
TextureFormatSupported9=Base
TextureFormatSupported10=Base2
TextureFormatSupported11=InstantBase
TextureFormatSupported12=Splatting3
TextureFormatSupported13=Splatting5
TextureFormatSupported14=SplattingShader
TextureFormatSupported18=InstantBaseShadowed

# the one selected
TextureFormat=Image
ImageFilename=terrain
TextureExtension=jpg
#BigImage=yes

## realtime splatting
#TextureFormat=Base
## (need to generate maps with mapsplitter)
#TextureFormat=InstantBase
# Same but keep a copy in main memory (allow RT blending/editing)
#TextureFormat=InstantBaseEdit
#TextureFormat=InstantBaseShadowed

# Shader Splatting
# Needs pixel shader
#TextureFormat=Splatting5
#TextureFormat=SplattingShader

#need DIRECTX
#TextureFormat=Splatting

## precalc static splatting
## (need to generate maps with mapsplitter)
#TextureFormat=Base2

#TextureFormat=Splatting2
# Same but keep a copy in main memory (allow RT blending/editing)
#TextureFormat=Splatting2Edit

#TextureFormat=Splatting7
# Same but keep a copy in main memory (allow RT blending/editing)
#TextureFormat=Splatting7Edit

### Experimentals splatting techniques
#TextureFormat=Splatting4

### Experimentals splatting techniques
#need OPENGL
#TextureFormat=Splatting3
#need DIRECTX
#TextureFormat=Splatting4

#
# For splatting3 and perhaps a pass less in splatting2 and splatting4
VertexColors=no
# For splatting3
CoverageVertexColor=no
# Forsplatting4
BaseVertexColor=no
#
BaseVertexShadow=no
#
BaseVertexInstantColor=no
#
# Splatting
# We are allowing 4 textures to build the terrain texture
# MaterialHeight to change alpha weights ( using percentages )
# for Real-time textureformat and deformable (instantBase, splatting5)
NumMatHeightSplat=4
MaterialHeight0=0
MaterialHeight1=12
MaterialHeight2=60
MaterialHeight3=75


#needs to be in Search Path directory (resources.cfg)
SplatFilename0=splatting_sand.png
SplatFilename1=splatting_grass.png
SplatFilename2=splatting_rock.png
SplatFilename3=splatting_snow.png


################## PERFORMANCES OPTIONS.
#
#
#
# Visible renderables
# This is the number of visible renderables from the current camera position
# to the border of the visible terrain. (The radius of renderables)
VisibleRenderables=200
#

# LOD : LEVEL OF DETAIL

#
# Distance LOD
# This is the number of renderables in the higher LOD.
#
DistanceLOD=5
#
# if not set, it's precomputed to the max possible at this TileSize.
# Must be (2^MaxRendervel < TileSize)
MaxRenderLevel=5
#
#
# FPS Processing limit
# number of renderables loading in a single frame (if needed)
NumRenderablesLoading=50


#
# WINDOWING AROUND CAMERA
#
# Num of adjacent loaded landscape pages.
MaxAdjacentPages=2
#

# Num of adjacent preloaded landscape pages.
# Must be bigger than MaxAdjacentPages + 1, the textures are loaded in a separate thread.
MaxPreloadedPages=3
#
#

# Pages Load Factor
# Pages will be load/unload when they are about PageSize^2 * ChangeFactor
ChangeFactor=1.5
#
#

# Camera Threshold
# If the last camera position minus current camera position is >= CameraTheshold
# then the scene is trasverse to check LOD.
CameraThreshold=5

#
# Memory Pool Initial Usage Values (pre-allocated renderables and tiles.)
# use debug mode to check your needs.
# At max should be near MaxPreloadedPages*(pagesize/tilesize)*(pagesize/tilesize)
#
MaxNumRenderables=256
IncrementRenderables=256
MaxNumTiles=256
IncrementTiles=256

# Horizon Visibility computing:
# enable it if your map have moutains, cliff... not if it's mainly plane.
# everything hidden will not be send to GPU saving framerates.
HorizonVisibilityComputing=yes

# where to put camera on load.
BaseCameraViewpoint.x=0.0f
BaseCameraViewpoint.y=0.0f
BaseCameraViewpoint.z=0.0f

Baselookat.x=0.0f
Baselookat.y=0.0f
Baselookat.z=0.0f

ryak2002

12-10-2006 08:16:19

I should mention i'm just trying a simple 1 page map as a proof of concept for a project i'm working on.

The following info about the variables is available from debugging:

material = null
mMaterialBaseName = "Image"
GroupName = "General"
also, the opt object has all the right settings, including:
data 2d format = "height field"
landscape filename = "terrain"
landscape extension = png
texture filename = "terrain"
texture extension = jpg

I'm most confused because mMaterialBaseName is always being set to the setting for the TYPE of rendering instead of the texture name, then its passed to the texture system and explodes when the texture system responds with a null since theres obviously no texture called "Image" or "Base" or "Splatting" or any of the other rendering types.

Yaraher

12-10-2006 17:26:03

I've had the same error for more than a week now that I can't resolve. I was using the HF terain for testing purposes:

DefaultMap=hf

European_Alpes=Alpes
Terrain_Scene_Manager_Terrain=TsmTerrain
hf=hf_129_3

# need to download datasrc.zip from http://tuan.kuranes.free.fr/ogre.html for those
puget_sound=ps_height_1k
grand_canyon=gcanyon_height_4k2k
terragen_genrated=terragen16bits


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

# Try forbidden textureformat combinations
TextureFormatDebug=no


It used to work fine after updating Ogre (from SDK 1.2 to Source 1.2.3), and I've not changed the media folder that much. I even copy the new content from the media folder of the PLSM2 demo to my media folder, but the same assert occurs.

In my case, I get a null at:


virtual bool resourceExists(const String& name)
{
return !getByName(name).isNull();
}



where name is "InstantBaseTextureShadowedDecompress", giving an assert of (same as you):


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


material.isNull() returning true.

This is the hf_129_3.cfg:

GroupName=PLSM2

Width=1
Height=1

LandScapeFileName=hf129_3
FileSystem=../../Media/paginglandscape2/terrains/LandScapeFileName

NumTextureFormatSupported=18

TextureFormatSupported0=BaseTexture
TextureFormatSupported1=BaseTexture2
TextureFormatSupported2=InstantBaseTexture
TextureFormatSupported3=InstantBaseTextureEdit
TextureFormatSupported4=Splatting
TextureFormatSupported5=Splatting2
TextureFormatSupported6=Splatting2Edit
TextureFormatSupported7=Splatting4
TextureFormatSupported8=Splatting6
TextureFormatSupported9=Splatting7
TextureFormatSupported10=Splatting7Edit
TextureFormatSupported11=BaseTexture
TextureFormatSupported12=BaseTexture2
TextureFormatSupported16=InstantBaseTexture
TextureFormatSupported14=Splatting3
TextureFormatSupported15=Splatting5
TextureFormatSupported16=SplattingShader
TextureFormatSupported17=InstantBaseTextureShadowed

TextureFormat=InstantBaseTextureShadowed

PageSize=129

MaxRenderLevel=5
MaxPixelError=0

ScaleX=15000
ScaleY=3000
ScaleZ=15000

VisibleRenderables=256
CameraThreshold=5

Deformable=yes
VertexCompression=yes
VertexProgramMorph=yes
VertexNormals=yes

MaterialHeight1=5
MaterialHeight2=95

NumMatHeightSplat=4

AvgColorsExists=yes

//Sand
MaterialColor0.r=1.0f
MaterialColor0.g=1.0f
MaterialColor0.b=0.0f
//Grass
MaterialColor1.r=0.13f
MaterialColor1.g=0.545f
MaterialColor1.b=0.13f
//Rock
MaterialColor2.r=0.411764f
MaterialColor2.g=0.411764f
MaterialColor2.b=0.411764f
//Snow
MaterialColor3.r=1.0f
MaterialColor3.g=0.98f
MaterialColor3.b=0.98f

# where to put camera on load.
BaseCameraViewpoint.x=-4098.0f
BaseCameraViewpoint.y=30644.0f
BaseCameraViewpoint.z=293.0f

Baselookat.x=0.0f
Baselookat.y=0.0f
Baselookat.z=0.0f


and the hf_129_3.gen.cfg one:

GroupName=PLSM2

LandScapeFileName=hf129_3
TextureStretchFactor=4


OutDirectory=../../media/paginglandscape2/terrains/LandScapeFileName

PageSize=129

HeightMap=yes

MiniMap=yes
MiniMapWidth=64
MiniMapHeight=64

BaseMap=yes
CoverageMap=yes
AlphaMaps=yes

LightMap=yes
Sunx=0.0f
Suny=0.88f
Sunz=0.47f
Ambient=0.5f
Diffuse=0.5f
Blur=0.0f

ZHorizon=yes


NumMatHeightSplat=4

MaterialHeight1=30
MaterialHeight2=60
MaterialHeight3=100

SplatFilename0=splatting_sand.png
SplatFilename1=splatting_grass.png
SplatFilename2=splatting_rock.png
SplatFilename3=splatting_snow.png



Hope we can get some help around this issue :P

kungfoomasta

12-10-2006 17:39:22

Hopefully when Tuan comes back I can help him concrete a template format for the cfg files and figure out these problems. If you look at the Mapsplitter thread, you'll see I'm trying to add/change some options for better understanding.

KungFooMasta

ryak2002

12-10-2006 19:08:08

Why do you have a completely different texture mode list than i do? I'm so confused :?: :?: :?:

EDIT: i fixed the error by:

1. switching to a default map. I really don't like the map at all, but at least it works

2. adding half my hard drive to the resources.cfg file.

Although, i'm still confused and my directory structure is now officially total chaos.

Yaraher

13-10-2006 17:19:40

I'm just using the Default Map, so I guess that's the Texture mode it uses.
Adding half your hard drive? :P. Sounds like something that could help, but not sure why does it happens now.

My resource.cfg is like this:


# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=../../media/packs/OgreCore.zip

# Resource locations to be added to the default path
[General]
FileSystem=../../media
FileSystem=../../media/packs
FileSystem=../../media/fonts
FileSystem=../../media/materials/programs
FileSystem=../../media/materials/scripts
FileSystem=../../media/materials/textures
FileSystem=../../media/models
FileSystem=../../media/overlays
FileSystem=../../media/particle
FileSystem=../../media/gui

[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 here is my folder structure (now is a mess trying to fix this problem):

Crashy

15-10-2006 12:47:13

Same thing here. It was working good on a 1 month old OgreHead. Now it crashes.

The crash is just after :
mSceneMgr->setWorldGeometry( Ogre::String("paginglandscape2.cfg") );


Also notice that errors in the log:
13:37:51: Parsing script AnthariaPagingLandScapeTemplate.material
13:37:51: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 4
Function: Pass::getVertexProgramParameters
Description: This pass does not have a vertex program assigned!.
File: \ogrenew\OgreMain\src\OgrePass.cpp
Line: 1011
Stack unwinding: <<beginning of stack>>
13:37:51: Error in material PagingLandScape.Template.VertexPixelShaded at line 9 of AnthariaPagingLandScapeTemplate.material: This pass does not have a vertex program assigned!
13:37:51: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named worldViewProj.
File: \ogrenew\OgreMain\src\OgreGpuProgram.cpp
Line: 805
Stack unwinding: <<beginning of stack>>
13:37:51: Error in material PagingLandScape.Template.VertexPixelShaded at line 11 of AnthariaPagingLandScapeTemplate.material: Invalid param_named_auto attribute - An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named worldViewProj.
File: \ogrenew\OgreMain\src\OgreGpuProgram.cpp
Line: 805
Stack unwinding: <<beginning of stack>>
13:37:51: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named viewMatrix.
File: \ogrenew\OgreMain\src\OgreGpuProgram.cpp
Line: 805
Stack unwinding: <<beginning of stack>>
13:37:51: Error in material PagingLandScape.Template.VertexPixelShaded at line 12 of AnthariaPagingLandScapeTemplate.material: Invalid param_named_auto attribute - An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named viewMatrix.
File: \ogrenew\OgreMain\src\OgreGpuProgram.cpp
Line: 805
Stack unwinding: <<beginning of stack>>
13:37:51: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named compressionSettings.
File: \ogrenew\OgreMain\src\OgreGpuProgram.cpp
Line: 805
Stack unwinding: <<beginning of stack>>
13:37:51: Error in material PagingLandScape.Template.VertexPixelShaded at line 14 of AnthariaPagingLandScapeTemplate.material: Invalid param_named attribute - An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named compressionSettings.
File: \ogrenew\OgreMain\src\OgreGpuProgram.cpp
Line: 805
Stack unwinding: <<beginning of stack>>
13:37:51: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named splatSettings.
File: \ogrenew\OgreMain\src\OgreGpuProgram.cpp
Line: 805
Stack unwinding: <<beginning of stack>>
13:37:51: Error in material PagingLandScape.Template.VertexPixelShaded at line 15 of AnthariaPagingLandScapeTemplate.material: Invalid param_named attribute - An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named splatSettings.
File: \ogrenew\OgreMain\src\OgreGpuProgram.cpp
Line: 805
Stack unwinding: <<beginning of stack>>
13:37:51: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named LightPosition.
File: \ogrenew\OgreMain\src\OgreGpuProgram.cpp
Line: 805
Stack unwinding: <<beginning of stack>>
13:37:51: Error in material PagingLandScape.Template.VertexPixelShaded at line 16 of AnthariaPagingLandScapeTemplate.material: Invalid param_named_auto attribute - An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: GpuProgramParameters::getParamIndex
Description: Cannot find a parameter named LightPosition.


But the material script is correct:

material PagingLandScape.Template.VertexPixelShaded
{
technique
{
pass
{

vertex_program_ref DecompressVertex/VP
{
param_named_auto worldViewProj worldviewproj_matrix
param_named_auto viewMatrix worldview_matrix
param_named compressionSettings float4 90000.0 1.37331 90000.0 50000.0

param_named splatSettings float4 0000 10600 15500.0 25000.0
param_named_auto LightPosition light_position_object_space 3
}

fragment_program_ref DecompressVertex/FP
{
param_named Ambient float4 0.25 0.25 0.25 0
param_named Diffuse float4 1.2 1.2 1.2 0

}



texture_unit
{
texture none
tex_address_mode clamp
}
[...] //other texures units, too long to be quoted


}
}
}

Yaraher

15-10-2006 19:01:03

I got that issue too, but I solved by copying the media folder from the Demo to my own media, and playing with the resources.cfg.

But that just brought me the other error, that I can't resolve yet :(

tuan kuranes

16-10-2006 13:28:07

using SDK folder has to be

\anyfolderyouwant\
\anyfolderyouwant\paginglandscapeSDK\
\anyfolderyouwant\\OgreSDK\


that solves any problem related to resources .

@crashy : read the changelog in the "latest SDK" thread. you miss new cfg parameters. none is no more an option for texture in material file, you have to use keywords now (Image, Alpha, Coverage, etc...)open a new thread for that.

Yaraher

16-10-2006 16:09:59

I'm not sure I understood correctly your answer :P Did you mean to add those lists to the resources.cfg?

I'm currently not using the SDK version of Ogre.

tuan kuranes

16-10-2006 17:58:19

I tought you were using ogre SDK.
Using source you have to modify your resource.cfg.
I'll try to add automatic detection as well for Ogre Source next plsm2 sdk.

Crashy

16-10-2006 17:58:38

Thanks Tuan ;)

I think I'll find the solution for the non-SDK version .

Edit: ok, just found that the Material names changed. In fact I may have find that sooner. It was easier than thougt. :lol:

Just another question: I succeded to launch the first terrain, but when I want to change with this command

mCamera->getSceneManager()->setOption( "CurrentMap", &nextMapL );
I get the assert of the first post.

I think the paging landscape resources are not reloaded with that call, so it crashes. I'll check if that is the problem.

PS: the cfg file that I try to load is exactly the same as the one that succeded, but with another name.

Yaraher

16-10-2006 21:43:59

I managed to resolve it finally :D. Took me a while, but it was really an easy problem.

I still don't know why updating cause it (cause I moved no files) but it seems my media folder was a really naughty mess.

Had to recreated from original, checking file by file, and finally, it no longer have that issue, working fine at last :)

Thanks for your help!

tuan kuranes

17-10-2006 07:13:43

@crashy: loading a map is now using multiple command either loading a new config file or changing texture mode using set option, then load map (that prevents multiple loading when changing map config file and texture mode.)
Call you're missing is
mScnMgr->setOption( "LoadMap", 0 );

Crashy

21-10-2006 22:17:14

Just for info, do you use a custom resource loader for every resource in the plsm2 group?

tuan kuranes

23-10-2006 14:00:45

no custom resource loader. keyword substitution thing is before material is loaded

unclepauly

21-10-2007 19:14:22

tuan said -
I tought you were using ogre SDK.
Using source you have to modify your resource.cfg.


can someone please explain what this means ? i am also getting the debug assertion at the same place (and i am using the source) -


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

where mMaterialBaseName is ImagePaging and groupName is PLSM2.

i have just started with PLSM and for testing purposes and i am trying to run the demo application with the ps_height_1k terrain. so my paginglandscape2.cfg file file looks like:


DefaultMap=puget_sound

# need to download datasrc.zip from http://tuan.kuranes.free.fr/ogre.html for those
puget_sound=ps_height_1k

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

# Try forbidden textureformat combinations
TextureFormatDebug=no


i have run the map splitter on puget_1k.gen.cfg and this has given me a ps_height_1k directory with all the png files in it. my resources.cfg file points to this directory, putting it into the PLSM2 group.

so here is what my resources.cfg file looks like:


# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=../../../Media/packs/OgreCore.zip

# Resource locations to be added to the default path
[General]
FileSystem=../../../Media
FileSystem=../../../Media/fonts
FileSystem=../../../Media/materials/programs
FileSystem=../../../Media/materials/scripts
FileSystem=../../../Media/materials/textures
FileSystem=../../../Media/models
FileSystem=../../../Media/overlays
FileSystem=../../../Media/particle
FileSystem=../../../Media/gui
FileSystem=../../../Media/DeferredShadingMedia
Zip=../../../Media/packs/cubemap.zip
Zip=../../../Media/packs/cubemapsJS.zip
Zip=../../../Media/packs/dragon.zip
Zip=../../../Media/packs/fresneldemo.zip
Zip=../../../Media/packs/ogretestmap.zip
Zip=../../../Media/packs/skybox.zip

[PLSM2]
FileSystem=../../../Media/PLSMTerrainCfgFiles
FileSystem=../../../Media/PLSMTerrainCfgFiles/ps_height_1k
FileSystem=../../../Media/PLSMTerrains


in the PLSM2 group is:
- the PLSMTerrainCfgFiles directory includes the ps_height_1k.cfg and puget_1k.gen.cfg files (and the ps_height_1k directory).
- the PLSMTerrainCfgFiles/ps_height_1k directory includes all the png files as a result of running the mapsplitter.
- the PLSMTerrains directory includes ps_height_1k.png and ps_texture_1k.png (required by the mapsplitter).

in the General group is just the usual Ogre resources.

so what do i need to add to resources.cfg to get rid of the debug assertion ?

thanks for anyones help!

unclepauly

23-10-2007 14:16:31

ok, i realised that you have to have seperate media directory - one in the general group as normal, and one for the plsm2 group. now the assertion has gone.