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

CSGPolygon path mesh has stair-stepping when far away from the world origin #46178

Open
AntonioNoack opened this issue Feb 18, 2021 · 3 comments

Comments

@AntonioNoack
Copy link

Godot version:
3.2.3 stable, mono, official

OS/device including version:
Windows 10
Ryzen 5 2600
RX 580 8GB, GLES3

Issue description:
Meshes from paths have stair stepping, so a zig-zag-behavior, when they have sharp curves, and go upwards. The farther the control points are from their origin point, the stronger the effect is.
Screenshot 2021-02-18 181407

Steps to reproduce:
Create a path
Add a CSG Polygon, using "Path" Mode as a child of the path
Create some points: create a curve (90° or sth like that), and the middle of the curve create a hill.
The path interval needs to be lower than 1. (best 0.1)
I am not sure, when exactly it occurs... maybe only with long paths?
You can see the issue in the sample project.

Minimal reproduction project:

PathStairs.zip

@Calinou
Copy link
Member

Calinou commented Feb 18, 2021

This is a floating-point precision error, and I'm not sure if we can do anything about it. Such is the nature of floating-point computations…

Perhaps switching to double-precision floats in the CSG code would help, but it will also have a non-negligible performance impact.

@Calinou Calinou changed the title Path Mesh has stair-stepping? CSGPolygon path mesh has stair-stepping when far away from the world origin Feb 18, 2021
@fire
Copy link
Member

fire commented Nov 30, 2024

Manifold CSG now uses double precision internally.

#94321

@fire
Copy link
Member

fire commented Nov 30, 2024

Result looks ok to me Image

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

No branches or pull requests

3 participants