1
$\begingroup$

How to to get info about the different render pipeline stages while image is being rendered, such as time?

For example we are using OpenTelemetry and we want to collect render stages info\status using Python.

  1. loading scene graph
  2. loading textures
  3. render
  4. saving file

Etc.

$\endgroup$
4
  • $\begingroup$ the console output? are you running on windows or unix or linux? $\endgroup$
    – Harry McKenzie
    Commented Jul 27, 2022 at 7:43
  • $\begingroup$ The Tasks runs on linux, we wonder if there is some call back or events we can pull info from, using python. $\endgroup$
    – barakooda
    Commented Jul 27, 2022 at 12:49
  • $\begingroup$ were u able to find a solution? $\endgroup$
    – Harry McKenzie
    Commented Aug 1, 2022 at 16:43
  • $\begingroup$ Nope,one of blender developers offered us to develop this feature. $\endgroup$
    – barakooda
    Commented Aug 2, 2022 at 18:23

1 Answer 1

1
$\begingroup$

You can directly render your animation (example myblend.blend) from the terminal using the following command:

blender --background myblend.blend --render-anim

which will give you output progress in real time as it renders as shown in this example:

enter image description here

You can also store the output directly into a text file by appending the syntax > output.txt (overwrite file) or >> output.txt (append to file) to the command:

blender --background myblend.blend --render-anim >> myoutput.txt

You can also start an interactive Blender session in the terminal with a python console (do import bpy after starting) to do the other functions via python like (1) loading scene graph, (2) loading textures, (3) other types of rendering, and (4) saving a file.

$ blender --background myblend.blend --python-console

Here you can run any python command like import bpy and bpy.ops.render.render() and see the output progress in real time:

[akiko@akiko-system]:~/Desktop $ blender --background temp.blend --python-console
Blender 3.2.1 (hash a2d59b2dac9e built 2022-07-05 23:53:28)
Read prefs: /home/akiko/.config/blender/3.2/config/userpref.blend
Read blend: /home/akiko/Desktop/temp.blend
Python 3.10.2 (main, Apr 26 2022, 10:33:12) [GCC 9.3.1 20200408 (Red Hat 9.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import bpy
>>> bpy.ops.render.render()
Fra:1 Mem:13.17M (Peak 13.19M) | Time:00:00.13 | Mem:0.00M, Peak:0.00M | Scene, ViewLayer | Synchronizing object | Cube
Fra:1 Mem:13.17M (Peak 13.19M) | Time:00:00.13 | Mem:0.00M, Peak:0.00M | Scene, ViewLayer | Synchronizing object | Cube.001
Fra:1 Mem:13.17M (Peak 13.19M) | Time:00:00.13 | Mem:0.00M, Peak:0.00M | Scene, ViewLayer | Synchronizing object | Cube.003
Fra:1 Mem:13.17M (Peak 13.19M) | Time:00:00.13 | Mem:0.00M, Peak:0.00M | Scene, ViewLayer | Synchronizing object | Cube.005

Here is a list of more commands: https://linuxcommandlibrary.com/man/blender

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .