Skip to content

OffscreenRenderer.render_to_image() returns all-black colour (but valid depth) on NVIDIA Vulkan for dense meshes (0.20.0 regression) #7633

Open

Description

@TimSteinke

Checklist

Describe the issue

With the official 0.20.0 wheel on NVIDIA GPUs (reproduced on an RTX 4070 Laptop and an RTX A6000, two driver branches), OffscreenRenderer.render_to_image() returns an image that is entirely zero, including the clear/background colour, once the frame rasterises enough visible triangles. render_to_depth_image() for the same camera returns correct depth. No error or warning is logged, even at Debug verbosity. It started with 0.20.0, the first release whose Filament renderer uses Vulkan; 0.17-0.19 (OpenGL through EGL) render the same scenes correctly.

Steps to reproduce the bug

The script below needs no data: a flat 300 m Ă— 300 m grid 1.5 m below a horizontal camera. The optional argument sets the cell size in metres: 0.25 gives 2.88 M triangles, 0.1 gives 18 M.

import sys

import numpy as np
import open3d as o3d
import open3d.visualization.rendering as rendering

o3d.utility.set_verbosity_level(o3d.utility.VerbosityLevel.Debug)

# Flat 300 m x 300 m grid of `cell` m cells, 1.5 m below a camera looking along +x.
cell = float(sys.argv[1]) if len(sys.argv) > 1 else 0.25
xs = np.arange(-150.0, 150.0 + 1e-9, cell)
gx, gy = np.meshgrid(xs, xs)
idx = np.arange(gx.size).reshape(gx.shape)
a, b, c, d = idx[:-1, :-1].ravel(), idx[:-1, 1:].ravel(), idx[1:, :-1].ravel(), idx[1:, 1:].ravel()
mesh = o3d.geometry.TriangleMesh(
    o3d.utility.Vector3dVector(np.stack([gx, gy, np.full_like(gx, -1.5)], -1).reshape(-1, 3)),
    o3d.utility.Vector3iVector(np.concatenate([np.stack([a, b, d], 1), np.stack([a, d, c], 1)])),
)

extrinsic = np.eye(4)  # world -> camera (OpenCV axes): camera at origin looking along world +x
extrinsic[:3, :3] = [[0, -1, 0], [0, 0, -1], [1, 0, 0]]
width, height = 512, 332
intrinsic = o3d.camera.PinholeCameraIntrinsic(width, height, 624.13, 632.85, 267.02, 164.40)

renderer = rendering.OffscreenRenderer(width, height)
material = rendering.MaterialRecord()
material.shader = 'defaultUnlit'
renderer.scene.add_geometry('mesh', mesh, material)
print(f'open3d {o3d.__version__}, {len(mesh.triangles)} triangles')
for ssao in [True, False]:
    renderer.scene.view.set_ambient_occlusion(ssao)
    flags = ''
    for _ in range(10):
        renderer.setup_camera(intrinsic, extrinsic)
        color = np.asarray(renderer.render_to_image())
        depth = np.asarray(renderer.render_to_depth_image(z_in_view_space=True))
        flags += 'B' if color.max() == 0 else '.'
    finite = depth[np.isfinite(depth)]
    print(f'SSAO {"on " if ssao else "off"}: {flags}  ({flags.count("B")}/10 all-black colour)  '
          f'last depth: {finite.size} finite px, {finite.min():.1f}..{finite.max():.1f} m')

Error message

No exception and no warning. Full output of the script above with open3d.utility.set_verbosity_level(Debug), run unbuffered (python -u) on the RTX 4070 Laptop with 0.20.0:

[Open3D DEBUG] GaussianSplat VulkanContext: device 'NVIDIA GeForce RTX 4070 Laptop GPU'
[Open3D DEBUG] GaussianSplat VulkanContext: ready 'NVIDIA GeForce RTX 4070 Laptop GPU' (fam=0 gs_q=0 fil_q=1)
Using 'soft' CircularBuffer (12288 KiB)
FEngine (64 bits) created at 0x9cc3e60 (threading is enabled)
FEngine resolved backend: Vulkan
Vulkan device driver: NVIDIA 580.178.04
Selected physical device 'NVIDIA GeForce RTX 4070 Laptop GPU' from 3 physical devices. (vendor 0x10de, device 0x2860, driver 0x912c8100, api 1.4)
Backend feature level: 3
FEngine feature level: 1
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/defaultLit.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/defaultLitTransparency.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/defaultLitSSR.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/defaultUnlit.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/defaultUnlitTransparency.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/depth.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/unlitGradient.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/normals.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/unlitSolidColor.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/unlitBackground.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/infiniteGroundPlane.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/unlitLine.filamat
[Open3D DEBUG] LoadMaterialFromFile(): <site-packages>/open3d/resources/unlitPolygonOffset.filamat
[Open3D DEBUG] Trying to destroy default resource [Texture, 1, hash: 42949672961]. Nothing will happen.
open3d 0.20.0, 2880000 triangles
SSAO on : BBBBBBBBBB  (10/10 all-black colour)  last depth: 82432 finite px, 5.7..133.7 m
SSAO off: BBBBBBBB.B  (9/10 all-black colour)  last depth: 82432 finite px, 5.7..133.7 m

