Skip to content

#15098: Headless mode for exporting 3D view and plot snapshots - #15099

Merged
magnesj merged 6 commits into
devfrom
headless-3d-snapshots
Nov 3, 2026
Merged

magnesj merged 6 commits into
devfrom
headless-3d-snapshots

Conversation

@magnesj

@magnesj magnesj commented Nov 3, 2026

Copy link
Copy Markdown
Member

Adds a --headless command line option that loads a project and exports 3D view and plot snapshots without showing any windows, so batch runs and regression tests can run on machines without a display or OpenGL hardware.

Fixes #15098

Changes

  • --headless renders 3D views with software OpenGL (Mesa llvmpipe, opengl32sw.dll on Windows) and keeps all windows and progress dialogs hidden.
  • Log messages are written to stdout. On Windows the process attaches to the parent console, so logs show in PowerShell and cmd.
  • Snapshot export returns errors, and a failed export gives a non-zero exit code.
  • Hidden viewers and plot windows get deferred resize events, fonts, layout and overlay frames, so snapshots match the requested size and content.
  • Snapshot export failures are reported through the Python API.
  • The Linux launcher script supports headless runs (also related to Octave Dialog Box Functions Not Fully Working #1015).
  • Adds a Python example and a class diagram.

Usage

ResInsight.exe --headless --project model.rsp --savesnapshots all --snapshotfolder out
ResInsight.exe --headless --regressiontest <regression-test-folder>

Testing

  • The ProjectFiles/2026 regression tests pass in headless mode with exit code 0.
  • 3D views and most plots differ from the GUI baselines by 0.1-1.7% of pixels.
  • The logarithmic histogram plots differ by about 8.5%, because page margins are not included when rendering hidden multi plots.

@magnesj magnesj self-assigned this Nov 3, 2026
@magnesj
magnesj force-pushed the headless-3d-snapshots branch from 3d4c49d to b9b54ed Compare November 3, 2026 07:27
@magnesj
magnesj marked this pull request as ready for review November 3, 2026 07:28
@magnesj
magnesj requested a review from jonjenssen November 3, 2026 07:29
@magnesj
magnesj force-pushed the headless-3d-snapshots branch from b9b54ed to 298153a Compare November 3, 2026 14:22
@magnesj
magnesj merged commit 3cc11ee into dev Nov 3, 2026
18 of 19 checks passed
@magnesj
magnesj deleted the headless-3d-snapshots branch November 3, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Headless mode for exporting 3D view and plot snapshots

2 participants