-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Support 64bit float in PLY loader #23006
Comments
You can't render double precision floating point with WebGL. I'm not sure why there is a |
We are using Potree to render the imported PLY. It uses three.js as a backend and gives us access to the scene object. When I add the imported PLY mesh to that scene it gets properly rendered. I don't know how they adapted the pipeline to accommodate for that, but it seems to work with the |
The following live example shows that double precision floating point can't be processed: https://jsfiddle.net/naLj3uzp/1/ I'm not sure what potree does but it surely does not pass a float64array to WebGL. |
@m-schuetz any pointers at how we should handle this? |
Models with large coordinates are typically handled as follows in Potree:
For this to work, the worldView matrix must be computed on javascript side in double precision. The huge coordinates of the world matrix and the reversely huge components of the view matrix will cancel each other out, and the resulting worldView matrix can then be cast to a Float32Array and used in a shader. I can't remember if I did anything to the PlyLoader to make it work in Potree. Do you have an example available, @christianbrugger ? Edit: |
@christianbrugger Sorry, but this issue needs to be solved on application level e.g. with a custom enhancement for |
Is your feature request related to a problem? Please describe.
In our projects points are very large and we need 64 bit float precision to properly display them.
When using the PLY loader the files are correctly parse, however at the end the arrays are converted to
Float32BufferAttribute
.This makes the data unusable.
Describe the solution you'd like
Make the PLY loader use
Float64BufferAttribute
in thepostProcess
function (Source)Describe alternatives you've considered
Create an option to output the data as 32 bit or 64 bit buffers.
Additional context
I changed locally the attribute and the class works still perfectly.
The text was updated successfully, but these errors were encountered: