Azure / azure-remote-rendering

SDK and samples for Azure Remote Rendering
MIT License
107 stars 39 forks source link

Precision issues with Point Clouds far from the origin #89

Closed WikkidEdd closed 1 year ago

WikkidEdd commented 1 year ago

We have a point cloud from one of our clients which was producing very strange results, poor stabilisation and it was very hard to pick with a ray cast.

Our app automatically centers the asset so it wasn't easy to spot, but after a bit of investigation, we found that the points were positioned about 600km from the origin! :) This obviously produces severe precision issues and created quite an interesting effect where the points were clumping together.

image image

We've managed to fix this particular point cloud by using the recenterToOrigin conversion setting, but it is quite common that models and points clouds coming from GIS data are offset a long way from a common datum, so I don't think this is the last time someone will run in to this issue.

We could add something which warns our users post-conversion that the point cloud is way off origin and that they should use the recenter option, but having them have to convert it again isn't a great user experience.

We've noticed that when this occurs for mesh models you auto-fix it by creating an extra node in the scene graph and making all the vertex positions relative to that node.

warning 4019: Some meshes contained vertex positions very far form the origin. These large offsets have been moved to the scene graph instead.

Would it be possible to add a similar feature for point clouds? It would save the user from having to repeat the conversion with the recetnerToOrigin flag set.

AdamCichocki commented 1 year ago

Hi Edd. Thanks for the great report. We'll soon address this issue.

AdamCichocki commented 1 year ago

We just released ARR 1.1.29, which addresses this issue. Affected assets need to be reimported.