TheDuckCow / godot-road-generator

A godot plugin for creating 3D highways and streets.
MIT License
311 stars 15 forks source link

Updating default density to 1 loop for 4m for improved performance #172

Closed TheDuckCow closed 1 week ago

TheDuckCow commented 2 weeks ago

I find that applying a density of 4 (which reads "1 mesh loop every 4 meters") is a better default than our current 2x, which has twice as many loop cuts. At 4m with the default lane width also of 4m, it makes for nearly square but long rectangles.

at density=2 (previewws)

Screen Shot 2024-06-19 at 10 53 40 PM

at density=4 (new)

Screen Shot 2024-06-19 at 10 53 19 PM

Of course, really sharp turns will still look a little low poly on the outside edge. And turns with roads with a higher number of lanes will also tend to look courser. But I do feel this is still a good general default starting place. In wheel steal game, for instance, we have a density of 3 but if not for the discontinuity of CSG mesh creation, would push it higher.

TheDuckCow commented 2 weeks ago

With the second commit, I've also changed the default gutter profile to extend down only 0.5m instead of the prior 2.0m, which felt a bit cartoonish and at the very least would require more beveling to look ok in non lowpoly contexts. This does mean by default there isn't quite as much margin to work with the terrain, but that's really the responsibility of the terrain creator in the end.

Before:

Screen Shot 2024-06-19 at 11 00 59 PM

After:

Screen Shot 2024-06-19 at 11 00 23 PM