Python Real-Time 3D Visualizations using Blender

Hello everyone!!!

Just need some help/advice, about choosing a right software.

In a concise way:

I just wanted to ask if Blender software, is suitable for building such kind of interactive visualization

model: https://www.youtube.com/watch?v=L-ad0Phy0eI ?

Including all those interactive item’s menus and data fields.I mean, if this is possible to create some GUI (using PythonQT for example) and then embed this visualization within? So in case I run some command line software which will actually generate all the components and then just display them interactively.

Or it must be done in other ways, for example: Python_OpenGL software?

BTW what are purpose/concept differences between Python_OpenGL and Blender (in general) ?
I mean, what are those cases when I would prefer one of them upon another?

In some more wordy way:

I’m EE student mastering my B.Sc. degree, and as a part of it, I work on some project which relates to Software Define Networks. For this purpose I started to learn Python as a preferred language. Among the other things (algorithms and math models) I need to build some GUI application which should be pretty similar to this one: http://www.brianlinkletter.com/wp-content/uploads/2014/01/GNS3-setup-VirtualBox-9.png

When an “interactive” part, would be placed at the middle, so I’ll be able to observe it, scale it, zoom it, move it, and change it. (other “it” may be also included later )))) )

As for the GUI build, I intend to work with PythonQt.

But I have no idea how to implement those interactive things. Even at 2D level
(like this one: https://www.youtube.com/watchv=XAzXKnAwKxo&feature=youtu.be&t=4m20s)

I delved a NET for about a week now, found innumerable quantity of Python visualization software packages, But, as it seems to me, most of them work fine just for math plots and similar things, not for some real-time interactive visualizations… I also posted some msgs on forums but haven’t got some adequate answers. Your help will be greatly appreciated.

I just need some direction, in order to choose the right appropriate software for my tasks.

Thanks a lot in advance,

Ivan.

Hi Ivan,
it seems to me that the graphics side of your question will be rather tame and not require heavy processing, so a python wrapper for openGL would be reasonably capable. Blender does have a wrapped openGL implementation which you can do quite a lot with, called “BGL”. The bonus is that it is quite feature complete, the drawback is that the current wrapper wraps a slightly old OpenGL. The upside of the ‘maturity’ of this version is that you will find tonnes and tonnes of information in forums regarding openGL and interactivity.

Is Blender the right environment? Hard to say, but lets focus on the positive first.

  • It is platform independant
  • you can prototype the code fast using your preferred language (python)
  • Blender has modules for determining screenspace vs worldspace, to help with figuring out if the mouse is over a polygon.)

The downside is that you will need to implement all the interactivity yourself, and there are not many examples of BGL interactivity. Actually only one example springs to mind BlenderCookie’s “Retopo” Tools ( http://www.blenderartists.org/forum/showthread.php?352006-addons-Contours-and-Polystrips-Retopology-Tools-(soon-to-be-RetopoFlow) ) . This tool draws BGL and provides interaction, almost all other BGL examples will be one way only, just drawing.

Is Blender the best environment?
I’ll say no, not for something like what you suggest. It’s relatively easy to write a WebGL / Three.js implementation in javascript and that will run straight in a browser. http://threejs.org/examples/#webgl_interactive_particles

edit: But if you intend to use PythonQT i can’t say much about that…

Thanks a lot for your answer.

As it turns out I already emailed to BlenderCookie, just his videos on youtube.
Will see what is his opinion also.

Again, thanks a lot.

Don’t forget piemenus (the old one) for interactive bgl add on