> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-de/andere-workloads/blender-rendering.md).

# Blender-Rendering

3D-Szenen und Animationen mit Blender auf CLORE.AI-GPUs rendern.

{% hint style="success" %}
Alle Beispiele können auf GPU-Servern ausgeführt werden, die über [CLORE.AI Marketplace](https://clore.ai/marketplace).
{% endhint %}

## Mieten auf CLORE.AI

1. Besuchen Sie [CLORE.AI Marketplace](https://clore.ai/marketplace)
2. Nach GPU-Typ, VRAM und Preis filtern
3. Wählen **On-Demand** (Festpreis) oder **Spot** (Gebotspreis)
4. Konfigurieren Sie Ihre Bestellung:
   * Docker-Image auswählen
   * Ports festlegen (TCP für SSH, HTTP für Web-UIs)
   * Umgebungsvariablen bei Bedarf hinzufügen
   * Startbefehl eingeben
5. Zahlung auswählen: **CLORE**, **BTC**, oder **USDT/USDC**
6. Bestellung erstellen und auf Bereitstellung warten

### Zugriff auf Ihren Server

* Verbindungsdetails finden Sie in **Meine Bestellungen**
* Webschnittstellen: Verwenden Sie die HTTP-Port-URL
* SSH: `ssh -p <port> root@<proxy-address>`

## Warum GPUs für Blender mieten?

* Komplexe Szenen 10–50x schneller als mit der CPU rendern
* Mehrere GPUs für noch schnelleres Rendern
* Keine teure Hardware anschaffen müssen
* Zahle nur für die Renderzeit

## Anforderungen

| Szenenkomplexität | Empfohlene GPU | VRAM    |
| ----------------- | -------------- | ------- |
| Einfach           | RTX 3070       | 8GB     |
| Mittel            | RTX 3090       | 24GB    |
| Komplex           | RTX 4090       | 24GB    |
| Produktion        | A100           | 40–80GB |

## Schnelle Bereitstellung

**Docker-Image:**

```
linuxserver/blender
```

Oder Headless-Rendering:

```
nytimes/blender:3.6-gpu-ubuntu22.04
```

**Ports:**

```
22/tcp
3000/http
```

## Headless-Rendering-Einrichtung

**Image:**

```
nvidia/cuda:12.1.0-devel-ubuntu22.04
```

**Befehl:**

```bash
apt-get update && \
apt-get install -y wget libxi6 libxxf86vm1 libxfixes3 libxrender1 libgl1 && \
wget https://download.blender.org/release/Blender4.0/blender-4.0.2-linux-x64.tar.xz && \
tar -xf blender-4.0.2-linux-x64.tar.xz && \
mv blender-4.0.2-linux-x64 /opt/blender
```

## Zugriff auf Ihren Dienst

Nach der Bereitstellung finden Sie Ihre `http_pub` URL in **Meine Bestellungen**:

1. Gehen Sie zur **Meine Bestellungen** Seite
2. Klicken Sie auf Ihre Bestellung
3. Finden Sie die `http_pub` URL (z. B., `abc123.clorecloud.net`)

Verwenden Sie `https://IHRE_HTTP_PUB_URL` anstelle von `localhost` in den Beispielen unten.

## Projekt hochladen

### Per SCP

```bash

# .blend-Datei hochladen
scp -P <port> myproject.blend root@<proxy>:/workspace/

# Projektordner hochladen
scp -P <port> -r ./project/ root@<proxy>:/workspace/
```

### Per rsync (große Projekte)

```bash
rsync -avz --progress -e "ssh -p <port>" ./project/ root@<proxy>:/workspace/project/
```

## Render-Befehle

### Einzelnes Frame

```bash
/opt/blender/blender -b /workspace/myproject.blend -o /workspace/output/frame_### -f 1 -- --cycles-device CUDA
```

### Animation (Frame-Bereich)

```bash
/opt/blender/blender -b /workspace/myproject.blend -o /workspace/output/frame_### -s 1 -e 250 -a -- --cycles-device CUDA
```

### Bestimmte Frames

```bash
/opt/blender/blender -b /workspace/myproject.blend -o /workspace/output/frame_### -f 1,50,100,150,200 -- --cycles-device CUDA
```

## Render-Optionen

### Auflösung

```bash

# Auflösung überschreiben
blender -b file.blend -o //output/frame_### -x 1920 -y 1080 -a -- --cycles-device CUDA
```

### Python-Skript verwenden

```bash
blender -b file.blend --python render_setup.py -a
```

**render\_setup.py:**

```python
import bpy

# Render-Engine setzen
bpy.context.scene.render.engine = 'CYCLES'

# Gerät setzen
bpy.context.preferences.addons['cycles'].preferences.compute_device_type = 'CUDA'

# Alle GPUs aktivieren
for device in bpy.context.preferences.addons['cycles'].preferences.devices:
    device.use = True

# Samples setzen
bpy.context.scene.cycles.samples = 128

# Auflösung setzen
bpy.context.scene.render.resolution_x = 1920
bpy.context.scene.render.resolution_y = 1080

# Ausgabe-Einstellungen
bpy.context.scene.render.image_settings.file_format = 'PNG'
```

## Multi-GPU-Rendering

Für Server mit mehreren GPUs:

```python
import bpy

# CUDA aktivieren
prefs = bpy.context.preferences.addons['cycles'].preferences
prefs.compute_device_type = 'CUDA'

# Geräte aktualisieren
prefs.get_devices()

# Alle GPUs aktivieren
for device in prefs.devices:
    if device.type == 'CUDA':
        device.use = True
        print(f"Enabled: {device.name}")
```

## Render-Farm-Stil (mehrere Server)

Mehrere Server mieten und Frames aufteilen:

**Server 1:**

```bash
blender -b project.blend -o //output/frame_### -s 1 -e 100 -a
```

**Server 2:**

```bash
blender -b project.blend -o //output/frame_### -s 101 -e 200 -a
```

**Server 3:**

```bash
blender -b project.blend -o //output/frame_### -s 201 -e 300 -a
```

Anschließend lokal die Renders kombinieren.

## Eevee-Rendering (schneller)

Für Echtzeit-Qualität:

```bash
blender -b file.blend -E BLENDER_EEVEE -o //output/frame_### -a
```

## OptiX-Unterstützung (RTX-GPUs)

Für RTX-Raytracing:

```python
import bpy
prefs = bpy.context.preferences.addons['cycles'].preferences
prefs.compute_device_type = 'OPTIX'  # Statt CUDA
```

## Automatisiertes Render-Skript

**render.sh:**

```bash
#!/bin/bash
BLEND_FILE=$1
START_FRAME=$2
END_FRAME=$3
OUTPUT_DIR=/workspace/output

mkdir -p $OUTPUT_DIR

/opt/blender/blender -b $BLEND_FILE \
    -o ${OUTPUT_DIR}/frame_### \
    -s $START_FRAME \
    -e $END_FRAME \
    -a \
    -- --cycles-device CUDA

echo "Rendering complete!"
ls -la $OUTPUT_DIR
```

Verwendung:

```bash
chmod +x render.sh
./render.sh /workspace/myproject.blend 1 250
```

## Render-Fortschritt überwachen

### Ausgabeordner beobachten

```bash
watch -n 5 'ls -la /workspace/output/ | tail -20'
```

### Blender-Ausgabe

Blender gibt Frame-Fortschritt auf stdout aus:

```
Fra:1 Mem:1234.56M (Peak 1500.00M) | Time:00:01.23 | Remaining:04:32.10 | Mem:567.89M, Peak:890.12M | Scene, View Layer | Sample 64/128
```

## Gerenderte Frames herunterladen

```bash

# Alle Frames herunterladen
scp -P <port> -r root@<proxy>:/workspace/output/ ./renders/

# Bestimmte Frames herunterladen
scp -P <port> root@<proxy>:/workspace/output/frame_001.png ./

# Mit rsync synchronisieren
rsync -avz --progress -e "ssh -p <port>" root@<proxy>:/workspace/output/ ./renders/
```

## Video-Encoding

Nach dem Rendern der Frames zum Video encoden:

```bash

# ffmpeg installieren
apt-get install -y ffmpeg

# In MP4 encoden
ffmpeg -framerate 24 -i /workspace/output/frame_%03d.png -c:v libx264 -pix_fmt yuv420p output.mp4

# In ProRes encoden (hohe Qualität)
ffmpeg -framerate 24 -i /workspace/output/frame_%03d.png -c:v prores_ks -profile:v 3 output.mov
```

## Performance-Tipps

### Für Geschwindigkeit optimieren

```python

# Samples für Vorschau reduzieren
bpy.context.scene.cycles.samples = 64

# Adaptive Sampling verwenden
bpy.context.scene.cycles.use_adaptive_sampling = True
bpy.context.scene.cycles.adaptive_threshold = 0.01

# Bounces begrenzen
bpy.context.scene.cycles.max_bounces = 8
```

### Speicheroptimierung

```python

# Kachel-Rendering für hohe Auflösungen verwenden
bpy.context.scene.render.use_persistent_data = True

# Kachelgröße setzen
bpy.context.scene.cycles.tile_size = 256  # Für GPU
```

## Geschätzte Renderzeiten

| Szene      | GPU      | Auflösung | Samples | Zeit/Frame |
| ---------- | -------- | --------- | ------- | ---------- |
| Einfach    | RTX 3090 | 1080p     | 128     | \~30s      |
| Mittel     | RTX 3090 | 1080p     | 256     | \~2min     |
| Komplex    | RTX 4090 | 4K        | 512     | \~10min    |
| Produktion | A100     | 4K        | 1024    | \~20min    |

## Kostenberechnung

**Beispiel: 250-Frame-Animation**

```
GPU: RTX 4090
Zeit pro Frame: 2 Minuten
Gesamte Renderzeit: 500 Minuten = 8,3 Stunden
Stundenpreis: $0.04
Gesamtkosten: ~ $0.33
```

## Fehlerbehebung

### "CUDA-Gerät nicht gefunden"

```python

# Verfügbare Geräte prüfen
import bpy
prefs = bpy.context.preferences.addons['cycles'].preferences
prefs.compute_device_type = 'CUDA'
prefs.get_devices()
for d in prefs.devices:
    print(d.name, d.type)
```

{% hint style="danger" %}
**Kein Speicher mehr**
{% endhint %}

* Texturauflösung reduzieren
* Kleinere Kachelgröße verwenden
* "Persistent Data" aktivieren
* Einfachere Shader verwenden

### Langsames Rendern

* Prüfen, ob GPU verwendet wird (nvidia-smi)
* Szenengeometrie optimieren
* Rauschunterdrückung mit weniger Samples verwenden

## Nächste Schritte

* Jupyter für Nachbearbeitung ausführen
* [KI-Videogenerierung](/guides/guides_v2-de/video-generierung/ai-video-generation.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-de/andere-workloads/blender-rendering.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
