Skip to content

WebGLPathTracer: Automatically position model to avoid numeric precision problems #678

@Drosaca

Description

@Drosaca

Describe the bug
I loaded a 3D model and applied OrbitControls to it. The path tracing work fine when the model is at the origin (0,0,0). However, after repositioning the model far from the origin and moving the camera to the new position, the path tracing is rendered on a low-quality texture, while the default renderer displays the correct texture.

chrome_raUJgxWO8g (1)

Expected behavior
expected this at position ("x": -3761603.743620786, "y": 4105279.00727716, "z": 3870314.8490743843) and not only at (0,0,0)

chrome_HIKeW216JU

Repro Model
can't upload: "We don’t support that file type."
can be downloaded from here:
https://mega.nz/file/faxFkAjI#kYYd7T3MVEgmjj6cC1PhPiqNpT2yaYaOaATuFIlTatc
original source:
https://sketchfab.com/3d-models/starlink-spacex-satellite-0a60f6720c5141c9a1c6d71aac108b31

  • Device: Desktop,
  • OS: Windows,
  • GPU: NVidia
  • Browser: Chrome,
  • Browser Version: [130.0.6723.119]
  • Three.js version: [r169] //using react wrapper @react-three/fiber[^8.17.9]
  • Library version: [^0.0.23] //using react wrapper @react-three/gpu-pathtracer[^0.2.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions