Hi,
please have anyone idea how to start rendering and after it saving the rendered image from python script, is it possible? I need render a lot of images and save them with certain names.
thank you!!!
Jiri
Hi,
please have anyone idea how to start rendering and after it saving the rendered image from python script, is it possible? I need render a lot of images and save them with certain names.
thank you!!!
Jiri
Not yet possible. I don’t know when.
With regards,
Michel
thanks Michel.
Maybe it can be solved by starting rendering from command line by some batch file where the imput parameter will change for each rendering.
This is possible??? It should, or not?
Jiri
batch rendering from command line works great, but there are very few parameters you can use
blender -h from command line tells you which.
Stefano
I need to do the same thing for game sprites.
The solution I found is to render an animation (instead of stills) into separate pictures (instead of a movie file format, choose an image format). Each frame of my animation (ie. each redered image) contained a different view of the same object (from left, right, top, etc as well as different light settings and so on). The thing is that at each frame I moved what I needed to my frame and composed a new scene.
With some additional python scripting you can do almost anything you want. The only limiation is that you cannot change the display settings, you have to make by hand different renderings for that.
I hope that helps you to hack your way around the limitations.
Gabriel
I have had a similar problem before. In my case, I had to save several renders from one camera and then switch to another directory and save the render from a second camera.
In this specific case, I rendered the whole animation as tga files (each a frame) in one directory (switching cameras at certain frames from python) and after finishing, renamed the images using the os and os.path modules from python distro to save a number of frames in a folder and other in a different one.
This of course, may or may not work in your case, depending on what you want to do.
Of course, you will have to load everything in sequence editor if you want an avi…
Hope that helps.
well, thank you for your ideas it seems to be a promising way how to solve it but:
When I will render images from batch file how can I change light and camera position? As a some variable used as a switch somehow??
Jiri
Don’t really get what your problem is. If you’re rendering an animation, and want the frames to be named differently for some reason, you only need to write a script to do the renaming of the single frames. No need of batch rendering.
Just shoot ANIM and after that, run your renaming script.
Maybe I’m missing something here.
hmm, actually I needed to run for each rendering some script which computes from light and camera possition corresponding angles. Based on this angles a textures(loaded as images) are UVmapped on object mesh. I’m not sure if animation can help here. But maybe yes, I’m not Blender Guru. The problem is in necessity to run the script which decides which texture to load on certain face.
Sorry for a late explanation and thanks for patience
Jiri
I have my script ready and it works (glued to frame change) when I press ANIM button.
But now I’d like to do it from command line.
Using blender
blender -b tux_gun_motion.blend
seems to get me a single frame and also start the script (as it does some console output) but when I try to start the animation to get all the frames via
blender -a tux_gun_motion.blend
it just returns to the command line immediately (instead of after 577 frames) and doesn’t even give an error message, which makes me feel sort of neglected
I’m using 2.27 since in 2.28 my scripts don’t work.
Any ideas?
try this:
blender -b tux_gun_motion.blend -a
Martin
Works like a dream!
Thanks!
hmm, actually I needed to run for each rendering some script which computes from light and camera possition corresponding angles. Based on this angles a textures(loaded as images) are UVmapped on object mesh.
Well, in that case what I’d do is to link the script to the scene’s framechanged event. Try your script in one frame, if it works OK then link it to framechanged to run it in every frame. (Use 2.28a or 2.27 for scene’s script linking to work.)
Then you can run the “file renaming” script when finished. (You can also link it to framechanged, in a way that if it detects the last frame has come, then do some stuff, otherwise don’t.)
If the images you want to UVmap are the renders you’re getting… I think it will work too.
Hope that helps.
Cheers.