-
Notifications
You must be signed in to change notification settings - Fork 45
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
Road addnodes too sparse or to dense flips the road upside down #240
Comments
all the road, if all the nodes are added at once |
Hello Gianluca, I don't see the road being flipped upside down in your example, but there are glitches (folding and maybe material mapping problems). You can inspect the road a bit better if you go into the World Editor (press F11) then at the top, select the Decal Road Editor. Your points are not monotonous in the X dimension (the first 5 go left, and the rest go right) - this describes a very sharp turn, since the Y value does change, but this may explain the 'folding' appearance. The road tool is not perfect, and this pushes it quite stiff. Also - it is probably better to create the mesh before laying the decal road on top of it (although I am not sure this matters from BeamNGPy tbh). The internal tool which creates the roads has some known issues which we are working on (it is very old), so for now it would be best to keep points from being too close together, and to avoid very sharp turns. You shouldn't need to put points that close together anyway - internally, a spline will be fitted to them, so any detail at that resolution would likely be lost in this process. Dave |
You could try running a pass over the points, whereby if two consecutive points are too close (eg < some epsilon) then remove the 2nd, etc. To increase density, you could start adding midpoints. We do this kind of thing sometimes. Dave |
ok thanks, hoping for a correction of the bug in future versions |
some updates: I've done some test to better understand the cause of the problem, here are the test and analysis github.com/gianlucafabris/BeamNGpy - Road test, hoping this might help you |
Creating Road with addnodes and a set of nodes too sparse or to dense flips the road upside down.
This issue affects all the road or part of it, this can't be fixed with flip_direction=True.
The text was updated successfully, but these errors were encountered: