Anyone know of a good way to do destructible 3d?

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

How do I…

Break a 3D object into pieces?

What is the expected result

Played this “Friend Slop” game called A Gentlemans Dispute with my buddy’s and almost every object in every map is completely destructible which I always find very fun.

I know the answer can be as simple as: **Just delete the mesh when a player collides with it and create a bunch of debris objects and have them all spawn in its place with physics behaviors applied.
**
Which I have no problem with, but I just wanted to see if gdev is capable of doing it by itself at this point. It’s been a while since I’ve touched Gdevelop and it seems to have come a VERY long way, and i’m not sure what its capable of.

hmm…well no, im sorry, it cant. But heres what i do suggest doing:

you will need to create shards for each item, but this isnt as hard as it seems, theres a great addon for blender that makes breaking models into shards really easy. Try looking up a tutorial on it, it shouldnt be hard even for a beginner to blender

basically…once these shards are in the game as objects, check for once the player has broken a pot, make it so that once whatever condition is fulfilled (like checking amount of force applied on the item?), delete it, and spawn each shard in its place. then, use more actions to set the initial forces applied to be random, so the shards sorta spit out. Or maybe even multiply those random values by the force that was applied to the item so that more aggressive breaks more aggressively shoot shards.

I think youd wanna put the physics of those shards on a different collision layer too (different from layers in the scene editor) so that the player and other objects dont interact with shards. Set the map model to work on both layers 1 and 2, but the shards to only work on 2.

You can optionally add an object variable to each shard (or, an object variable in an object “shard” group) to keep track of how long one has been in the scene so they despawn automatically, but theres simpler options of doing that you might like more.

im sorry if i sound a little vague in this post, i just dont wanna explain too much if you dont feel like going forward with this option. Feel free to ask more questions if you feel like implementing it, or if you wanted me to turn any models into shards.

First of all, I should point out that I haven’t touched GD 3D yet, and I don’t even know if I ever will.

However, I can tell you that I use Blender to create my destruction effects for my 2D sprites.

Generally, it works like this: you download a mesh destruction add-on for Blender (I use LazyCracker or Kaboom).

The difference is that, unlike you, I then turn the animation into 2D.

If you’re working in 3D, you could potentially trigger the destruction animation after creating it in Blender, directly from your GLB file…and ofc destroy the object at animation’s end..(also be wary that the mesh should be prepared in advance)

i think my solution is better. Simulating the physics in blender and baking it to an animation results in added complexity and less simplicity especially for a beginner to blender. Plus it could interact with walls and the environment correctly.

I’m not against your solution.

What I’m against (always, and not just in this particular case) is adding objects to the scene unless i’m forced to. I don’t care how significant or insignificant the impact is.

I’m not familiar with the OP’s 3D skill, but if you know that he isn’t capable of doing it, then you’re right. That said, if you think this is the better approach, I have nothing against it.

i think adding objects is fine, considering these do get removed.

Im not familiar either, but i sure know like 1% of people here know how to use blender. (and thats being generous)

also ive never heard of those addons…i use the extension cell fracture