-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebGLPathTracer: Automatically position model to avoid numeric precision problems #678
Comments
Try increasing the textureSize parameter: https://github.com/gkjohnson/three-gpu-pathtracer?tab=readme-ov-file#texturesize |
When submitting an issue please follow the template and submit the information that's requested - you haven't provided enough information to say exactly what the issue is. My guess is that this is related to floating point precision at large numbers away from zero (though you haven't said how far). This is something that's not currently handled internally so assuming that's what the issue is you'll have to adjust the model position and camera to be near zero. |
Ok I updated the issue, the far away value is "x": -3761603.743620786, "y": 4105279.00727716, "z": 3870314.8490743843. it looks like a low poly version of my object when it's far but only with the path traced version. |
I tried with 4096 but it doesn't change anything :( |
Yes these numbers are very large and will likely cause numeric precision issues when rendering. I recommend moving the camera and model closer to the origin to address the issue. This could probably be fixed automatically by the renderer but it would need to be implemented.
Yeah this won't help in this case, unfortunately, since it's a numeric problem. |
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.
Expected behavior
expected this at position ("x": -3761603.743620786, "y": 4105279.00727716, "z": 3870314.8490743843) and not only at (0,0,0)
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
The text was updated successfully, but these errors were encountered: