wareya / CSGDeformTest

Test project for a CSG deforming node/tool for Godot 4
MIT License
9 stars 2 forks source link

Started port. #1

Open fire opened 11 months ago

fire commented 11 months ago

https://github.com/V-Sekai/godot/tree/vsk-csg-deform-4.2

Hi I started the port to C++ modules.

fire commented 11 months ago

https://youtu.be/JAVmgFGMM3Q Youtube video.

fire commented 11 months ago
  1. collisions should be generated
wareya commented 11 months ago

🎉

fire commented 11 months ago

Do you have any ideas on some of these bugs?

  1. the grid is wrong
  2. deforming locks the plane of movement
wareya commented 11 months ago

1) Try a 9 x 5 x 9 lattice with a plane mesh set to subdivide 15 x 15 times: image image

2) Gizmos are ignored as long as "Do Deform" is enabled; this felt better to me at the time, but maybe it should be an "ignore gizmos" button instead (not sure how it would work)

fire commented 11 months ago

I'll try to work on this next weekend. Need to conserve momentum.

fire commented 11 months ago

@wareya Do you know how to modify the algorithm so it works with mesh [add,subtract, and difference]?

Edited:

https://github.com/V-Sekai/godot/blob/vsk-csg-deform-4.2/modules/csg/csg_shape.h#L623-L639

Currently I generate a mesh, but I can move the deform so it operates on the csg combined shape..

fire commented 11 months ago

Todo:

  1. `ERROR: Invalid default value for parameter 'mode' of method 'CSGDeform3D.affect_lattice'. at: _generate_cs_method (modules/mono/editor/bindings_generator.cpp:2104)
  2. Generate proper xml documentation. I think a few parameters are missing names.