Manipulating materials in terrain scene manager


09-04-2006 06:00:27

The OGRE api for terrain scene manager mentions that there is a method:


which returns the material used by the terrain

I tried in pyogre using


Either is a valid attribute of the scene manager....

Do I need to manually cast the scene manager to a terrain scene manager some way?

I would like to add another pass to the terrain material to display a grid, mentioned in this thread:

Thanks in advance.


09-04-2006 10:23:26

Sorry I don't think you can do this. pOgre only currently supports attributes for:
- additional basic types int,real,boolean,string using:

Looking at the TerrainSceneManager.cpp there doesn't appear to be a


09-04-2006 18:19:00

Sorry for the flood of questions. After porting my test app to use pyogre1.2, I get the following:

texState.textureAddressingMode = ogre.TextureUnitState.TAM_CLAMP
TypeError: in method 'TextureUnitState_textureAddressingMode_set', argument 2 of type 'Ogre::TextureUnitState::UVWAddressingMode'

How should I port this to be compatible with ogre1.2?

I was basically following the projective decal tutorial and texState is created like this:

texState = _pass.createTextureUnitState('Decal.png')
texState.setProjectiveTexturing(True, self.decalFrustum)
texState.textureAddressingMode = ogre.TextureUnitState.TAM_CLAMP



17-04-2006 11:04:15

Yep, sorry the createTextureUnitState needs to be updated. The patch to update pyOgre1.2 was only such that it compiles and runs.

There's still quite a bit to do in terms of functionality, updates and testing. I'll only be able to really start on these at the beginning of May.

I was hoping that since Clay will no longer be working on pyOgre that others would want to contribute.