3D rendering using Blender and Python

I have a project in which I would like to create a 3D animation based on some data. Given the specific points, I would like to create an animation, including spheres, lines, some shades, and a moving camera. I thought that I would use Python and Blender from the command line for this, but it seems that Python acts more as a Blender extension than an independent scene creator and renderer. I found this a useful resource: http://wiki.blender.org/index.php/Doc:Manual/Render/Command_Line_Options , but for him, it seems, need a "file.blend", which has been generated by the user in a graphical interface Blender? Is this possible, or is there another language / 3D rendering that best suits my needs? I am very flexible and really want to deal with a steep learning curve.

Thanks in advance!

+4
source share
3 answers

Yes, Blender would probably be good for that. New (at the time of writing) version of Blender 2.5x. Although they are currently in beta testing, they are fairly stable. The Blender 2.5x Python API documentation can be found here: Blender 2.5x Python API docs . They also have mailing lists and an IRC channel, which are good places to ask questions, etc.

+2
source

Most of Blender's functionality is available through Python. A .blend file is a Blender document that includes all the data for the 3D scene / model you are working on, and may also include Python scripts. You can also call Blender from the command line and tell it to run a separate Python script. Thus, there are many possibilities and flexibility in order to do what you want.

0
source

Since you asked this question, blender 2.6 has come out and is stable. Yes, you can do this, and no, you do not need a file created in the graphical interface.

You may need an empty file that the script can fill with resources, but this is not essential.

There is even a template available from a text editor called "Background job" that creates a scene with some text and displays it using python, all from the command line, it also takes command line arguments, so you can pass variables to a python script, which very comfortable.

0
source

Source: https://habr.com/ru/post/1342225/


All Articles