Google

Python-Ogre 1.6.1 Update - April 2 w/ Python 2.6 support

A discussion on Python-Ogre, the library which allows you to drive OGRE directly from Python

Moderators: OGRE Team, Python-Ogre Moderators

Python-Ogre 1.6.1 Update - April 2 w/ Python 2.6 support

Postby andy » Thu Feb 26, 2009 3:37 am

UPDATE April 2 - r940 available -- changes below in italics

I've created an updated 1.6.1 binary that is designed to upgrade an existing 1.6.1 installation (ie it only contains the updated files)..

You can download it from here for Python 2.5

Or here for Python 2.6

Decompress it over an existing Python-Ogre 1.6.1 installation and run "python setup.py install" to refresh your modules...

Changes can be found in the changelog.txt and include:
* FIX: Bullet and ogreBullet Modules
* FIX: Pretty printing of Vectors etc fixed
* Fix: Exposed std::vector<bool> for joystick buttons in OIS
* Fix: DataStream Ptr's were broken - fixed issues with non const shared pointers being exposed

* Update: Caelum, OgreForests, OgreAL, Hydrax, ODE and Bullet all have updates to base C++ libraries
* Update: Using Boost 1.38

* Update: OgreMovableFactoryObect (specifically getType function) can now be sub classed
* Update: Bullet modules created around Bullet 2.73 now working properly and wrappers improved
* Update: ogre.LodDistanceList is now ogre.stdVectorFloat -- change in ET demo
* Update: QuickGUI Demo updated - works and shows more functionality
* Update: Canvas wrapper expanded to include helper functions and demo completed
* Update: FFmpeg wrapper is back
* Update: Updated dotsceneloader and added demo

* Change: Replace Theora module with ogrevideo
* Change: Exposing functions that return standard pointers (int *, float * etc) with ctype return_addressof functionality previously these had been excluded
* Change: Added RakNet Module
* Change: Added plsm2 module (demo not yet working).
* Change: name property now exposed on PhysX desc opjects which required a change in the demo

Please let me know if you have an issues with this update..

Andy
Python-Ogre: High Performance Graphics and Gaming Libraries for Python
andy
 
Posts: 844
Joined: Mon Jul 10, 2006 9:11 am
Location: Often Singapore..

Re: Python-Ogre 1.6.1 Update for Testing

Postby digimikeh » Thu Feb 26, 2009 3:02 pm

Nice that uses python 2.5.4, going to check it... thanks
digimikeh
 
Posts: 21
Joined: Thu Feb 19, 2009 1:22 am

Re: Python-Ogre 1.6.1 Update for Testing

Postby bharling » Thu Feb 26, 2009 7:51 pm

Great news, thanks andy,

will download and do some thorough testing this evening

cheers!
JTS System
bharling
 
Posts: 436
Joined: Fri Jun 30, 2006 1:06 pm
Location: UK

Re: Python-Ogre 1.6.1 Update for Testing

Postby Martins1 » Sun Mar 01, 2009 4:48 pm

Wow! Thanks a lot for RakNet!!!
Martins1
 
Posts: 31
Joined: Sat May 06, 2006 10:13 am

Re: Python-Ogre 1.6.1 Update for Testing

Postby afecelis » Fri Mar 06, 2009 4:08 am

Works great! Thanks for the dotscene example. :)
afecelis
 
Posts: 13
Joined: Mon Feb 23, 2009 10:08 pm

Re: Python-Ogre 1.6.1 Update for Testing

Postby skorpio » Mon Mar 09, 2009 8:31 am

Hello,

It works pretty good. I have not encountered any backward compatibility problems.

I was playing with Demo_QuickGui01.py, and I found a bug with keyReleased(), it needs injectKeyUp
Code: Select all
    def keyReleased( self, arg ):
        k = gui.KeyCode.values[arg.key]
        self.mGUIManager.injectKeyUp( k )
        return True

It would crash when I typed something in the text boxes.

Best regards,

Skorpio
skorpio
 
Posts: 168
Joined: Mon Nov 27, 2006 8:34 am

Re: Python-Ogre 1.6.1 Update for Testing

Postby andy » Mon Mar 09, 2009 9:38 am

Thanks for the QuickGUI fix..

Andy
Python-Ogre: High Performance Graphics and Gaming Libraries for Python
andy
 
Posts: 844
Joined: Mon Jul 10, 2006 9:11 am
Location: Often Singapore..

Re: Python-Ogre 1.6.1 Update - April 2

Postby bharling » Sat Apr 04, 2009 11:09 am

BRILLIANT!!

This is exactly what i needed! have been wrestling with the theora plugin for a recent project trying to get high performance video playback working, and you've kindly updated it, just in the nick of time

do you read my mind or something?!

EDIT:

Ah, doesn't seem to be working though :-(

Code: Select all
C:\PythonOgre\pluginsC:\PythonOgre\plugins;C:\PHP5\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;c:\python25;c:\python25\bin;c:\python25\scripts;C:\Program Files\Subversion\bin;C:\Program Files\AdVantage SDK\Bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\TortoiseSVN\bin;c:\mingw32\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Samsung\Samsung PC Studio 3\;C:\google_appengine\;;C:\PROGRA~1\COMMON~1\MUVEET~1\030625
Traceback (most recent call last):
File "C:\PythonOgre\demos\ogrevideo\demo_video.py", line 25, in <module>
import ogre.addons.ogrevideo as theora
ImportError: No module named ogrevideo


updated everything as normal, then tried a complete re-install as well but still no joy.

EDIT AGAIN:

Got it working, seems that the update doesn't copy the ogrevideo modules into the site-packages folder ( there is no updated setup.py in the latest package ), however performance seems to be severely degraded for some reason ( will test on another machine shortly ). Ogre seems to be running at 200+ fps, but the video playback is about 4-5 fps. highly strange...

Perhaps an issue with my PC? am running on a single core, whereas the stuff I was reading over at the ogrevideo forum indicates it makes use of multithreading to decode the video
JTS System
bharling
 
Posts: 436
Joined: Fri Jun 30, 2006 1:06 pm
Location: UK

Re: Python-Ogre 1.6.1 Update - April 2 w/ Python 2.6 support

Postby bharling » Mon Apr 06, 2009 10:21 am

Sorry to bump, but tested on my work power machine and the performance issues remain with the ogrevideo plugin, has anyone else tried the new version yet?

its better on a dual-core system, but still nowhere near as fast as the previous theora plugin. Also tried doing straight YUV output and transcoding in a pixel shader, which works but is still really slow ( around 8fps at best ).

Would really appreciate any help on this, as the ogrevideo update is critical to the project I'm currently stuck with :)

If I find out anything more will be back!
JTS System
bharling
 
Posts: 436
Joined: Fri Jun 30, 2006 1:06 pm
Location: UK

Re: Python-Ogre 1.6.1 Update - April 2 w/ Python 2.6 support

Postby andy » Mon Apr 06, 2009 11:42 am

Do you have a sample video that you can put up for me to use in testing ?? Drop me a PM with a link etc :)

Andy
Python-Ogre: High Performance Graphics and Gaming Libraries for Python
andy
 
Posts: 844
Joined: Mon Jul 10, 2006 9:11 am
Location: Often Singapore..

Re: Python-Ogre 1.6.1 Update - April 2 w/ Python 2.6 support

Postby bharling » Mon Apr 06, 2009 12:08 pm

Hi andy,

its performing badly even with the konqi test video that comes in the package. Cant seem to coax more than 4fps out of it with any video ( the ones I need to use are 720p and do much worse than konqi ).

I downloaded and compiled the ogrevideo project a couple of hours ago and the samples ( openal, and player ) run fine even with my 720p sources, so I think it must be something to do with the python bindings unfortunately. Do the konqi / fedora clips run ok on your system? Here I'm running P4 dual core 2.13 ghz, with nvidia 8500GT. demo_video.py is running at around 230 fps, but the video playback is not more than about 5-7fps at best :(

I also tried replacing Plugin_TheoraVideoSystem.dll with the one I compiled this morning but it doesn't seem to make much difference.

thanks for any help!
JTS System
bharling
 
Posts: 436
Joined: Fri Jun 30, 2006 1:06 pm
Location: UK

Re: Python-Ogre 1.6.1 Update - April 2 w/ Python 2.6 support

Postby andy » Mon Apr 06, 2009 3:06 pm

Try it without the sound enabled as I see problems with it... Comment out the audioFactory stuff and see if it makes a difference..

Andy
Python-Ogre: High Performance Graphics and Gaming Libraries for Python
andy
 
Posts: 844
Joined: Mon Jul 10, 2006 9:11 am
Location: Often Singapore..

Re: Python-Ogre 1.6.1 Update - April 2 w/ Python 2.6 support

Postby bharling » Mon Apr 06, 2009 3:23 pm

already tried it I'm afraid - its the same :( ( sorry should have mentioned that ).


could it be boost-related?

EDIT:

Heres an app I coded up to create the video manually without a material script in case something was up there, but its still essentially the same performance as the original demo, just in case its any help :)

Code: Select all
import sys
sys.path.insert(0,'..')
import PythonOgreConfig
import ctypes
import os

if sys.platform == 'win32':
    newpath = os.path.abspath(os.path.join ( os.path.abspath(os.path.dirname(__file__)), '../../plugins'))
    print newpath
    os.environ['PATH'] =  newpath +';' + os.environ['PATH']
    print os.environ['PATH']
   
import ogre.renderer.OGRE as ogre
import ogre.addons.ogrevideo as theora
import SampleFramework as sf
import sys

class MyVideoManager( theora.TheoraVideoManager ):
    def __init__(self):
        theora.TheoraVideoManager.__init__(self)
       
   
class VideoListener( sf.FrameListener ):
    def __init__(self, rw, cam, clip):
        sf.FrameListener.__init__(self, rw, cam )
        self.clip = clip
        #print dir(self.clip.getTimer())
        #self.clip.getTimer().play()
       
    def frameStarted( self, evt ):
        #self.clip.blitFrameCheck(evt.timeSinceLastFrame)
        #self.clip.getTimer().update( evt.timeSinceLastFrame )
        #self.clip.decodeNextFrame()
        #print self.clip.isPaused()
        #self.clip.blitFrameCheck( evt.timeSinceLastFrame )
        #self.clip.decodedAudioCheck()
        td = self.clip.getTimePosition() / self.clip.getDuration()
        print td
        if td >= 1.0:
            self.clip.pause()
        return sf.FrameListener.frameStarted( self, evt )
   
   
   
class OgreVideoTest( sf.Application ):
    def __init__(self):
        sf.Application.__init__(self)
       
       
    def _createScene( self ):
        print dir(theora)
        mat = ogre.MaterialManager.getSingleton().create("VideoMaterialTest", "General")
        tunit = mat.getTechnique(0).getPass(0).createTextureUnitState()
        #tunit.setDesiredFormat( ogre.PixelFormat.PF_R8G8B8 )
        #tunit.setNumMipmaps( 2 )
        #tunit.setTextureAnisotropy( 0 )
        tunit.setTextureAddressingMode( ogre.TextureUnitState.TAM_CLAMP )
        mat.getTechnique(0).getPass(0).setFragmentProgram( "TheoraVideoPlugin/yuv2rgb" )
       
        mgr = theora.TheoraVideoManager.getSingleton()
       
        #self.root.addFrameListener( mgr )
       
        mgr.setInputName( "dante.ogv" )
        mgr.createDefinedTexture( "VideoMaterialTest", "General")
        clip = mgr.getVideoClipByName( "dante.ogv" )
        #clip = theora.TheoraVideoClip( "VideoMaterialTest", 64 )
        print dir( clip )
       
       
       
        #clip.createDefinedTexture("dante.ogv", "VideoMaterialTest", "General", 0, 0, 0)
        clip.setOutputMode( theora.TheoraOutputMode.TH_YUV )
        #clip.load("dante.ogv", "General")
        #clip.play()
        #print dir( clip )
       
        ov = ogre.OverlayManager.getSingleton()
        overlay = ov.create("videoOverlay")
        # Create a panel
        panel = ov.createOverlayElement("Panel", "PanelName0")
        panel.setMetricsMode(ogre.GMM_PIXELS)
        panel.setPosition(0, 0)
        panel.setDimensions(self.viewport.actualWidth, self.viewport.actualHeight)
        panel.setMaterialName("VideoMaterialTest")
        overlay.add2D(panel)
        overlay.show()
        self.clip = clip
       
    def _createFrameListener( self ):
        print "fl"
        self.fl = VideoListener( self.renderWindow, self.camera, self.clip )
        self.root.addFrameListener( self.fl )
       
       
if __name__=="__main__":
    try:
        app = OgreVideoTest()
        app.go()
    except ogre.OgreException, e:
        print e
JTS System
bharling
 
Posts: 436
Joined: Fri Jun 30, 2006 1:06 pm
Location: UK

Re: Python-Ogre 1.6.1 Update - April 2 w/ Python 2.6 support

Postby andy » Tue Apr 07, 2009 1:54 am

I've used your demo and it works great on my machine (as does the original demos !!) :(

Perhaps there is an issue with the updates so could you try a complete clean (delete the build directory and your python25/lib/site-packages/ogre) then redo the setup.py and see if that helps...

I'll test on a couple of other machines in case I've messed up a dll in the packaging...

Andy
Python-Ogre: High Performance Graphics and Gaming Libraries for Python
andy
 
Posts: 844
Joined: Mon Jul 10, 2006 9:11 am
Location: Often Singapore..

Re: Python-Ogre 1.6.1 Update - April 2 w/ Python 2.6 support

Postby bharling » Tue Apr 07, 2009 8:17 am

Hi Andy,

sure will do! I have tried it on 2 machines now, a P3 2.8ghz hyperthreaded with 1.5 mb ram ATI Radeon X1650 ( python2.54 ), and the one above with an NVIDIA 8500 GT ( 2.54 again ) and performance is better of course on the dual core, but still much slower than the old theora plugin. Really need to get this working, so I'll ruthlessly erase everything and see what happens! There's also a quad core uber gaming rig available at work so I'll try that today as well if i get a chance.

Thanks for your help once again :)

cheers,
JTS System
bharling
 
Posts: 436
Joined: Fri Jun 30, 2006 1:06 pm
Location: UK

Next

Return to Python-Ogre

Who is online

Users browsing this forum: No registered users and 1 guest