1
$\begingroup$

Why does Blender headless not use blend settings? It works fine with X11 forwarding but just slow.

When using VM.Standard.E2.1.Micro (Oracle Cloud AMD64/x86_64 processor) on Ubuntu 22.04 image, I get some warnings and the image is rendered:

> sudo apt-get install -y blender

> blender --version
Color management: using fallback mode for management
Color management: Error could not find role data role.
Blender 3.0.1

> blender --background --render-frame 1 --render-output '/tmp/out_####' -F PNG --engine CYCLES -noaudio test.blend
EGL Error (0x3001): EGL_NOT_INITIALIZED: EGL is not initialized, or could not be initialized, for the specified EGL display connection.
libEGL warning: pci id for fd 3: 1234:1111, driver (null)


Managed to successfully fallback to surfaceless EGL rendering!

EGL Error (0x3009): EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
EGL Error (0x3001): EGL_NOT_INITIALIZED: EGL is not initialized, or could not be initialized, for the specified EGL display connection.

Managed to successfully fallback to surfaceless EGL rendering!

Fra:1 Mem:42.93M (Peak 44.01M) | Time:00:03.10 | Syncing Cube
Fra:1 Mem:42.96M (Peak 44.01M) | Time:00:03.14 | Syncing Light
Fra:1 Mem:42.96M (Peak 44.01M) | Time:00:03.14 | Syncing Camera
Fra:1 Mem:42.96M (Peak 44.01M) | Time:00:03.30 | Rendering 1 / 64 samples
...

The blend file has been set to use Cycles engine at 16 samples, but headless rendering is using 64 samples and using Eevee engine.

The same happens with downloading Blender 3.5.1 on website.

The same does not happen when using my normal computer with a monitor.

EGL uses OpenGL, so I have tried sudo apt-get install -y freeglut3 mesa-utils and retried. The same warning shows up.

> apt-cache policy mesa-utils
mesa-utils:
  Installed: 8.4.0-1ubuntu1
  Candidate: 8.4.0-1ubuntu1
  Version table:
 *** 8.4.0-1ubuntu1 500
> apt-cache policy freeglut3
freeglut3:
  Installed: 2.8.1-6
  Candidate: 2.8.1-6
  Version table:
 *** 2.8.1-6 500
$\endgroup$
2
  • $\begingroup$ "Why does Blender headless not use blend settings?" What do you mean by "blend settings" specifically? Can you maybe share the .blend file with blend-exchange.com ? $\endgroup$ Commented Jun 1, 2023 at 7:10
  • $\begingroup$ Also did you notice it's an old version? 3.0.1?.. Current one is 3.5.1 Maybe try snap install blender $\endgroup$ Commented Jun 1, 2023 at 8:14

1 Answer 1

2
$\begingroup$

It seems the command you are trying to use for rendering is not correct.

blender --background --render-frame 1 --render-output '/tmp/out_####' -F PNG --engine CYCLES -noaudio test.blend

See Argument Order section in the manual for CLI rendering.

blender --background --render-output /tmp test.blend --render-frame 1

…will not render to /tmp because loading the blend-file overwrites the render output that was set.

blender --background test.blend --render-output /tmp --render-frame 1 …works as expected.

All the stuff you specify in the command is overwritten by the settings in the file. Try:

blender -b test.blend -f 1 -o '/tmp/out_####' -F PNG -E CYCLES -noaudio

$\endgroup$

You must log in to answer this question.

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