• Building
  • Ist it possible to make a sculpter inside godot?

Is it possible to make a sculpt programm in godot, and if yes, how?

Possible, sure, anything is possible. But it would require a lot of work.

You can use ArrayMesh to generate geometry (like this tutorial shows how to make a sphere): https://docs.godotengine.org/en/stable/tutorials/content/procedural_geometry/arraymesh.html

You can also see here for some other options: https://docs.godotengine.org/en/stable/tutorials/content/procedural_geometry/index.html

However, editing the model would require regenerating the whole mesh, which is likely very slow. There is a function call "surface_update_region" which should allow you do just change a small portion of the model vertices, which I believe would be fast enough for a sculpting program. But I have never used it and it seems it might have some issues (at least in GDScript). With C# it might be faster, and I think it's being overhauled for Godot 4.0. You can read more about it here: https://github.com/godotengine/godot-docs/issues/3787

Honestly for a productivity application of this nature I'd consider using godot via c/c++ and develop on module level instead of GDScript or C#, using one of those at most for some UI work perhaps.

21 days later

@cybereality said: Possible, sure, anything is possible. But it would require a lot of work.

You can use ArrayMesh to generate geometry (like this tutorial shows how to make a sphere): https://docs.godotengine.org/en/stable/tutorials/content/procedural_geometry/arraymesh.html

You can also see here for some other options: https://docs.godotengine.org/en/stable/tutorials/content/procedural_geometry/index.html

However, editing the model would require regenerating the whole mesh, which is likely very slow. There is a function call "surface_update_region" which should allow you do just change a small portion of the model vertices, which I believe would be fast enough for a sculpting program. But I have never used it and it seems it might have some issues (at least in GDScript). With C# it might be faster, and I think it's being overhauled for Godot 4.0. You can read more about it here: https://github.com/godotengine/godot-docs/issues/3787

But how to sculpt a collision shape with it?

A collision shape is just a set of vertices. You can create the mesh, convert it to a PoolVector3Array, and then pass that to a collision shape, for example ConvexPolygonShape.set_points().