Skip to content

Configurable 3D Rendering Backend, GPU Selection and Performance Optimization #484

Closed

Description

@DerDanilo

Problem

PartBuddy currently provides limited user-facing control over how the 3D viewport uses available graphics hardware and rendering resources.

Different systems have very different hardware configurations, including integrated GPUs, dedicated NVIDIA or AMD GPUs, and systems where software rendering may be preferable for compatibility or troubleshooting.

The automatically selected rendering configuration is not necessarily optimal for every system or workload.

For example:

  • A system with multiple GPUs may not use the preferred graphics adapter.
  • Users may want to prioritize rendering performance, visual quality, or reduced power consumption.
  • Complex CAD models may benefit from different rendering settings than simple models.
  • Certain driver or hardware combinations may require a compatibility-oriented rendering mode.
  • Users currently lack sufficient visibility into which rendering backend and graphics adapter are being used.

The objective is to provide more control over rendering performance and hardware utilization, particularly for maintaining a smooth and responsive 3D viewport.

This request concerns the interactive 3D viewport and should be distinguished from SolidCraft's underlying CAD geometry computations.

Proposed solution

Proposed Solution

Introduce configurable 3D rendering and performance settings, allowing users to select suitable rendering backends, graphics hardware preferences, and quality profiles.

The implementation should build on PartBuddy's existing Electron, Three.js, and React Three Fiber architecture wherever technically feasible.

1. Rendering Backend Selection

Provide configurable rendering backend options, depending on platform and hardware support:

  • Automatic (recommended): Detect available capabilities and select a suitable rendering backend.
  • WebGL: Use the established GPU-accelerated rendering path.
  • WebGPU: Offer an alternative modern GPU backend where supported and compatible with the existing rendering pipeline.
  • Software Rendering / CPU Fallback: Allow an explicitly supported software-rendering mode where technically feasible, primarily for compatibility and troubleshooting.

Unsupported backends should not be selectable or should clearly explain their limitations.

Changing rendering backends should not affect project data, CAD geometry, or design history.

2. GPU Selection and Hardware Preferences

Where supported by Electron, Chromium, the operating system, and the rendering backend, provide controls for graphics hardware preferences.

Suggested options:

  • Automatic GPU selection.
  • Prefer high-performance graphics hardware.
  • Prefer power-efficient graphics hardware.
  • Select a specific detected graphics adapter where technically supported.
  • Display the currently active GPU and rendering backend.

On systems with integrated and dedicated GPUs, users should be able to understand which adapter is actually being used.

If direct GPU selection cannot be reliably enforced, provide appropriate guidance for configuring GPU preferences through the operating system.

The application should distinguish between a requested GPU preference and the adapter actually selected by the graphics stack.

3. Rendering Quality and Performance Profiles

Introduce configurable viewport performance profiles:

  • Performance: Prioritize responsiveness and frame rate.
  • Balanced: Balance visual quality and system resource usage.
  • Quality: Prioritize visual fidelity on capable hardware.
  • Custom: Allow manual configuration of individual rendering parameters.

Potential configurable parameters include:

  • Target FPS or frame-rate limit.
  • Antialiasing quality.
  • Rendering resolution or pixel ratio.
  • Shadow and lighting quality, where applicable.
  • Mesh display quality and level of detail.
  • Adaptive rendering quality for complex scenes.
  • Reduced rendering activity when the viewport is idle or not visible.

The goal is smooth interaction without unnecessarily consuming GPU, CPU, or memory resources.

4. NVIDIA and AMD Hardware Optimizations

Evaluate whether hardware-specific optimizations could improve performance on supported NVIDIA and AMD graphics adapters.

Potential areas for investigation:

  • Vendor-specific GPU capabilities exposed through supported graphics APIs.
  • Driver and rendering backend compatibility.
  • Advanced GPU acceleration where supported by the current architecture.
  • GPU memory utilization and resource management.
  • Optional hardware-specific performance improvements where measurable benefits exist.

These features should only be implemented where technically appropriate.

NVIDIA CUDA, AMD ROCm, and similar compute technologies should not be assumed to accelerate the existing Three.js viewport automatically.

Any hardware-specific implementation should remain optional, with a vendor-neutral rendering path available.

5. Rendering Diagnostics and Performance Monitoring

Add a lightweight diagnostics section to the application settings.

Useful information could include:

  • Active rendering backend (WebGL, WebGPU, or software).
  • Detected graphics adapter and graphics API information, where available.
  • Current and average FPS.
  • Rendering frame time.
  • Approximate GPU memory usage, where reliably available.
  • Geometry statistics, such as triangle and draw-call counts.
  • Rendering errors, backend failures, and fallback status.

An optional performance overlay within the 3D viewport would also be useful for troubleshooting.

6. Separate Viewport Rendering from CAD Computation

PartBuddy uses SolidCraft for CAD geometry operations and Three.js for displaying the resulting geometry.

Performance optimization should therefore distinguish between:

  • CAD geometry generation and modification.
  • Mesh generation and transfer.
  • Interactive viewport rendering.
  • Scene updates and visual effects.

Where possible, expensive geometry processing should not unnecessarily block viewport interaction.

GPU selection should primarily control viewport rendering unless additional acceleration for CAD computations is explicitly supported by SolidCraft.

7. Expected Behavior / Acceptance Criteria

  • Users can view which rendering backend and graphics adapter are currently active.
  • Rendering backend preferences can be configured where supported.
  • High-performance and power-efficient GPU preferences are available where technically feasible.
  • Unsupported rendering options are clearly identified.
  • Users can select between performance, balanced, quality, and custom rendering profiles.
  • Rendering quality can be adjusted without modifying CAD geometry or project data.
  • Complex models remain as responsive as reasonably possible through appropriate rendering optimizations.
  • Hardware-specific optimizations are optional and do not compromise compatibility.
  • Rendering failures trigger meaningful diagnostics and safe fallback behavior.
  • User preferences persist between application sessions.

Primary Goal

Provide flexible, hardware-aware rendering configuration so PartBuddy can deliver a smooth and responsive 3D experience across different hardware configurations.

The focus should be on practical performance improvements, reliable hardware utilization, and user control rather than introducing unnecessary rendering complexity.

Alternatives considered

Possible alternatives include:

  • Relying entirely on automatic GPU selection: Simple to maintain, but provides limited control on multi-GPU systems and may not always deliver optimal performance.
  • Configuring graphics preferences exclusively through Windows: Can help with GPU selection but does not provide control over PartBuddy's rendering quality, backend, or frame rate.
  • Using a single fixed rendering quality profile: Reduces configuration complexity but does not account for different hardware capabilities or workload requirements.
  • Optimizing the existing renderer without exposing settings: May improve default performance but does not address users who require specific compatibility, power-efficiency, or performance configurations.

A combination of sensible automatic defaults, configurable performance profiles, and optional advanced settings would provide the best balance between usability, performance, and compatibility.

Suggested priority (MoSCoW)

Should

Feature catalogue

  • I checked docs/feature-catalog.md for an existing entry.

Activity

  1. ManuelStaggl commented on Nov 16, 2026

    @ManuelStaggl
    Collaborator

    Thanks for the detailed write-up, Danilo! Here is what came out of it. It will ship with the next release.

    Done

    Not done, and why

    • WebGPU: I measured three's WebGPURenderer against WebGL on the same heavy scene (about 1 million triangles, edges, shadow; 1440×900 at 1.5×) in PartBuddy's Electron. WebGPU was slower on both cards: Quadro RTX 4000 4.0 ms vs 1.3 ms per frame, Intel UHD 770 13.3 ms vs 9.8 ms. Our silhouette, grid and edge shaders would also have to be rewritten. So the view stays on WebGL. The probe is in tools/webgpu-probe and can be run again when three or Chromium move on (docs: 3D view and graphics in the catalogue, with the WebGPU probe and its result #494).
    • Custom profile with single sliders, picking one adapter by name, NVIDIA/AMD-specific paths: left out to keep the settings simple. As you wrote yourself, vendor compute (CUDA/ROCm) doesn't speed up a three.js view.
    • Approximate GPU memory: browsers don't report it reliably, so it isn't shown.

    If the view still stutters on your machine with a large part, a screenshot of the frame-rate corner together with the "Graphics" row would help a lot.

  2. DerDanilo commented on Nov 17, 2026

    @DerDanilo
    Author

    @ManuelStaggl Moving the item(s) with the left mouse button is now almost impossible. It only moves a little bit and then nothing moves. And it also appears that the cube in the top right corner moves to the middle of the screen. I gues this is still somewhat unstable.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions