[Solved] Compositor no more have effect

pepere

04-03-2009 23:56:37

Hello,
I've just installed the last version of python-ogre 1.6.1 and lately 1.6.1 svn.
Since 1.6.1 the Demo_Compositor.py is no more working:
- cliclking on an effect doesn't activate it.
For example if I activate posterize the effect is not visible. It was working with v1.6.0 rc 1
It is working with C++ ogre demo.
So anybody have an idea of what I could do/try?
(is there a way to find a link to old revision to try back?)

Thx!

andy

05-03-2009 10:04:16

Works OK for me (well most of them do...) -- does the checkbox actually 'click/check'..

Andy

pepere

05-03-2009 10:32:08

Yep
Whn I click got this in the stdout:

<ogre.renderer.OGRE._ogre_.Compositor object at 0x038488A0>
['BackgroundLoaded', 'Handle', 'LOADSTATE_LOADED', 'LOADSTATE_LOADING', 'LOADSTATE_PREPARED', 'LOADSTATE_PREPARING', 'LOADSTATE_UNLOADED', 'LOADSTATE_UNLOADING', 'Listener', 'Loade
d', 'Loading', 'LoadingState', 'ManuallyLoaded', 'Name', 'Origin', 'Parameters', 'Prepared', 'Reloadable', 'Size', 'StateCount', '__class__', '__delattr__', '__dict__', '__doc__',
'__getattribute__', '__hash__', '__init__', '__instance_size__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', '_dirt
yState', '_fireBackgroundLoadingComplete', '_fireBackgroundPreparingComplete', '_notifyOrigin', 'addListener', 'backgroundLoaded', 'calculateSize', 'changeGroupOwnership', 'cleanup
Dictionary', 'compile', 'copyParametersTo', 'createParamDictionary', 'createTechnique', 'escalateLoading', 'getCreator', 'getGroup', 'getHandle', 'getLoadingState', 'getName', 'get
NumSupportedTechniques', 'getNumTechniques', 'getOrigin', 'getParamDictionary', 'getParameter', 'getParameters', 'getSize', 'getStateCount', 'getSupportedTechnique', 'getSupportedT
echniqueIterator', 'getTechnique', 'getTechniqueIterator', 'handle', 'isBackgroundLoaded', 'isLoaded', 'isLoading', 'isManuallyLoaded', 'isPrepared', 'isReloadable', 'load', 'loadI
mpl', 'loaded', 'loading', 'manuallyLoaded', 'name', 'origin', 'parameters', 'postLoadImpl', 'postUnloadImpl', 'preLoadImpl', 'preUnloadImpl', 'prepare', 'prepareImpl', 'prepared',
'queueFireBackgroundLoadingComplete', 'queueFireBackgroundPreparingComplete', 'reload', 'reloadable', 'removeAllTechniques', 'removeListener', 'removeTechnique', 'setBackgroundLoa
ded', 'setParameter', 'setParameterList', 'size', 'stateCount', 'touch', 'unload', 'unloadImpl', 'unprepareImpl']
****b
***1
HDR OK !!!!
ADDING LISTENER
NOTIFYCOMPOSITOR
OK
DONE
***2
SETUP DONE
Texture: spot_shadow_fade.png: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
Compositor <ogre.gui.CEGUI._cegui_.String object at 0x03BF0780>
CHANGED

Do u have something like this too?

dermont

05-03-2009 20:10:18

Try updating the compositor in CompositorDemo_FrameListener itemStateChanged to:

def itemStateChanged( self, index, state):
## get the item text and tell compositor manager to set enable state
#compositor = str(self.mCompositorSelectorViewManager.getItemSelectorText(index))
compositor = self.mCompositorSelectorViewManager.getItemSelectorText(index).c_str()
....

pepere

05-03-2009 20:20:43

Yep it works back now, thx!
Do I need to tell to ogre maintainer the problem?

andy

06-03-2009 03:11:56

I'd first like to understand what is happening here as on my system either syntax works.. How about you do something like: compositor = str(self.mCompositorSelectorViewManager.getItemSelectorText(index))
print type(compositor)
print compositor
compositor = self.mCompositorSelectorViewManager.getItemSelectorText(index).c_str()
print type(compositor)
print compositor
and let me know what gets printed..

Also could you run python ReportVersion.py > out.txt from the python-ogre home directory and post the out.txt file..

Thanks
Andy

pepere

06-03-2009 09:09:33

Hello Andy,

Here is the output:

<type 'str'>
<ogre.gui.CEGUI._cegui_.String object at 0x039F0780> <- not working version
<type 'str'>
Bloom <- working one


And report version output:

Module OGRE ( ogre.renderer.OGRE )
PythonOgre Ver: 1.6.1
Module Version: 1.6.1
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 11:56:23 Jan 25 2009
Raw Detail : 1.6.1_840:845_ogre_1.6.1_1
Module OIS ( ogre.io.OIS )
PythonOgre Ver: 1.6.1
Module Version: 1.0
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 14:17:33 Jan 25 2009
Raw Detail : 1.6.1_840:844_ois_1.0_1
Module betagui ( ogre.gui.betagui )
PythonOgre Ver: 1.6.1
Module Version: 2
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 12:28:09 Jan 25 2009
Raw Detail : 1.6.1_840_betagui_2_1
Module OgreAL ( ogre.sound.OgreAL )
PythonOgre Ver: 1.6.1
Module Version: r115
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 09:33:54 Jan 25 2009
Raw Detail : 1.6.1_840_ogreal_r115_1
Module ODE ( ogre.physics.ODE )
PythonOgre Ver: 1.6.1
Module Version: 0.10.1
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 12:19:41 Jan 25 2009
Raw Detail : 1.6.1_840_ode_0.10.1_1
Type Error:
Module OgreOde ( ogre.physics.OgreOde )
PythonOgre Ver: 1.6.1
Module Version: r2497
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 14:01:46 Jan 25 2009
Raw Detail : 1.6.1_840_ogreode_r2497_1
Module OgreNewt ( ogre.physics.OgreNewt )
PythonOgre Ver: 1.6.1
Module Version: r2429
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 09:42:45 Jan 25 2009
Raw Detail : 1.6.1_840_ogrenewt_r2429_1
Module Opcode ( ogre.physics.Opcode )
PythonOgre Ver: 1.6.1
Module Version: 1.3
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 14:53:04 Jan 25 2009
Raw Detail : 1.6.1_840_opcode_1.3_1
Module bullet ( ogre.physics.bullet )
PythonOgre Ver: 1.6.1
Module Version: 2.73
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 14:32:33 Jan 25 2009
Raw Detail : 1.6.1_840_bullet_2.73_1
Module PhysX ( ogre.physics.PhysX )
PythonOgre Ver: 1.6.1
Module Version: 2.8.1
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 13:41:18 Jan 25 2009
Raw Detail : 1.6.1_840_physx_2.8.1_1
Type Error:
Module OgreBulletC ( ogre.physics.OgreBulletC )
PythonOgre Ver: 1.6.1
Module Version: r2493
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 17:37:16 Jan 25 2009
Raw Detail : 1.6.1_840_ogrebulletc_r2493_1
Module OgreBulletD ( ogre.physics.OgreBulletD )
PythonOgre Ver: 1.6.1
Module Version: r2493
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 18:23:19 Jan 25 2009
Raw Detail : 1.6.1_840M_ogrebulletd_r2493_1
Module theora ( ogre.addons.theora )
PythonOgre Ver: 1.6.1
Module Version: r2455
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 14:22:16 Jan 25 2009
Raw Detail : 1.6.1_840_theora_r2455_1
Module plib ( ogre.addons.plib )
PythonOgre Ver: 1.6.1
Module Version: 1.6.1
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 13:06:27 Jan 25 2009
Raw Detail : 1.6.1_840_ogre_1.6.1_1
Module ogreforests ( ogre.addons.ogreforests )
PythonOgre Ver: 1.6.1
Module Version: r2615
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 19:34:06 Jan 25 2009
Raw Detail : 1.6.1_840:846_ogreforests_r2615_1
Module et ( ogre.addons.et )
PythonOgre Ver: 1.6.1
Module Version: 2.3.1
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 12:19:06 Jan 25 2009
Raw Detail : 1.6.1_840_et_2.3.1_1
Module caelum ( ogre.addons.caelum )
PythonOgre Ver: 1.6.1
Module Version: 0.4
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 12:01:48 Jan 25 2009
Raw Detail : 1.6.1_840:845_caelum_0.4_1
Module noise ( ogre.addons.noise )
PythonOgre Ver: 1.6.1
Module Version: r2486
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 14:06:19 Jan 25 2009
Raw Detail : 1.6.1_840_noise_r2486_1
Module watermesh ( ogre.addons.watermesh )
PythonOgre Ver: 1.6.RC1
Module Version: 1.0
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 10
Compiled : 04:48:22 Nov 8 2008
Raw Detail : 1.6.RC1_772_watermesh_1.0_10
Module particleuniverse ( ogre.addons.particleuniverse )
PythonOgre Ver: 1.6.1
Module Version: 0.81
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 09:57:58 Jan 25 2009
Raw Detail : 1.6.1_840_particleuniverse_0.81_1
Module cadunetree ( ogre.addons.cadunetree )
PythonOgre Ver: 1.6.1
Module Version: 0.6
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 14:16:14 Jan 25 2009
Raw Detail : 1.6.1_840_cadunetree_0.6_1
Module ogrepcz ( ogre.renderer.ogrepcz )
PythonOgre Ver: 1.6.1
Module Version: 1.6.1
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 14:12:41 Jan 25 2009
Raw Detail : 1.6.1_840_ogrepcz_1.6.1_1
Module hydrax ( ogre.addons.hydrax )
PythonOgre Ver: 1.6.1
Module Version: 0.4
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 14:29:26 Jan 25 2009
Raw Detail : 1.6.1_840_hydrax_0.4_1
Module hikari ( ogre.gui.hikari )
PythonOgre Ver: 1.6.1
Module Version: r23
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 13:20:41 Jan 25 2009
Raw Detail : 1.6.1_840_hikari_r23_1
Module canvas ( ogre.gui.canvas )
PythonOgre Ver: 1.6.1
Module Version: 1.0
Python Version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Code Generated: 1
Compiled : 12:34:21 Jan 25 2009
Raw Detail : 1.6.1_840_canvas_1.0_1
Import failed: mygui


Laurent

pepere

06-03-2009 09:16:25

By the way:
Selecting halftone effect:
Compositor Halftone
CHANGED
Error loading texture HalftoneVolume. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate r
esource HalftoneVolume in resource group General or any other group. in ResourceGroupManager::openResource at ..\src\OgreResourceGroupManager.cpp (line 753)
Error loading texture HalftoneVolume. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate r
esource HalftoneVolume in resource group General or any other group. in ResourceGroupManager::openResource at ..\src\OgreResourceGroupManager.cpp (line 753)
Error loading texture HalftoneVolume. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate r
esource HalftoneVolume in resource group General or any other group. in ResourceGroupManager::openResource at ..\src\OgreResourceGroupManager.cpp (line 753)
Error loading texture HalftoneVolume. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate r
esource HalftoneVolume in resource group General or any other group. in ResourceGroupManager::openResource at ..\src\OgreResourceGroupManager.cpp (line 753)


Selecting Dither:
Dither
Compositor Dither
CHANGED
Error loading texture DitherTex. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resour
ce DitherTex in resource group General or any other group. in ResourceGroupManager::openResource at ..\src\OgreResourceGroupManager.cpp (line 753)
Error loading texture DitherTex. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resour
ce DitherTex in resource group General or any other group. in ResourceGroupManager::openResource at ..\src\OgreResourceGroupManager.cpp (line 753)
Error loading texture DitherTex. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resour
ce DitherTex in resource group General or any other group. in ResourceGroupManager::openResource at ..\src\OgreResourceGroupManager.cpp (line 753)
Error loading texture DitherTex. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resour
ce DitherTex in resource group General or any other group. in ResourceGroupManager::openResource at ..\src\OgreResourceGroupManager.cpp (line 753)


Selecting Motion Blur or Heat Vision:
Crash the gui (like a segfault)

We can also try to correct these issue ;)
Is there anybug tracking for pyogre? As I'm a newbie, i'm testing all the demo so ... :)

pepere

06-03-2009 23:25:31

By the way, just in case, i've checked if media pack was different with OgreSDK. And no, all files are the same :( .
So must be a problem of ressource loader?

dermont

07-03-2009 07:11:54

The problem with the HalftoneVolume / DitherTex textures is the demo doesn't create
these textures. I'm sure this will be updated soon.

For the Motion Blur or Heat Vision segfault try updating the textureDefinition formats in Demo_Compositor - createEffects from:

def_.format = Ogre.PixelFormat.PF_R8G8B8

to:

def_.formatList.append(Ogre.PixelFormat.PF_R8G8B8 )

pepere

07-03-2009 12:11:00

Yep thx, all works now!

Activating heat vision I got this error, but the effect seems ok:
Texture: HeatNoise.tga: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
Texture: HeatLookup.tga: Loading 1 faces(PF_R8G8B8,256x1x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x1x1.
Error loading texture Input. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource I
nput in resource group General or any other group. in ResourceGroupManager::openResource at ..\src\OgreResourceGroupManager.cpp (line 753)
Error loading texture Input. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource I
nput in resource group General or any other group. in ResourceGroupManager::openResource at ..\src\OgreResourceGroupManager.cpp (line 753)


I also found a bug in HandleMouseMove (replaced MouseCursor by CEGUI.MouseCursor):

Here is the corrected code.

##--------------------------------------------------------------------------
def handleMouseMove( self, e):
if( self.mLMBDown and not self.mRMBDown):
## rotate camera
self.mRotX += -e.moveDelta.d_x * self.mAvgFrameTime * 10.0
self.mRotY += -e.moveDelta.d_y * self.mAvgFrameTime * 10.0
CEGUI.MouseCursor.getSingleton().setPosition( self.mLastMousePosition )
self.mUpdateMovement = True
else:
if( self.mRMBDown and not self.mLMBDown):
## translate camera
self.mTranslateVector.x += e.moveDelta.d_x * self.mAvgFrameTime * MOVESPEED
self.mTranslateVector.y += -e.moveDelta.d_y * self.mAvgFrameTime * MOVESPEED
##self.mTranslateVector.z = 0
CEGUI.MouseCursor.getSingleton().setPosition( self.mLastMousePosition )
self.mUpdateMovement = True
else:
if( self.mRMBDown and self.mLMBDown):
self.mTranslateVector.z += (e.moveDelta.d_x + e.moveDelta.d_y) * self.mAvgFrameTime * MOVESPEED
CEGUI.MouseCursor.getSingleton().setPosition( self.mLastMousePosition )
self.mUpdateMovement = True

return True

andy

07-03-2009 15:22:15

Thanks for the fix (also needed to define MOVESPEED which was missing)

You might also want to upgrade to the latest Python-Ogre as the original CEGUI issue you were having was already fixed (via a different mechanism).... See the forum message here

Regards
Andy

dermont

07-03-2009 16:30:42

Now I'm totally confused. I don't see anything in trunk and the CEGUI wrappers that would
resolve the str/ c_str() issue. All I can see is the demo is updated to use c_str(). I think it would be useful, given the numerous problems with the demos on Linux, to know if the current SDK build on windows match the svn trunk and the version that you are using.

andy

07-03-2009 23:28:08

The fix came about due to changes with Py++ -- there were some behaviour changes that Roman fixed fairly recently (pretty printing etc) and I believe that this fixed what was a bug in Python-Ogre 1.6....

The demo always used to work (at least on Windows) hence something changed along the way and was resolved -- however I don't use Linux very often so it's possible that the implicit conversion only works on Windows ??

Are you building with the latest Py++ ?

And I always build my Windows binary releases from the trunk, using the latest and greatest of every other library/module that I can find :)

regards
Andy

pepere

07-03-2009 23:48:03

Hello andy,

Just a quick question offtopic.(I'm quite new to ogre community)
I've seen a little bug with
pixelBuffer.lock (0, ctypes.sizeof(self.cbuffer),ogre.HardwareBuffer.HBL_DISCARD)

The first parameter (that is offset for buffer) seems not be taken into account. Whichever value I put the behaviour is the same.
Should I ask help on forum or directly go to sourcefoge bugtracker?

andy

08-03-2009 03:24:35

Looking at the Ogre source you have to set the offset to 0 -- I suspect that with other (software?) buffers the offset is valid however with a pixelbuffer you simply have to lock it all..

By all means ask the question on the main Ogre fourms...

Regards
Andy

pepere

08-03-2009 08:02:08

Ok thx a lot andy! Will go to Ogre forum, thx for your help.

dermont

13-03-2009 22:40:40

Andy wrote:

The fix came about due to changes with Py++ -- there were some behaviour changes that Roman fixed fairly recently (pretty printing etc) and I believe that this fixed what was a bug in Python-Ogre 1.6....

The demo always used to work (at least on Windows) hence something changed along the way and was resolved -- however I don't use Linux very often so it's possible that the implicit conversion only works on Windows ??

Are you building with the latest Py++ ?


Sorry my fault, I didn't clear the cegui cache file after updating to the latest Py++ before building. The implicit conversion works fine on Linux.