Support 64bit float in PLY loader
See original GitHub issueIs 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 the postProcess
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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Parsing binary Stanford polygon files (PLY) with Pyparsing
What you might want to try is to open the file as text, use pyparsing to parse the header and capture the end...
Read more >C51: 64-bit Floating-point Operations - Arm Developer
No. The Keil Cx51 compiler does not support 64-bit floating-point math. You may use the double data type, but operations are performed using...
Read more >[solved] Double precision PLY file - OpenFrameworks Forum
After simply going in the header and changing “double” to “float” it was fixed, I was wondering if there is a trick I'm...
Read more >The RISC-V Instruction Set Manual
OpenRISC does not support the 2008 revision to the IEEE 754 floating-point standard. • The OpenRISC 64-bit design had not been completed ...
Read more >VTK File Formats
The XML formats support random access, parallel I/O, and portable data compression and ... short, unsigned_int, int, unsigned_long, long, float, or double.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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: Instead of computing the minimum position, it’s probably cheaper and sufficient to shift by the first vertex of the model, then set it as the SceneNode position.
@christianbrugger Sorry, but this issue needs to be solved on application level e.g. with a custom enhancement for
PLYLoader
. Loaders in general return vertex position data as FP32 which is sufficient for most use cases. Besides, we can’t work with a higher precision on the GPU anyway.