jarneson / godot-ply

Godot plugin for in-editor box modeling
MIT License
358 stars 25 forks source link

Allow editing arbitrary pre-existing meshes #54

Open Zireael07 opened 2 years ago

Zireael07 commented 2 years ago

Describe the bug I added a mesh to the parent mesh instance, then added the ply editor. Ply editor continutes to behave as though the mesh was empty.

To Reproduce See above

Expected behavior Expected ply editor to allow me to edit the preexisting mesh.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

jarneson commented 2 years ago

This is definitely something we've looked at but it's a bit tricky. Godot Meshes expose tris only, so you end up with a triangulated mesh.

We also have stricter constraints on what a mesh is as well, in that it has to be a manifold. Not all Godot Meshes will be manifolds, so determining what to do in that case is tricky.

There's been some work on trying to get this to work in this branch: https://github.com/jarneson/godot-ply/tree/load-mesh-on-creation

Zireael07 commented 2 years ago

Yeah yeah, having used the plugin a bit I get the limitation, BUT adding the node underneath some existing mesh and seeing nothing happen is definitely weird.

For now, maybe add a print or a popup somewhere that explains clearly to the end user that any existing meshes will be ignored and overwritten by whatever ply editor spits out?

fire commented 2 years ago

I have a proposal.

If we can determine the pre-existing mesh is manifold we should be able to load it. Let's separate loading from make manifold.

Problems:

  1. loading
  2. make manifold
fire commented 2 years ago

We're now able to load manifold geometry meshes.

editor_screenshot_2022-03-26T132343

jarneson commented 2 years ago

Let's keep this issue around for "Arbitrary Meshes", which is a very long term goal.

49 covers Manifold meshes only, which will be solved by the time we have a stable Godot 4 implementation.