OGRE EXCEPTION(2:): World geometry is not [SOLVED]

texugo

17-07-2008 04:51:47

Hi everyone

I install python-ogre for windows and python25 and begin to learn it on PyWiky...

But in Basic 3 i've this trouble:

OGRE EXCEPTION(2: World geometry is not supported by the generic SceneManager

My Code:

import ogre.renderer.OGRE as ogre
import SampleFramework as sf

class TutApp(sf.Application):
def _createScene(self):
self.sceneManager.setWorldGeometry("terrain.cfg")

def __chooseSceneManager(self):
self.root.createSceneManager(ogre.ST_EXTERIOR_CLOSE, 'TerrainSM')

if __name__=='__main__':
ta=TutApp()
ta.go()

My plugins.cfg:

## Use this for Windows
# Define plugin folder
PluginFolder=../../plugins
Plugin=RenderSystem_GL.dll
Plugin=RenderSystem_Direct3D9.dll
Plugin=Plugin_ParticleFX.dll
Plugin=Plugin_BSPSceneManager.dll
Plugin=Plugin_OctreeSceneManager.dll
Plugin=Plugin_CgProgramManager.dll

How to fix this problem?
Thanks :)

chpod

17-07-2008 08:20:54

(Please, use the [ code ] tags, otherwise your messages are difficult to read and indentation is lost)

I think createSceneManager is called after setWorldGeometry.

Try this:
import ogre.renderer.OGRE as ogre
import SampleFramework as sf

class TutApp(sf.Application):
def _createScene(self):
self.sceneManager = self.root.createSceneManager(ogre.SceneType.ST_EXTERIOR_CLOSE, 'TerrainSM')
self.sceneManager.AmbientLight = 0.5, 0.5, 0.5
self.sceneManager.setWorldGeometry("terrain.cfg")

def __chooseSceneManager(self):
print "Nothing"

if __name__=='__main__':
ta=TutApp()
ta.go()


You'll then have to adjust setting in order to get something visible (currently it is all black).

Good luck,
chpod

texugo

18-07-2008 00:32:14

Hi chpod

Thanks a lot... work's fine now. :lol: