diff --git a/docker/blender-worker/Dockerfile b/docker/blender-worker/Dockerfile index 93e9e7a..28c6a62 100644 --- a/docker/blender-worker/Dockerfile +++ b/docker/blender-worker/Dockerfile @@ -4,6 +4,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ blender \ python3 \ ca-certificates \ + libegl1 \ + libgl1-mesa-dri \ + libglx-mesa0 \ && rm -rf /var/lib/apt/lists/* ENV QT_QPA_PLATFORM=offscreen diff --git a/server/index.ts b/server/index.ts index 9daf09d..05cf73b 100644 --- a/server/index.ts +++ b/server/index.ts @@ -1589,7 +1589,8 @@ The script should: - Clear the default scene (delete all default objects) - Create the described objects with materials and colors - Set up basic lighting (sun + area light) and camera positioned to frame the scene -- Render to /tmp/render.png at 1024x1024 +- Use Cycles render engine with CPU device: bpy.context.scene.render.engine = "CYCLES" and bpy.context.scene.cycles.device = "CPU" and bpy.context.scene.cycles.samples = 64 +- Render to /tmp/render.png at 1024x1024 with bpy.context.scene.render.image_settings.file_format = "PNG" Output ONLY the Python code, no explanations or comments outside the code.`);