Triangle Sorting Issue with Large Values #51
HeresJ0nny
started this conversation in
Features and improvements
Replies: 1 comment
-
This sounds like a great idea @HeresJ0nny! Thank you for reporting another issue! I'll move it to discussion to track the status of this task! I'm a bit busy this week, but next week I believe I can work on it if nobody took over this task by then :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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