[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Best 3d library.



Adam wrote:
What's everybody's favourite 3d library?

For doing what? (Realtime rendering? "Offline" rendering? Data manipulation? Data visualization? Simulation? Animation? Format conversion? ...)


PyOpenGL was dead easy to install but I can't find any decent tutorials but other packages I've tried like Panda, Ogre and soya seem to be nigh on impossible to build and install. Anybody got any suggestions?

OpenGL tutorials can be found here: http://nehe.gamedev.net/
They are written in C but as the Python version is more or less a 1:1 mapping of the C version, translating the tutorials to Python should be straightforward (and as someone else already mentioned, PyOpenGL already includes some of the Nehe examples ported to Python, so you can use those as a starting point).


Using OpenGL directly is fairly low level, you have to care about every aspect of rendering yourself, but on the other hand, you have full control on what's going on.

The other packages you mention are on a higher level than OpenGL (they most likely use OpenGL internally (or maybe Direct3D if you're on Windows) and provide additional functionality like loading models, textures or doing animation.
It depends on what you want to do to determine which one would be the best one for you. I'd suggest to look at the documentation/tutorials of each one to find out which one suits your needs best.


I'd also like to throw in another package: http://cgkit.sourceforge.net/
If you're only looking for realtime rendering (i.e. a "3D engine") then I actually do not really recommend cgkit as of yet (it cost me quite a bit of effort to write this as I'm the author of that package ;) but if you're looking for other stuff as well (like using vector, matrix, quaternion types, loading & manipulating 3D models, accessing special VR hardware, baking texture maps, etc.) then you might want to have a look at it. Some tutorials and the manual can be found here:


http://cgkit.sourceforge.net/tutorials/
http://cgkit.sourceforge.net/doc2/

- Matthias -