TextureFormat=Image, does it work?

Meowing

24-09-2008 19:11:33

Hello,

I can't get TextureFormat=Image working. I'm using the PagingLandScape2 from the samples (PLSM - SVN, Ogre - 1.6).

Samples/Media/paginglandscape2/terrains/508grey3y.cfg

GroupName=PLSM2

LandScapeFileName=508grey3y
FileSystem=LandScapeFileName

Width=2
Height=3

TileSize=129

ScaleX=9000
ScaleY=9000
ScaleZ=9000

Data2DFormat=HeightField

TextureFormat=Image
ImageFilename=508grey3y_texture
TextureExtension=jpg

# TextureStretchFactor=2

VisibleRenderables=256
MaxRenderLevel=5

# Where to put camera on load
BaseCameraViewpoint.x=-396.0f
BaseCameraViewpoint.y=31000.0f
BaseCameraViewpoint.z=2640.0f

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


Samples/Media/paginglandscape2/terrains/508grey3y.gen.cfg

GroupName=PLSM2

LandScapeFileName=508grey3y
LandScapeExtension=jpg
RawWidth=2133
RawHeight=2377

ColorMapName=508grey3y_texture.jpg
ColorMapSplit=yes

TextureStretchFactor=2.0

OutDirectory=LandScapeFileName

HeightMap=yes

MiniMap=yes
MiniMapWidth=64
MiniMapHeight=64


maptool.cfg:

DefaultMap=508grey3y.gen

European_Alpes=Alpes.gen

# Resource group name
GroupName=PLSM2

# Do you want to run it on all maps listed here
BatchMode=no


paginglandscape2.cfg

DefaultMap=508grey3y_Free

European_Alpes=Alpes
508grey3y_Free=508grey3y

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

# Try forbidden textureformat combinations
TextureFormatDebug=no


The error I'm getting:

PagingLandScape2: ../../../OgreMain/include/OgreSharedPtr.h:152: T* Ogre::SharedPtr<T>::operator->() const [with T = Ogre::Material]: Assertion `pRep' failed.
Aborted


After some debugging I found that it fails here:

PagingLandScapeTexture::isMaterialSupported(bool recursive):
Material::TechniqueIterator tIt = material->getTechniqueIterator ();

mMaterialBaseName is set to "Image". Why is it?

I do not have a material with that name. If I need to create that material, can someone show an example?

It works if I set DefaultMap to European_Alpes.

Thanks!

P51D_Ace

25-09-2008 16:11:59

You need to change TextureFormat=Image to ImagePaging.

In your .cfg file put something like:

TextureFormat=ImagePaging
ImageFilename=508grey3y_texture
TextureExtension=jpg
BigImage=yes


Your .gen.cfg file looks good.

Meowing

26-09-2008 17:37:32

You need to change TextureFormat=Image to ImagePaging.

In your .cfg file put something like:

TextureFormat=ImagePaging
ImageFilename=508grey3y_texture
TextureExtension=jpg
BigImage=yes


Your .gen.cfg file looks good.


It works! Thank you.