Triangle Sorting Issue with Large Values #51
Replies: 2 comments
-
This sounds like a great idea @HeresJ0nny! Thank you for reporting another issue!
|
Beta Was this translation helpful? Give feedback.
-
Hi @HeresJ0nny, I'm converting all feature discussions to issues since GitHub has better support for task tracking with issues. This discussion was converted into #103 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion was converted into the issue #103
Hello,
I noticed an issue with ImPlot3D when rendering 3D plots that involve large values. The problem seems to arise from floating-point precision errors during the triangle sorting process relative to the camera position. As a result, the plot is not rendered correctly.
If I manually normalize the Z-values before passing them to
ImPlot3D::PlotScatter
, the rendering works as expected, and the triangles are sorted correctly. However, without this normalization step, the visualization is inaccurate.I have attached two images to illustrate the issue:
Without normalization: The plot is rendered incorrectly due to sorting errors.
With normalization: The plot is rendered as expected.
I would suggest implementing an internal normalization step for values within ImPlot3D before performing the triangle sorting calculations. This would ensure that the rendering is accurate and consistent, regardless of the scale or range of the input values. By handling the normalization internally, users would not need to preprocess their data, and the library would become more robust to variations in input data.
Kind regards.
Beta Was this translation helpful? Give feedback.
All reactions