PyOgre vs Ogre Speed

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
User avatar
Clay
OGRE Community Helper
OGRE Community Helper
Posts: 518
Joined: Wed Mar 17, 2004 4:14 am
Contact:

PyOgre vs Ogre Speed

Post by Clay »

This is Ogre:
Image

This is PyOgre:
Image

Neat huh? Pretty close FPS. I am running PyOgre through a JITer and it jumps the framerate up to fairly close to what you can achieve with C++ code (minus the JITer it's about ~20FPS lower).

Of course this will be different when a large amount of game logic is done in python, but since you can rewrite any python code in C++ and call it natively from python, you can spot-optimize code by profiling for time consuming parts and rewrite the code in a faster language.

This is also using a direct line-by-line translation of C++ code into python code, which is not the fastest way of doing things. You can accomplish higher speeds in python if write things in a pythonic way instead of a C++ way. I'm thinking about playing with the sample framework and writing it so that it plays nicer with python.
nfz
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1263
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Post by nfz »

I'm impressed.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

Nice.
User avatar
bana
Greenskin
Posts: 132
Joined: Mon Aug 02, 2004 7:40 am
Location: Austin, Texas
Contact:

Post by bana »

Wow thats awesome, It's amazing to think of some of the possibilities...
A proud member of the OpenFrag Coding Team.
http://coolhands.blogspot.com/
User avatar
temas
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 390
Joined: Sun Oct 06, 2002 11:19 pm
Location: The Woodlands, TX
Contact:

Post by temas »

I need to get this running on the mac and port my old python visual unit testing framework over to this. Can't wait!
tisba
Kobold
Posts: 37
Joined: Sun Jan 26, 2003 1:17 am
Location: France (Paris)

Post by tisba »

Psyco is really an impressive JIter. Though, the terrain demo is hardly a stress test, since all it does in python is driving the collision query and keyboard input.

In the flagdemo, were I animate a mesh in real-time (compute the position of 400 vertexes, their normal and setting them in the vertex buffer one by one in python), I get about 70 FPS with psyco and 30 FPS without pysco. This is a serious performance boost ! (for record, without doing all this expensive tasks, FPS is about 560 FPS).

--tisba
Andre_Mikulec
Gnoblar
Posts: 6
Joined: Wed Mar 23, 2005 2:57 pm

Python Source Code

Post by Andre_Mikulec »

Looks wonderful,

Any chance of posting the full python source code?
Or, sending the full python source code to me?

Andre Mikulec
Andre_Mikulec@Hotmail.com
AIM
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

PyOgre is publically available in the ogreaddons cvs module.
User avatar
Clay
OGRE Community Helper
OGRE Community Helper
Posts: 518
Joined: Wed Mar 17, 2004 4:14 am
Contact:

Post by Clay »

As sinbad said, the pyste source code for the pyogre bindings are in the ogreaddons cvs. The source code for the demos can be obtained either through cvs, or by downloading the prepackaged zip file which contains the demos.
Dalfy
Gnoblar
Posts: 9
Joined: Mon Feb 14, 2005 1:14 pm

Post by Dalfy »

What are the requierement of the PyOgre Bindings currently ?
Does it work under Linux ?
User avatar
fog
Greenskin
Posts: 149
Joined: Sun Sep 19, 2004 6:00 pm
Location: Torino, ITALY
Contact:

Post by fog »

Dalfy wrote:What are the requierement of the PyOgre Bindings currently ?
Does it work under Linux ?
It compiles and run up to displaying the configuration interface, then crashes randomly in the boost library (that I learned to hate.) The build chain is not trivial (you'll need gcc >= 3.4, gccxml and boost.python and ogre recompiled from scratch) but if you manage to build any help in debugging is very welcome.
joi
Gnome
Posts: 327
Joined: Tue Feb 22, 2005 8:11 pm
Location: brazil

Post by joi »

Sweet! :D

I will take a look, phyton sure looks nice.
maya 7.0, vs 2005, ogre 1.2
Post Reply