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

Mesh deform along curve #123

Open
TheDuckCow opened this issue Sep 17, 2023 · 2 comments
Open

Mesh deform along curve #123

TheDuckCow opened this issue Sep 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@TheDuckCow
Copy link
Owner

For various applications, it is becoming increasingly apparent that having a way to deform pre-provided meshes to follow along a curve in Godot will be incredibly helpful.

The applications of such a feature:

  • Allow users to create hand crafted roads exactly matching the style and theme of their game, but still have the flexibility of defining the shape of their roads via curves (vs static lego-dropped blocks).
  • Allow users to use more complex geometry to be instantiated along the edges of the road, once we also have the ability to generate curves on the outside rim of roads (for sidewalks, barriers, etc).

One person did create a C++ native project here, but has been untouched in over 4 years: https://github.com/TheFamousRat/MeshCurver/tree/master

It does seem likely that it would be a bit slow to implement in gdscript, but this could also be greatly mitigated by caching placements to meshes in pre-defined scenes (#109)

This seems like it would be useful enough it would actually warrant being its own plugin. But, we could see about implementing a lightweight version of it first here.

@TheDuckCow TheDuckCow added the enhancement New feature or request label Sep 17, 2023
@TheDuckCow
Copy link
Owner Author

TheDuckCow commented Oct 3, 2023

Seems that someone has made a good stride towards this! But for Godot 4, would be interesting to see if they post more about this:
https://twitter.com/KasperArnklit/status/1708824724808069506

(reddit post: https://www.reddit.com/r/godot/comments/16xvoxm/made_a_little_tool_to_make_meshes_repeat_along_a/)

@TheDuckCow
Copy link
Owner Author

When we get to this stage, here's a video of an equivalent road generator tool for Unreal Engine (https://www.youtube.com/watch?v=ndXxlOlRRk0) which looks pretty impressive. They essentially have stacks of arrays or rather checkbox rows which define which kind of feature to be added and arrayed along a road. Their materials are pretty impressive too. A few things that are nice about this tutorial:

  • Drag and drop material replacements for arrayed elements
  • Different options for how the road conforms tot he terrain including blending to below materials for things like dirt roads
  • Lots of different road-side elements which each individually can have their own modifications.
  • Tick boxes to simply enable common features like sidewalks, railings, gutters, etc. And a feature such that you can just visualize one or more of them, in case you don't want the base road mesh. This is interesting, as indeed you might have a custom road mesh but then want to use the other procedural elements for instance.
  • Tools that actually drive input into the shape of the terrain (instead of the other way around)
  • And goes without saying, PBR materials out of the box
  • Impressive demo with procedural placement of things like leaves along the floor and roadside trees, part of unreals broader mechanism for procedural generation that I'm very jealous of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant