# Running BlenderProc-Style Synthetic Data Pipelines on Cloud GPUs Without Maintaining EGL/CUDA Clusters

> Scale domain-randomized headless Blender 4.5 synthetic datasets (RGB, linear Z-depth, world normals, segmentation, and exact `BVHTree` collision checks) via API at `$0.00040/GPU-s` ($1.44/hr).

## Why Teams Struggle Scaling BlenderProc on Cloud GPUs
- **Headless NVIDIA EGL & OptiX breakage:** Dockerizing BlenderProc across EC2, GCP, or RunPod means debugging Vulkan/EGL device nodes, OptiX kernel cold-compile times, and broken GPU passthrough after driver upgrades.
- **Asset egress & cold starts:** Pulling gigabytes of Poly Haven HDRIs, PBR textures, and CAD meshes onto ephemeral spot GPUs burns engineering time and S3 egress fees.
- **Silent crash losses:** One corrupted mesh or `bmesh` op can `SIGSEGV` Blender mid-batch, losing the worker state.

## Local BlenderProc vs. DIY Cloud Cluster vs. Sunfield API

| Dimension | Local BlenderProc | DIY AWS / Modal / RunPod | Sunfield Cloud API |
| :--- | :--- | :--- | :--- |
| **GPU Setup** | Local workstation GPU | Maintain custom Docker/EGL/CUDA | Managed warm headless Blender 4.5 + OptiX |
| **Parallel Domain Randomization** | Sequential or single-host | DIY job queue + cold starts | Parallel `fork()` scene branching + multi-GPU burst |
| **Ground-Truth AOVs** | RGB, Depth, Normals, Seg | Build & serialize yourself | Native RGB, linear Z-depth, world normals, segmentation, wireframe |
| **Collision / Grasp Filtering** | Custom physics script | Custom script | Built-in `459 ms` `inspect()` with exact `BVHTree` `penetration_depth` |
| **Crash Recovery** | Process dies | Container dies | Automatic rollback to last clean state |
| **Metered GPU Rate** | Hardware capex | Idle VM burn + eng ops | `$0.00025/s` interactive · `$0.00040/s` ($1.44/hr) Cycles · `~$0.0010/frame` |
| **10,000-Frame Dataset** | Hours on 1 GPU | Cluster provisioning | `~$10.00` metered (`Production $999/mo` includes 600 GPU-hrs) |

## Python SDK Domain Randomization Loop
```python
from sunfield import Sunfield

with Sunfield(api_key="sunfield_sk_...") as sf:
    with sf.sessions.create(preset="empty") as base:
        base.upload_file("./gripper_table.glb", filename="models/table.glb")
        base.stage_assets(["hdri.photo_studio_loft_hall", "material.oak_veneer_01"])
        base.exec("load_glb('models/table.glb'); load_hdri('assets/hdri.photo_studio_loft_hall/photo_studio_loft_hall_2k.hdr')")

        branches = base.fork(count=2)
        for i, branch in enumerate(branches):
            branch.exec(
                f"import math, random; rng = random.Random({i}); "
                f"o = bpy.data.objects.get('TargetProp'); "
                f"o and setattr(o, 'rotation_euler', (0, 0, rng.uniform(0, math.tau)))"
            )
            check = branch.inspect(views=["camera"], passes=["rgb", "depth", "normals", "segmentation"])
            if not check.telemetry["collisions"]:
                job = branch.render(engine="cycles", samples=64, resolution=(1024, 1024), aov_passes=["rgb", "depth", "normals"], max_cost_usd=0.05)
                job.save_all(sf, f"./dataset/sample_{i:04d}")
            branch.close()
```

## Quickstart & $1.00 Free GPU Credits
- **Free Trial:** `$1.00` free GPU credits (~2,500 Cycles OptiX GPU-seconds at `$0.00040/GPU-s`, `$0/month`, no credit card required) at https://sunfield.dev/start (or programmatic `POST https://sunfield.dev/v1/signup` with `{"email": "you@company.com"}`).
- **Hosted Remote MCP (1-command OAuth 2.1, zero local Blender install):** `claude mcp add --transport http sunfield https://sunfield.dev/mcp`
- **Pricing & Capacity Plans:** https://sunfield.dev/pricing (PAYG `$10–$500` packs · Studio `$299/mo` · Production `$999/mo`)
- **Full Agent Manual:** https://sunfield.dev/skill.md · **OpenAPI:** https://sunfield.dev/openapi.json
