Skip to content
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

Wrong visulization when coordinate values are large #764

Open
pkulijing opened this issue Jan 29, 2023 · 1 comment
Open

Wrong visulization when coordinate values are large #764

pkulijing opened this issue Jan 29, 2023 · 1 comment

Comments

@pkulijing
Copy link

pkulijing commented Jan 29, 2023

Large coordinate values are not handled correctly

A cube put at (0, 0) with the camera targeted on it is correctly rendered
image
After changing its coordinates to large values, its shape is obviously distorted:
image

Reproducing code: https://codesandbox.io/s/objective-darkness-t02fi7?file=/index.js

After a fast glance of the code, I think the reason is the limit of single-precision floating point. Worldview uses float to render shapes, which can preserve roughly 6~7 decimal digits. Thus in the above case, some dm-level and all cm level information is lost, resulting in the distortion. Data pre-processing is needed for such large values, i.e. use the value after mod calculation instead of the raw values (7018.084 instead of 837018.084).

@jtbandes
Copy link
Contributor

jtbandes commented Feb 8, 2023

Try out https://github.com/foxglove/studio. We do some more intelligent math when you are viewing things centered around certain coordinate frames that are far away from others. There’s a chance it may help for your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants