29-12-2005 22:20:30


I am working on a PyOgre based client for my game project called Thousand Parsec ( ). You can see some of the progress of the client with the screen shots of the (simple) results here -> ... tarmap.png

However I would like to display text below each Star displaying their names.

From the #ogre3d channel I was recommend to do a search for MovableText and use that. However nobody could point me to a link and the only code I found was for a much older version of Ogre (before they used SharedPtrs). I tried converting it to the current Ogre and wrap it with SWIG but it just segfaults.

I also tried rendering it to a data string using another library (pygame), but I couldn't figure out the correct way to load it and display as a material.

I also tried rewriting the whole the whole class in Python but it appears that the RenderOperation needed by the code is not wrapped.

Any ideas on what I could do?

Both seems like such a simple problems (much simpler then loading 3d meshes etc) but it sad Ogre has not easy support.

Thanks for your help.



30-12-2005 01:38:13

You could dynamically create your own overlays (one per star) and position them using some sort of Entity.GetScreenCoord() or something to position it, there should be something like that.

Just a suggestion. :)


30-12-2005 12:12:23

Overlays won't work because they won't be obscure by other things in the world.


30-12-2005 19:50:27

It actually turned out that Overlays work pretty well. It's a lot slower then I would like but still usable.

It turns out that I want the text to stay the same size even when the objects are really tiny.

Thanks for pointing me in that right direction.


20-01-2006 20:09:04

mithro, I'm trying to do something similar with my game. How did you determine the X, Y screen coordinates of the given entity?

Is there something within Ogre that already calculates this, or did you use something similar to the conversion thats in MovableText?


24-01-2006 04:18:47

There's a patch here to implement OgreMovableText from the DSISceneViewer, with a simple demo. Not very pythonic though.