batch rendering

Hi all,

Can the python api be used to do the following

… and this all in “batch” mode, ie without starting the GUI.

Can Blender be used like this? I am looking for a batch 3d renderer where i can add objects. change stuff in a fairly dynamic way. I have looked into dynamically constructing the blender file format but from what i’ve read it’s just a memory dump of the internal datastructures, so this will be fairly difficult. Constructing 3ds file formats would be doable but cumbersome… there must be an easier way i thought :slight_smile:

no

not at the moment, unless you want to create the text meshes yourself, but even so it would not work as well as you may like.

OK, I decided to submit this to the blender artists forum before I send this on to the blender developers and file it as a bug. I am running blender 2.42a on a windows machine and would like to do batch rendering of single picture files from the command line. I am running under cygwin and have the environment pointing to the latest release of the blender. I am unsing the following command line which is a variation of one in the blender help.

blender -b raider03.blend -o //render_# -F PNG -x 1

Compiled with Python version 2.4.
Checking for installed Python… got it!

Blender quit

This is what I get back. I should get a file called render_1.PNG with a single image using the settings size setting in the blend file. Nothing.

So I tried it again with the -d switch which should display debug information. Nothing.

So now I tried to add the -f 1 switch to see what would happen. I get the following:

Compiled with Python version 2.4.
Checking for installed Python… got it!
Fra:1 Mem:3.70M Sce: 1 Ve:17064 Fa:12897 La:1
Fra:1 Mem:13.43M | Part 1-16
Fra:1 Mem:13.43M | Part 2-16
Fra:1 Mem:13.43M | Part 3-16
Fra:1 Mem:13.43M | Part 4-16
Fra:1 Mem:13.43M | Part 5-16
Fra:1 Mem:13.43M | Part 6-16
Fra:1 Mem:13.43M | Part 7-16
Fra:1 Mem:13.43M | Part 8-16
Fra:1 Mem:13.43M | Part 9-16
Fra:1 Mem:13.43M | Part 10-16
Fra:1 Mem:13.43M | Part 11-16
Fra:1 Mem:13.43M | Part 12-16
Fra:1 Mem:13.43M | Part 13-16
Fra:1 Mem:13.43M | Part 14-16
Fra:1 Mem:13.43M | Part 15-16
Fra:1 Mem:13.43M | Part 16-16
Saved: /render\0001 Time: 00:02.07

Blender quit

Now this is progress but the file name and extension are wrong. ,And of course so is the documentation in the blender header. According to the documemtation a file should be created in the directory where the blend file is located with a name of render_1.png. Can anyone shed some light on this topic?

blender -b raider03.blend -o //render_# -F PNG -x 1 -f 1
where -f sets the frame to render should work, or -s 1 -e 10 to set the start and end frames, looking at the docs they do appear to be incorrect or omit the fact that a frame has to be set.
hope that helps,
lobo_nz

This could be done by creating a python script to do the work for you so you could call a .blend from the command line passing an argument to the script to be used as text, like:
mytext=“Hello World” blender -b blank.blend -P text_setup.py
You would of course have to write the text_setup.py to grab the variable from the environment and change/add a text object using Blender.Text3d from the python API, then asign a material to it and render to a filename which you could also pass in as a variable or specify on the command line using the -o option.
It dosnt seem too difficult, as long as you know a bit about python.
good luck,
lobo_nz

Hie everyone !!

First of all, sorry for my “French English”…

Then, I need your help LOL

I need the same python script that above but I DON’T KNOW ABOUT PYTHON.

Well, I already have my scene with one text into it, and I just want to change the text through a little batch (The material don’t have to be change !!).

It’s to generate a image file that will be imported into an another application automatically.

I know it’s a special request but could anyone write me down the code for the batch please ?

I already how to render a picture in the command line mode but I don’t know how to change a text in command line…

Thanks in advance.