Expected behavior

render_to_image() returns the rendered grid over the white background, as 0.19.0 does on the same machine and as 0.20.0 does on lavapipe.

Open3D, Python and System information

- Operating system: Ubuntu 24.04.5 LTS, kernel 7.0.0, Wayland session
- Python version: 3.12.11
- Open3D version: 0.20.0 (PyPI); also reproduced with the main-devel wheel 0.20.0+2ce4f7e
- System architecture: x86_64
- Is this a remote workstation?: no
- How did you install Open3D?: pip (PyPI wheel)
- Compiler version (if built from source): n/a
- GPU: NVIDIA GeForce RTX 4070 Laptop GPU (8 GB), driver 580.178.04, Vulkan 1.4
- Also reproduced: NVIDIA RTX A6000 (48 GB), driver 595.71.05, Ubuntu 22.04.5, kernel 5.15, headless, Vulkan loader 1.3.204

Additional information

Results across versions and GPUs. Black renders out of 10, SSAO on / off:

Setup 2.88 M (0.25 m) 8 M (0.15 m) 18 M (0.1 m)
0.20.0, RTX 4070 Laptop, driver 580.178.04, Ubuntu 24.04 10, 9-10 (3 runs) - -
0.20.0+2ce4f7e (main-devel wheel, 2026-11-14), same laptop 10, 8-9 (2 runs) - -
0.20.0, RTX A6000, driver 595.71.05, Ubuntu 22.04 (headless server) 1, 0 (first frame only, 2/2 runs) 10, 7 10, 10
0.19.0, RTX A6000, EGL headless - - 0, 0
0.17.0, 0.18.0, 0.19.0, RTX 4070 Laptop, EGL headless / OpenGL 4.6 0, 0 - -
0.20.0, Mesa lavapipe (VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.json, Mesa 25.2.8) 0, 0 - -

Filament selected the NVIDIA GPU on both machines (on the A6000 server it was the only physical device), and depth was valid in every black frame.

How the failure depends on workload on the RTX 4070 Laptop (10 renders, SSAO on / off):

Cell size (triangles) Black renders, SSAO on / off
1.0 m (180 k) 0/10, 0/10
0.5 m (720 k) 1/10 (first frame only), 0/10
0.25 m (2.88 M) 9-10/10, 9-10/10
  • The trigger is triangles rasterised in the view, not triangles in the scene. The same 2.88 M-triangle grid placed behind the camera renders correctly.
  • Near the threshold the result is nondeterministic, and the first render after add_geometry fails most often.
  • No effect: explicit near/far planes (near 0.01-5, far 100-1e5), re-centring geometry at the origin, untextured vs textured, legacy vs tensor TriangleMesh, splitting the mesh into 4 or 16 geometries, MSAA/FXAA on or off, defaultLit vs defaultUnlit, sleeping 0.2-1 s before each render.
  • The colour buffer is all zero, background included, while depth from the same view is valid. This looks like the colour readback never sees the finished frame, through missing synchronisation or a failed copy returning zeros, not like a shading problem. The log above shows a separate Gaussian-splat Vulkan context on the same device, with Filament on another queue (gs_q=0 fil_q=1). A cross-queue or readback synchronisation problem would fit. Possibly related upstream: Vulkan: reuse readPixels staging buffers, fences and command buffers google/filament#10787 notes a missing TRANSFER_WRITE→HOST_READ barrier in Vulkan readPixels.
  • Workarounds: pin open3d<0.20, or use lavapipe (correct output, about 20Ă— slower).

I used Claude Code to investigate this bug and draft the report.

Activity

  1. added
    bug
    on Nov 23, 2026
  2. emreyoleridev commented on Nov 24, 2026

    @emreyoleridev

    Not a fix, but some context for anyone else who hits this and wants to stay on 0.20.

    There's no way to get the old OpenGL path back from Python right now. EngineInstance() in FilamentEngine.cpp turns RenderingType::kDefault into Vulkan on Linux/Windows, and the comment there says to use RenderingType::kOpenGL for the legacy path. But the only thing that sets it is EngineInstance::SelectBackend(), and nothing in cpp/pybind calls it, so from Python you always end up on Vulkan.

    Workarounds until there's a real fix:

    • Pin open3d==0.19.0 for offscreen colour renders.
    • Since you saw 0.20.0 render correctly on lavapipe, you can force the Vulkan loader onto it for this process only with VK_DRIVER_FILES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json (VK_ICD_FILENAMES on older loaders). It's CPU rendering, so it'll be slow at 18M triangles, but the output is right.

    Exposing SelectBackend in the bindings (or an env var read before the engine is created) would at least give people an escape hatch while the Vulkan bug gets tracked down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions