Python-Ogre 1.6.0 RC1 Available

andy

15-09-2008 15:06:35

If you were wondering where the 1.2 release has got to, well it isn't going to happen :)
Instead we've decided to change the versioning scheme to reflect the version of Ogre that is being used in the build (as there was confusion with the 1.2 RC release).

From this point on Python-Ogre releases will follow the format of Python-Ogre-<Ogre Version>-<SVN Rev>-<Python Version>

Hence [b]Python-Ogre-1.6.0RC1-741-py252[/b] is available.

Included are Updates and General Library Improvements, along with significant GccXML/P++/Boost implementations under the hood so I'm looking for as much feedback as possible.

It's been built using MSVC 9, DirectX August 2008, Boost 1.36.0, Py++ r1383 and includes the following modules:
  1. * OGRE 1.6.0RC1
    * OIS 1.2
    * CEGUI 0.6.1
    * QuickGUI 0.9.7
    * betagui 1.7
    * OgreAL 0.3
    * ODE 0.10.1
    * OgreRefApp 1.6.1RC1
    * OgreOde 1.0
    * OgreNewt 1.0
    * Opcode 1.3
    * bullet 2.70
    * PhysX 2.8.1
    * NxOgre 1.0-21
    * OgreBulletC 1.0
    * OgreBulletD 1.0
    * theora 0.5.0
    * plib 1.8.4
    * ogreforests 0.1
    * et 2.2
    * caelum 0.2.1
    * noise 1.0
    * watermesh 1.0
    * particleuniverse 0.8
    * cadunetree 0.6
    * ogrepcz 1.0
    * hydrax 0.3[/list:u]
    Do update your DirectX drivers when asked -- I'm using the 'August' SDK.

    Please use the [b]SourceForge Tracker [/b] to report any issues etc and we'll get to them asap.

    Regards
    Andy

fpois

20-09-2008 16:41:45

woohoo! huge thanks for the new release
yes, this version number scheme is much less confusing

Sam.Online

24-09-2008 17:00:52

is there any linux release planned ?

andy

25-09-2008 09:12:33

Tim is working on the Linux binary release. In the mean time you can use the Linux build instructions from the wiki..

Andy

Sam.Online

25-09-2008 12:14:54

thats what i'm using right now, was just hoping to be able to use the lastest version soon xD

NicoEchaniz

26-09-2008 08:46:48

Hi,

Are there instructions to build python-ogre 1.6 from source on Linux?
What's the link?

Thanx,

NicoEchániz

Entropai

26-09-2008 09:16:01

Hi,

Are there instructions to build python-ogre 1.6 from source on Linux?
What's the link?

Thanx,

NicoEchániz


I gues they're referring to the wiki:
http://wiki.python-ogre.org/index.php/Main_Page

NicoEchaniz

26-09-2008 14:01:58

I'm using Gentoo and I was wondering if there have been any updates of the ebuilds, produced by Stefan Rank, to support the latest python-ogre version.

The last message[1] in the developers list regarding this matter is dated april/2008.

Has anyone built python-ogre 1.6 successfully on Gentoo yet, either using the ebuilds or manually?


Thanks,

NicoEchániz


[1] http://groups.google.com/group/python-o ... ac6132b509

milo

02-10-2008 05:24:21

Impressive library - this has let a group of us start prototyping a game without much experience at all. Thanks much for your hard work!

Notes on 1.6.0RC1:
  1. The asX "hand wrapper" methods don't appear to work. Take ogre.renderer.OGRE.PSSMShadowCameraSetup.asShadowCameraSetup, for instance:
    >> pssm = PSSMShadowCameraSetup()
    >> print pssm
    <ogre.renderer.OGRE._ogre_.PSSMShadowCameraSetup object at 0x031CA570>
    >> shadowCameraSetup = pssm.asShadowCameraSetup()
    >> print shadowCameraSetup
    <ogre.renderer.OGRE._ogre_.PSSMShadowCameraSetup object at 0x031CA570>
    >> sceneManager.setShadowCameraSetup(shadowCameraSetup)
    Boost.Python.ArgumentError: Python argument types in
    SceneManager.setShadowCameraSetup(SceneManager, PSSMShadowCameraSetup) did not match C++ signature:
    setShadowCameraSetup(struct SceneManager_wrapper {lvalue}, class Ogre::SharedPtr<class Ogre::ShadowCameraSetup> shadowSetup)
    setShadowCameraSetup(class Ogre::SceneManager {lvalue}, class Ogre::SharedPtr<class Ogre::ShadowCameraSetup> shadowSetup)


    I think py++ may be taking the returned cast pointer, matching it up against the existing pssm Python object, and then producing another PSSMShadowCameraSetup* on the next binding invocation. This issue already showed up on the developer forum - search for "Ataching a camera to a node and a node to a bone., in python ogre" from ~November 2007.
    [/*:m]
  2. ogre.addons.ogreforests.TreeLoader2D.setHeightFunction seems to be missing. Judging belatedly from the demo code, I guess you knew that already. :oops:
    [/*:m]
  3. The Caelum in this build isn't 0.2.1, but a pre-0.4.0 snapshot somewhere in the SVN 276-282 range.
    [/*:m]
  4. The micross.ttf in demos/qgui/media may not be legal to redistribute.[/*:m][/list:u]

andy

03-10-2008 14:22:46

You can run "python ReportVersion.py" to get the real versions -- and you are right, Caelum is more recent (R321) -- always the latest I can get :)

I'll check the font, however I simply use the media from the underlying library so they problem may be there...

[UPDATE]The shadow camera issue you are having is due to the fact you need to pass setShadowCameraSetup a ShadowCameraSetupPtr, hence you need code like:
sceneManager.setShadowCameraSetup(ogre.ShadowCameraSetupPtr(myShadowCamera))
Have a look at demos/ogre/Demo_Shadows.py

I'm looking again at the 'asX' functions and will probably remove them as the only case I know of where there is an issue is with creating nodes from a bone, and I'm fixing that by hand..

thanks
Andy

milo

04-10-2008 11:28:05



[UPDATE]The shadow camera issue you are having is due to the fact you need to pass setShadowCameraSetup a ShadowCameraSetupPtr, hence you need code like:
sceneManager.setShadowCameraSetup(ogre.ShadowCameraSetupPtr(myShadowCamera))
Have a look at demos/ogre/Demo_Shadows.py


I did. That demo crashes while selecting most shadow types, even after applying simple repairs (see below). There is no ShadowCameraSetupPtr class in the Python-Ogre bindings. It's supposed to be an instantiation of the SharedPtr template, which doesn't translate into Python. There's a Set_Smart_Pointers call in generate_code.py that appears to deal with these; I haven't had time to figure out what it does yet.

Diffs to Demo_Shadows.py:

--- Demo_Shadows.py 2008-09-13 17:13:30.000000000 -0700
+++ Demo_Shadows_Fixed.py 2008-09-28 20:35:34.227125000 -0700
@@ -9,6 +9,7 @@
# You may use self sample code for anything you like, it is not covered by the
# LGPL like the rest of the engine.
# -----------------------------------------------------------------------------
+import os
import sys
sys.path.insert(0,'..')
import PythonOgreConfig
@@ -21,6 +22,14 @@

import exceptions, random

+MOVESPEED = 1.0
+
+# Patch to ensure we get a working parser.
+if os.name == 'nt':
+ CEGUI.System.setDefaultXMLParserName("ExpatParser")
+else:
+ CEGUI.System.setDefaultXMLParserName("TinyXMLParser")
+
def convertOISButtonToCegui( buttonID):
if buttonID ==0:
return CEGUI.LeftButton
@@ -351,7 +360,7 @@
## rotate camera
self.mRotX += -e.moveDelta.d_x * self.mAvgFrameTime * 10.0
self.mRotY += -e.moveDelta.d_y * self.mAvgFrameTime * 10.0
- MouseCursor.getSingleton().setPosition( self.mLastMousePosition )
+ CEGUI.MouseCursor.getSingleton().setPosition( self.mLastMousePosition )
self.mUpdateMovement = True
else:
if( self.mRMBDown and not self.mLMBDown):
@@ -359,12 +368,12 @@
self.mTranslateVector.x += e.moveDelta.d_x * self.mAvgFrameTime * MOVESPEED
self.mTranslateVector.y += -e.moveDelta.d_y * self.mAvgFrameTime * MOVESPEED
##self.mTranslateVector.z = 0
- MouseCursor.getSingleton().setPosition( self.mLastMousePosition )
+ 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
- MouseCursor.getSingleton().setPosition( self.mLastMousePosition )
+ CEGUI.MouseCursor.getSingleton().setPosition( self.mLastMousePosition )
self.mUpdateMovement = True

return True
@@ -383,7 +392,7 @@
if self.mLastMousePositionSet:
CEGUI.MouseCursor.getSingleton().setPosition( self.mLastMousePosition )
self.mLastMousePositionSet = False
- self.root.releaseInput()
+ self.rootGuiPanel.releaseInput()

return True

@@ -402,7 +411,7 @@
if (not self.mLastMousePositionSet):
self.mLastMousePosition = CEGUI.MouseCursor.getSingleton().getPosition()
self.mLastMousePositionSet = True
- self.root.captureInput()
+ self.rootGuiPanel.captureInput()

return True

@@ -988,7 +997,7 @@
self.mCurrentProjection = proj
self.sceneManager.setShadowCameraSetup(self.mCurrentShadowCameraSetup)
self.updateTipForCombo(cbo)
- if (not self.mCustomRockwallVparams.isNull() and not self.mCustomRockwallFparams.isNull()):
+ if (self.mCustomRockwallVparams and self.mCustomRockwallFparams):
## set
self.setDefaultDepthShadowParams()

@@ -1004,11 +1013,11 @@
self.mCustomRockwallFparams.setNamedConstant("gradientClamp",
self.mGradientClamp.getScrollPosition())

- self.mCustoself.mAtheneFparams.setNamedConstant("fixedDepthBias",
+ self.mCustomAtheneFparams.setNamedConstant("fixedDepthBias",
self.mFixedBias.getScrollPosition())
- self.mCustoself.mAtheneFparams.setNamedConstant("gradientScaleBias",
+ self.mCustomAtheneFparams.setNamedConstant("gradientScaleBias",
self.mGradientBias.getScrollPosition())
- self.mCustoself.mAtheneFparams.setNamedConstant("gradientClamp",
+ self.mCustomAtheneFparams.setNamedConstant("gradientClamp",
self.mGradientClamp.getScrollPosition())


@@ -1031,7 +1040,7 @@
self.updateDepthShadowParams()

def handleParamsChanged( self,e):
- if ( notself.mCustomRockwallVparams.isNull() and not self.mCustomRockwallFparams.isNull()):
+ if ( self.mCustomRockwallVparams and self.mCustomRockwallFparams):
self.updateDepthShadowParams()
return True

@@ -1051,10 +1060,10 @@
self.mAthene.setMaterialName(BASIC_ATHENE_MATERIAL)
for i in self.pColumns:
i.setMaterialName(BASIC_ROCKWALL_MATERIAL)
- self.mCustomRockwallVparams.setNull()
- self.mCustomRockwallFparams.setNull()
- self.mCustoself.mAtheneVparams.setNull()
- self.mCustoself.mAtheneFparams.setNull()
+ self.mCustomRockwallVparams = None
+ self.mCustomRockwallFparams = None
+ self.mCustomAtheneVparams = None
+ self.mCustomAtheneFparams = None


def handleMaterialChanged( self, e):
@@ -1065,7 +1074,7 @@
mat = cbo.getSelectedItem().getID()
if (mat != self.mCurrentMaterial):
if mat == self.MAT_STANDARD:
- self.sceneManager.setShadowTexturePixelFormat(Ogre.PF_L8)
+ self.sceneManager.setShadowTexturePixelFormat(Ogre.PixelFormat.PF_L8)
self.sceneManager.setShadowTextureCasterMaterial(Ogre.StringUtil.BLANK)
self.sceneManager.setShadowTextureReceiverMaterial(Ogre.StringUtil.BLANK)
self.sceneManager.setShadowTextureSelfShadow=False
@@ -1093,9 +1102,9 @@
self.mCustomRockwallVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters()
self.mCustomRockwallFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters()
themat = Ogre.MaterialManager.getSingleton().getByName(CUSTOM_ATHENE_MATERIAL)
- self.mCustoself.mAtheneVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters()
- self.mCustoself.mAtheneFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters()
- self.mDepthShadowTweak.setVisible(True)
+ self.mCustomAtheneVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters()
+ self.mCustomAtheneFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters()
+ self.mDepthShadowTweak.setVisible = True
## set the current params
self.setDefaultDepthShadowParams()
elif mat == self.MAT_DEPTH_FLOAT_PCF:
@@ -1120,9 +1129,9 @@
self.mCustomRockwallVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters()
self.mCustomRockwallFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters()
themat = Ogre.MaterialManager.getSingleton().getByName(CUSTOM_ATHENE_MATERIAL + "/PCF")
- self.mCustoself.mAtheneVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters()
- self.mCustoself.mAtheneFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters()
- self.mDepthShadowTweak.setVisible(True)
+ self.mCustomAtheneVparams = themat.getTechnique(0).getPass(1).getShadowReceiverVertexProgramParameters()
+ self.mCustomAtheneFparams = themat.getTechnique(0).getPass(1).getShadowReceiverFragmentProgramParameters()
+ self.mDepthShadowTweak.setVisible = True

## set the current params
self.setDefaultDepthShadowParams()

andy

04-10-2008 13:10:00

Problem is specific to the PSSM camera which isn't exposed -- I've fixed the problem (in python_ogre_sizeof.h and python_ogre_aliases.h) and it'll work in the next release..

Also notice that getShadowCamera api has changed (an additional argument at the end for iteration) which requires a couple of demo updates..

Thanks for you help in finding this..

Andy

skorpio

12-10-2008 02:32:50

Hello,

I just upgraded to 1.6 but loading some of the particlesystem are failing to load.

I also noticed that there are a lot of exception errors on the ogre.log file. I'm not sure what happen here. Please check the ogre.log in the demos\ogre folder.



18:19:15: Parsing script Examples.program
18:19:15: OGRE EXCEPTION(7:InternalErrorException): Unable to compile Cg program Ogre/HardwareSkinningTwoWeightsCg: CG ERROR : The compile returned an error.
(48) : warning C7011: implicit cast from "float4" to "float3"
(49) : warning C7011: implicit cast from "float4" to "float3"
(126) : warning C7011: implicit cast from "float4" to "float3"
(127) : warning C7011: implicit cast from "float4" to "float3"
(0) : error C3001: no program defined



Traceback (most recent call last):
File "C:\PythonOgre\demos\wxOgre\stone3.py", line 667, in <module>
main()
File "C:\PythonOgre\demos\wxOgre\stone3.py", line 655, in main
app = sceneApp()
File "C:\PythonOgre\demos\wxOgre\classOgreCore.py", line 32, in __init__
self._build_scene()
File "C:\PythonOgre\demos\wxOgre\stone3.py", line 600, in _build_scene
self.particlefountain1 = self.sm.createParticleSystem('fountain1','PEExample
s/stoneh2')
ogre.renderer.OGRE._ogre_exceptions_.OgreInvalidParametersException: OGRE EXCEPT
ION(2:): Cannot find required template 'PEExamples/stoneh2' in ParticleSystemMan
ager::createSystem at ..\src\OgreParticleSystemManager.cpp (line 311)

c:\PythonOgre\demos\wxOgre>



Thanks,

saladin

13-10-2008 00:43:35

Hey,
I can understand why in 1.6 we cannot access sceneManager.rootSceneNode
directly and why ogre.Vector3.__init__ doesn't take tuple or list any more. but how come SceneNode.getWorldPosition() function is gone? Will some of these be back for coming generations of python-ogre?

Seems like I'm better off staying with 1.2 for now... :cry:

andy

13-10-2008 02:58:21

getWorldPosition is a change in the Ogre API not Python-Ogre... Check out the Ogre Porting page...


Andy

saladin

13-10-2008 03:08:38

getWorldPosition is a change in the Ogre API not Python-Ogre... Check out the Ogre Porting page...


Andy


oops, that was my fault. I should have read the Ogre porting page first. Sorry. :oops:

andy

13-10-2008 12:49:39

However your lists into Vector3 is very valid and I'll take another look at that to see what the issue is :)

Regards
Andy

skorpio

14-10-2008 04:59:47

Hello,

Oops, I forgot to post some of the details to the particle system bug.
I'm using ogre 1.4. I created a stone folder within the \demos folder.

I downloaded the magic of stonehenge and I moved the Media folder within the stone folder. There were some error due to duplication of resources. So I removed those files.
I put music.wav in the stone folder.

I wrote a python-ogre code (stone3.py) that works ok in version 1.4 but not on 1.6

here is the link the the source files.

stone henge link:
http://www.ogre3d.org/index.php?option= ... Itemid=150

stone3.py
http://www.mediafire.com/file/zeldnogdzi1/stone.zip

Thanks,

dermont

14-10-2008 05:58:32

You need to add "particle_system" before your particle templates, e.g:

particle_system PEExamples/stoneh2

skorpio

17-10-2008 06:37:00

Hello,

thanks, I modified the templates and now those works.
However I ran, some of the other ogre demos like demo_particleFx and I don't see the problem even though the template doesn't say:
system particle.

Thanks,

skorpio

17-10-2008 06:38:48

Hello

I ran caelum demo and I got this error:

Traceback (most recent call last):
File "C:\PythonOgre\demos\caelum\Demo_Caelum01.py", line 287, in <module> application.go()
File "C:\Python25\lib\site-packages\ogre\renderer\OGRE\sf_OIS.py", line 66, in go
if not self._setUp():
File "C:\Python25\lib\site-packages\ogre\renderer\OGRE\sf_OIS.py", line 107, in _setUp
self._createScene()
File "C:\PythonOgre\demos\caelum\Demo_Caelum01.py", line 229, in _createScene
caelum.CaelumSystem.CAELUM_COMPONENT_SOLAR_SYSTEM_MODEL |
AttributeError: type object 'CaelumSystem' has no attribute 'CAELUM_COMPONENT_SK
Y_COLOUR_MODEL'
Remove Window Listener


Thanks,

BernieRoehl

23-10-2008 19:34:06

Hello

I ran caelum demo and I get an error about the


Traceback (most recent call last):
File "C:\PythonOgre\demos\caelum\Demo_Caelum01.py", line 287, in <module> application.go()
File "C:\Python25\lib\site-packages\ogre\renderer\OGRE\sf_OIS.py", line 66, in go
if not self._setUp():
File "C:\Python25\lib\site-packages\ogre\renderer\OGRE\sf_OIS.py", line 107, in _setUp
self._createScene()
File "C:\PythonOgre\demos\caelum\Demo_Caelum01.py", line 229, in _createScene
caelum.CaelumSystem.CAELUM_COMPONENT_SOLAR_SYSTEM_MODEL |
AttributeError: type object 'CaelumSystem' has no attribute 'CAELUM_COMPONENT_SK
Y_COLOUR_MODEL'
Remove Window Listener




Yes, I get the same error. I work around it by commenting out all the components (creating a mask of zero). It goes further, but then says

CaelumSystem.__init__(CaelumSystem, Root, SceneManager)
did not match C++ signature:
__init__(struct _object *, class Ogre::Root * root, class Ogre::SceneManager,
CaelumComponent componentsToCreate)


I uncomment the mask parameter in that line, and it goes a little further before saying:

AttributeError: 'CaelumSystem' object has no attribute 'getRootNode'

I suppose I could continue working through it, but I suspect it's a case of the caelum demo being broken due to API changes.

Also, caelum.Version__ says "0.2.1", even though the release notes say it's 0.4.

So, I think a few things still need work.
:)

andy

24-10-2008 04:16:03

SVN version of Python-Ogre has had the Caelum version numbering fixed (currently it's "r331") and the demo is almost working again -- will be OK in the next Binary release of Python-Ogre..

Andy

SomeFusion

31-10-2008 16:11:47

Hi,

I'm trying Entity.setUserObject or setUserAny but both don't work. I'm getting this error:
http://img353.imageshack.us/my.php?image=poerrorkw7.jpg

andy

01-11-2008 12:41:14

You need to pass it a UserDefinedObject -- could do something like:class UD ( ogre.UserDefinedObject ):
def __init__ ( self, id=99, name='Default' ):
ogre.UserDefinedObject.__init__(self)
self.id = id
self.name = name

def getTypeName ( self ):
return self.name

def getTypeID ( self ):
return self.id

class TutorialApplication(SampleFramework.Application):


def _createScene(self):
sm = self.sceneManager

ent1 = sm.createEntity("Robot","robot.mesh")
ud = UD( )
ent1.setUserObject ( ud )

nud = ent1.getUserObject()
print nud
print nud.id, nud.name
print nud.getTypeName()
print nud.getTypeID()


Regards
Andy

SomeFusion

01-11-2008 15:13:27

Ah thank you! For me as a python programmer these errors are hard to understand.

One little request, could MOC - Minimal Ogre Collision be included as a utility function?

SiWi

01-11-2008 18:35:25

Yep thought of that too.
But I'll probably do a direct port for practice in the near future.

fpois

09-11-2008 22:05:12

btw, the official 1.6.0 of Ogre (Shoggoth) just release, looking forward to using through Python-Ogre

andy

09-11-2008 22:34:02

I've put out a snapshot on sourceforge if you want to do some testing -- expect a 'complete' release in the next week..

Andy

alextreme

18-11-2008 12:31:32

Hey andy,

I've been trying (by looking at the existing generators/wrappers) to get btHeightfieldTerrainShape wrapped properly in bullet as it isn't automatically wrapped (even when adding the appropriate header files to the generator).

The problem is that the constructor for this class takes a void pointer for the heightfield data, where you'd expect a python list of integers or floats. I've written a small C++ wrapper as a function, however doing the same for a constructor doesn't seem to work. The py++ documentation recommends using add_fake_constructor for situations like this, but I can't seem to get it to work either.

Am I going in the right direction? Writing a wrapper for a void pointer in a constructor seems like overkill with all the automatic wrapping you have going on in python-ogre, so I was hoping you could point me at a similar situation in all these code generators that I could take a look at :)

Would be grateful for any pointers you could give me!

andy

18-11-2008 13:38:27

Happy to help -- probably best to move this to the google mailing list as it's easier for me to manage when traveling... Also Roman (Py++ author) monitors that list which can be very helpful..

Unfortunately there isn't a simple way to manage constructor wrapping in an automated fashion (not something that Py++ does yet) 'and' I haven't tried the fake constructor thing in Py++...

So a 'createbtHeightfieldTerrainShape' function added to hand_made_wrappers is your best bet.. you can see this in createVertexData in the ogre wrapper or createSimpleSunPositionModel in caelum...

regards
Andy

alextreme

18-11-2008 14:27:02

Thanks for those pointers (and the speedy reply)!

I'll fool around with this some more and notify you via the list when I get it working. To be honest, I didn't even know there was a development mailing list :oops:

visu4241

05-04-2013 07:59:01

I tried to create 3rd person camera using http://wiki.python-ogre.org/index.php/3 ... m_Tutorial
in python-ogre but it gives error as "scenenode" object has no attribute as "getWorldPosition()"
please help me on this. I also try it on python-ogre 1.6.0 :(

dermont

10-04-2013 09:53:31

I tried to create 3rd person camera using http://wiki.python-ogre.org/index.php/3 ... m_Tutorial
in python-ogre but it gives error as "scenenode" object has no attribute as "getWorldPosition()"
please help me on this. I also try it on python-ogre 1.6.0 :(


It has been changed to _getDerivedPosition(), see the discussion notes related to the tutorial.

http://wiki.python-ogre.org/index.php/T ... m_Tutorial