views:

356

answers:

2

Hi, I am not sure if my question title makes sense to you or not. I am seeing many cool applications which have cool animations/effects. I would like to learn how to use python to create this kind of GUI applications under Linux.

"cool animation/effects" like 3D wall in Cooliris which is written in flash and compiz effects with opengl.

I also heard of some python GUI library like wxPython and pyQT. Since I am completely new to python GUI programming, can anyone suggest me where to start and what I should learn to achieve and create such application? maybe learn pyQT with openGL feature? pyopengl binding? I have no clue on where to start. thank you very much for your time and suggestion.

By the way, in case if someone need to know which kind of application I am going to create, well, just any kind of applications. maybe photo explorer with 3D wall, maybe IM client, maybe facebook client etc...

A: 

May be, just create a GUI and all effects will make compiz?

Anyway, as I know QT have ability to use openGL.

http://doc.qt.nokia.com/4.1/examples.html#opengl-examples

demas
+2  A: 

http://techbase.kde.org/Development/Languages/Python

Many KDE styles use SVG and plenty of animation. The user can always change themes. I think you should be more specific about what kind of animations you want to do. I don't think 3D wall type affects really fall into the widget category that QT is. It sounds to me like you want to make a 3D interface for an application. If that is the case, you may want to look more into 3D engine type libraries used mainly in games. I know that some have excellent GUI widgets for programming game menus and the like. I guess you'd decide on your engine and the see if there are python language bindings. One of my favorite engines: http://irrlicht.sourceforge.net/links.html

Another thing you would want to consider is how you want to handle the window management. Do you want to make a full screen interface? Or is to to be windowed? Also how would such an application integrate into a 3D window manager or rather a window manager with compositing.

Edit:

In that case the qtopengl module is probably something to look into: http://doc.qt.nokia.com/4.6/qtopengl.html

I do recommend QT. It's clean and easy to use and cross platform. So your app could run on windows as well.

One thing you'd want to think about before hand is the type of FX you want to perform. For example, if you want to create a page curl type effect when renaming the image, you'd have to think about how to program that, or look for libraries/code snipets that do that math. 3D engines that are used in games often have a lot of support for those kind of typical FX or animations that you'd see in a game. If you use something like qtopengl, you'd need to think about this as well. qtopengl can pretty much only render. Think of it as a viewport. However, it is the correct approach to making a 3D application for the desktop.

Programming 3D applications is really interesting and fun. I enjoyed it a lot. However, don't get discouraged be the math. I recommend getting a book about it if you are serious. I liked this one: http://www.amazon.com/Primer-Graphics-Development-Wordware-Library/dp/1556229119

However, IIRC the examples are C++ which you may not be comfortable with. When you understand such mathematical concepts, it easier to think about how you would make a page curl type affect. Of course, if you find libraries or code that shows you how to do the math, that may be fine.

sims
Dear sims, thanks a lot for your reply. To simplify or clarify what I want to create, I would like to create a clone of Cooliris and implement it in python as standalone linux desktop application. The application should support both window interface and fullscreen interface. Do you mean I have to use a game engine libraries for such purpose? By the way, I am really new to this area. Is blender a 3D engine? I know a little bit of blender. what is the difference between blender and irrlicht that you mentioned? are they both 3D engine? thanks a lot.
Blender is an application that you can use to model, animate, render, and even generate executable code that could be a game or a walk through of a house you are selling.Irrlicht is a pure 3D engine. It's code. It is not an application. You need to write your application to use Irrlicht and link it to the Irrlicht libraries. This is the more traditional approach. Where Blender allows you to "program" without writing code. However, the Blender game engine is not exactly known for speed. Blender is probably overkill for you. More in edited answer.
sims
Thanks a lot for the further explanation. I checked Blender and Irrlicht. Irrlicht python binding is out-of-date and not in active development. I don't think I can use python in Irrlicht. If I choose Irrlicht, I have to use C++. From http://en.wikibooks.org/wiki/Python_Programming/Game_Programming_in_Python, it says Blender is designed for python from scratch. If I use python + Blender, is that possible to create a clone of Cooliris application? Thanks.
You may be able to. However, if you want to create regular dialog boxes and 2d interface, that might not be the route to take. If you use Blender, you probably will not even have to write any code. Though it does use python quite a lot. Hope that helps. See the answer for further recommendations. It really depends how far you want to go in the 3D field. If your serious about it, I would recommend not using Blender as it has many features that would not need.
sims
Thanks again for the reply. I am serious about learning 3D programming under Linux. It's very cool. Just afraid I don't have enough time on it. I will consider to learn qtopengal and blender if I have time. I checked Irrlicht. It's very cool. But I am not comfortable with my C++ skills. Will try it when I have time to upgrade my C++ knowledge learned from University. ^_^ Cheers.