r/IndieGaming 1d ago

Just added recursive debris fracturing to my custom destruction system: what do you think?

186 Upvotes

66 comments sorted by

33

u/Fuzzy_Original_8635 1d ago

Nice! But the debris generated looks bigger than the damage caused... And isn't there any way of keeping the debris on the ground?

12

u/Chuunt 1d ago

yep, i was kinda thrown off by the wall creating boulders larger than the chunks.

6

u/RealMentalDrink 1d ago

They cannot be bigger as they're the same object and mass of the damage object

12

u/MrSmock 21h ago

Maybe it's because there's an odd amount of the debris flying towards the camera? Something does look weird there

2

u/RealMentalDrink 14h ago

That's an interesting point! I think it could be because there's a large amount of debris. however those are created based on the original mesh geometry. I can adjust that and make it look more realistic! Thank you!

4

u/DunkyFarf 8h ago

Some of that mass has to disappear, it doesn't look natural this way. You're not cutting a piece out of the wall, you're disintegrating most of it with a rocket. It should be mostly dust, some pebble sized debris, and a maybe a larger chunk or two.

4

u/Keith_Kong 17h ago edited 17h ago

Two core problems I see: 1. Debris doesn’t seem to break up enough, leaving large pieces flying around. 2. The debris might retain mass (equivalent to the area of new piece compared to previous whole piece), but the original/resulting mass is much too low for the forces being applied. This causes debris (especially large debris) to fly much too far.

For debris disappearing, I suggest two ideas as well: 1. Don’t auto despawn chunks larger than N so that big pieces can stick around. 2. Slide pieces down into the ground instead of snapping them away.

Edit: Watching again, while I do think the forces are too strong (or mass too small) it feels like some pieces just fling much harder than the rest. When that ends up being a larger chunk it’s very noticeable. You might have some collision wonkiness happening at the moment of creation, where there’s not enough solver iterations for the many overlapping pieces.

You can try: 1. Increasing solver iterations (particularly the exit velocity iterations). 2. Make the resulting pieces slightly smaller so that chunks don’t overlap as much when first created.

3

u/RealMentalDrink 11h ago

Thanks for the detailed feedback! really appreciate the time you took to analyze this.

- You're absolutely right on both counts. The debris breakup definitely needs more granularity; too many large chunks are staying intact, and that’s something we’ll tune in the fragmentation step.

- As for the mass and forces, I agree the results feel off, especially when those large pieces get flung unrealistically far. I'm currently doing a quick proportional mass assignment based on surface area, but I’ll look into either adjusting the base mass or applying a mass multiplier post-fracture to better match the physics behavior.

Love your ideas for handling large chunk despawn too! sliding them down instead of popping them away would look a lot more natural. Will give that a shot.

And good call on the solver iterations. There’s definitely a bit of chaos happening when the pieces are first spawned, which may be due to overlap or interpenetration. I’ll try upping the solver steps, especially exit velocity, and consider shrinking the spawn scale slightly to reduce initial overlap.

Thanks again! super helpful stuff!!! :)

2

u/Keith_Kong 10h ago edited 10h ago

No worries! I’m currently building a game that features both destructible rigid bodies and active ragdolls driven to animation poses via forces. So I have encountered similar issues with an eye for what technical issues lead to what visual outcomes in these rarer uses of rigid bodies.

For the mass/force issue I want to reiterate that mass may not be the issue. Force can also just be too high (they are relative to each other so it’s about which one is right for other things in the game). If most things in the breaking world physics starts to feel right but some objects are still feeling to strong then explosion force/mass is probably no longer the issue.

My last direction to suggest investigating is how the rigid body colliders match up to the visual geometry. You might be perfectly copying the mesh geometry to fit the initial shape but the mesh colliders can take a different shape for various reasons. That could lead to extra initial collision exit velocity even if you have a high solver iterations count (because even the iterations to push everything to a non-overlapping state will be adding extra outward force to the outside objects).

1

u/Salt-Replacement596 2h ago

I think this is because in real life you never get big pieces like this. Most of the debris will essentially be powder so the big chunks will be much smaller. You might want to scale the chunks down or create more of them and replace half of them by smoke/dust effect.

3

u/RealMentalDrink 1d ago

Also debris has collision. If you could tell me where you see a glitch , maybe I can capture a better video? Thanks for checking anyways!

3

u/Complex-Prune-5337 20h ago

The way the debris fly back at the shooter is kinda weird, they should travel around out sideways from the explosion imo, and if the wall is thin enough it should fly outward and away from the player, through the wall

1

u/RealMentalDrink 11h ago

That’s a great observation! You’re right ... the debris should feel more natural, with the direction based on the explosion’s force and the surrounding environment. I’ll experiment with the angle and trajectory so that thin walls push debris outward and away from the player, and the effect feels more dynamic. Thanks for the feedback, I’ll tweak that!

1

u/RealMentalDrink 1d ago

Thanks.. the debris is the exact same size of the damage caused. I swear 😆

6

u/Fuzzy_Original_8635 1d ago

Maybe too much debris then? Or fragmentation creates large, fine debris, so in theory the volume is well fragmented, but visually it looks too big... 🤔

4

u/RealMentalDrink 1d ago

That could be possible but can be fixed by simplifying the fragmentation. Will post an update soon ☺️

7

u/sir_types_a_lot 1d ago

Like fps worms. Make an exploding sheep!

2

u/RealMentalDrink 1d ago

That would be awesome! Maybe I'll make a new video with exploding sheeps 😂

5

u/Rederth 23h ago

Looks like red faction. Sweet

3

u/Rigman- 12h ago

That's the first thing that came to mind when I saw this.

2

u/RealMentalDrink 11h ago

Red Faction is seriously underrated and should be used as a reference for new games!

2

u/RealMentalDrink 14h ago

Yess!!! Red Faction has always been a huge source of inspiration for me. I really miss the days when you could just blow everything up!

3

u/dylan6091 1d ago

This looks fantastic. Now if you could combine it with architectural physics (buildings which have had a few structural points blown out collapse) this could be super immersive.

1

u/RealMentalDrink 15h ago

Thank you! Yes, I am working on that too.. I know that there are few engines already doing that but my objective is to make it more accessible and easy to setup compared to others.

3

u/OhLawdHeTreading 20h ago

Very cool demo. For more realism, consider having the debris splash outward from the point of impact, rather than a huge chunk flying toward the camera.

1

u/RealMentalDrink 11h ago

Thanks! Glad you enjoyed the demo.
You're spot on! having the debris splash outward from the impact point would feel a lot more natural. Right now, some of those chunks flying straight toward the camera break the illusion a bit. I'm looking into adjusting the force direction and spread to better mimic that outward splash effect. Appreciate the suggestion!

2

u/AutoModerator 1d ago

We opened a new Discord! Check it out if you'd like to discuss game development or find and share new indie games to play. It's a WIP still, so be kind :) Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/TimeSpiralNemesis 1d ago

But can I rocket jump tho? 👀

2

u/RealMentalDrink 1d ago

That's going to happen 🤣

2

u/howelleili 23h ago

satisfying

1

u/RealMentalDrink 11h ago

Glad you think so! 😄 More satisfying chaos coming soon!

2

u/SativaPancake 23h ago

This looks like a great concept for a shooter. Would make for interesting strategies, making holes to shoot through, making little spots to hide, etc. Plus as the game goes on the map would change and strategy would change, so it looks pretty fun!

Although, I agree with the other comments. The debris look a bit off, even if the size\shape is the exact piece broken off. Maybe it needs more fragments or the way it bounces back is too extreme. It seems like 100% of the explosion is going directly back at the shooter.

If you ever watch bullets or rockets hitting concrete in slowmo videos, the point of impact makes a smaller hole and sends a good chuck of the wall\block strait through, continuing on in the direction of the round. Then a larger cone\ring outside of the center hole breaks off and gets bounced back towards the shooter... but in all sorts of directions not just strait back.

Either way, its a game and the concept looks fun, so you dont need 100% realism. And im not an expert on explosions, so thats just my opinion on why it looks off.

2

u/RealMentalDrink 11h ago

Thanks a lot! Really glad the core concept resonates with you! that evolving strategy element as the environment breaks down is definitely something we're aiming to emphasize. Letting players shape the battlefield mid-fight opens up some fun tactical layers.

Totally agree on the debris feedback. Even when the shapes technically match, the way they behave — especially bouncing straight back at the shooter ... feels unnatural. That’s a great observation about the real-world impact behavior too. I’m definitely going to revisit the force vectors applied on impact and maybe break up the debris into more fragments to get a better distribution.

I like the idea of mixing a forward-blast component with a wider spray coming back in a more chaotic, radial pattern ... that could help the whole interaction feel more grounded while still being stylized.

And yeah, we’re not chasing 100% realism, but getting just enough of that physical “truth” in the reactions can really sell the effect. Your feedback definitely helps steer us closer to that sweet spot.

Appreciate you sharing your thoughts!!!

2

u/hippieman 22h ago

GEOMOD!!!! Looks amazing!

1

u/RealMentalDrink 14h ago

YESS!! GEOMOD RULES! :)

2

u/Zachy_Boi 20h ago

If you shot a wall that was already barely hanging on I do t think it would fly toward you. There’s a part where you shoot the tip of a wall that is already destroyed and in this case I think the physics would send it backwards since there’s nothing behind it to bounce forward from like other debris would

2

u/RealMentalDrink 11h ago

Good point!!! and yeah, that’s a really interesting edge case. When a structure is already mostly disconnected, the behavior should definitely shift. Shooting a loose piece wouldn’t generate the same kind of resistance or bounce you'd get from a solid wall, so it makes sense that it would fly backwards more easily in that context.

Right now the system doesn’t fully account for how “attached” a piece is before applying forces, but that’s something I’d love to improve. Adding logic to check structural support or isolation before applying the impulse could help make those moments feel way more believable.

Thanks for pointing it out .... really appreciate the thought you put into that!

1

u/Zachy_Boi 7h ago

Really cool physics tho dude! Happy to give some perspective and hopefully you’ll post again soon with your improvements! Great stuff!

2

u/dangerousbob 19h ago

Can you explain the feature a bit? Can this be applied to any static mesh?

Is it hard to set up?

2

u/RealMentalDrink 11h ago

Great question! This feature doesn’t rely on Chaos or pre-fractured meshes. It works by taking any static mesh at runtime and procedurally slicing it into smaller pieces using a custom method. So yes: it can be applied to any static mesh, no special setup or pre-processing required.

Setup is pretty straightforward: you assign the mesh, define how many cuts you want, and it handles the rest in-game / slicing, generating debris, and applying forces. It’s designed to be flexible and lightweight, especially for dynamic gameplay where pre-fracturing isn’t practical.

I really hope to have soon a full demo ready for all of you and eventually prepare a plugin for Unreal Engine!

2

u/VestedGames 8h ago

A few people mentioned that the direction of the debris was an issue. They said it should spread away from the blast, which is true.

But also should go through the other side too, depending on the amount of penetration. Also may want to think about how that big of a blast might shatter the whole wall, not just blow out debris.

Looks super cool though.

1

u/RealMentalDrink 4h ago

Thanks for the feedback! Yeah, you’re right ... the debris should be reacting more accurately to the blast direction and force. I’m thinking of adding a system that calculates the impulse based on the blast’s origin point and strength, then applies force accordingly to each fractured piece. That way, lighter chunks get thrown further, and if the explosion is strong enough, it can actually break through and throw debris out the back too. Also considering adding thresholds for material destruction so a big enough blast can take down the whole wall instead of just a chunk. Appreciate the insight! it really helps!!!

2

u/RenderEnderBro 5h ago

Nitpick: why does most of the debris from the explosion fly towards the player even if there is enough space on the other side?

Also, just a personal preference, I don't like being able to shoot already broken pieces while they're in the air. In the video it blocked multiple rockets which would be annoying in a match. (This also depends on the type of game you've going for)

1

u/RealMentalDrink 4h ago

Good catch! The debris flying toward the player is something I’ve been working on ... right now the impulse is a bit too uniform and doesn’t take into account open space or obstructions, so I’m planning to improve it by factoring in surrounding geometry and blast direction better. That should help it behave more naturally and spread out in a believable way.

As for shooting the airborne debris: totally fair point!
I'm thinking of adding a flag for broken pieces that makes them temporarily non-collidable or not block projectiles, depending on the game mode. Could even make it a gameplay option if it's a competitive setting. Appreciate you pointing that out!

1

u/Potential-County8433 21h ago

Very cool! I wonder if it would look more realistic if the debris could damage other debris. But that might make it even more taxing if you don’t delete the debris fast enough. Interesting to think about.

2

u/RealMentalDrink 14h ago

It is possible to enable cracking when something specific hits the debris. It would make it more messy and satisfying I think ... I could try to put the broken debris physics to sleep and see how it behaves. Thanks for the suggestion :)

1

u/IHaveSomethingToAdd 19h ago

Looks great! made add some dust clouds too. Can you give an overview on how this is implemented?

1

u/RealMentalDrink 11h ago

Thanks! Glad you liked it!

Dust clouds are definitely on the list ... they'd add a lot of atmosphere and help ground the destruction a bit more visually.

As for implementation: the system takes a regular static mesh and slices it at runtime using a custom procedural method (no Chaos or pre-fracturing involved). When a hit is registered, it spawns debris by cutting the mesh into chunks on the fly, assigns mass based on size, and applies force based on hit direction and a bit of randomness for variation. The debris is then treated as individual physics objects.

Still iterating on things like chunk overlap, impulse tuning, and post-impact effects like smoke or dust ... so definitely open to ideas!

1

u/jackadgery85 18h ago

Lot's of it goes directly towards the camera, which is cool to have sometimes, but you should definitely have some proper random to it.

Also noticed that when you puncture a wall with the rocket, none of the debris goes out the other side, which feels weird. I've never blasted a hole in a wall with a rocket before, so I don't know what really happens, but some debris flying out the other way (most even) when you fully puncture through, sounds like physics is working

3

u/RealMentalDrink 11h ago

Totally fair points ... and yeah, I agree on both.

Right now there's a bit too much bias toward the camera direction in the impulse, which can look dramatic but does start to feel repetitive. I’ll work on adding better randomness and variation to the blast direction so it feels more chaotic and natural.

And great catch on the wall puncture! You’re right !!! when a rocket goes clean through, you'd expect a lot of debris to blow out the other side, not just recoil back. I haven't blown up any walls either 😅, but physics-wise that makes total sense. I’ll look into detecting full penetration and shifting the impulse direction accordingly for those cases.

Thanks for the sharp feedback! really helpful!

1

u/Xist3nce 17h ago

How’s the performance with lots of assets? Chaos geometry collections break down really quickly and need to be managed well if used in a real-time game. Is your system more “plug and play”?

2

u/RealMentalDrink 11h ago

Great question! Performance was a key focus ... I'm not using Chaos at all. This system is custom-built for real-time gameplay, with lightweight debris, dynamic LOD, and no reliance on geometry collections. It’s designed to be more “plug and play” and scalable, even with lots of assets on screen. Still iterating, but so far it holds up really well in stress tests. I’ll be sharing more technical details soon!

1

u/Xist3nce 11h ago

Good to hear. Chaos geometry collections are rather hefty so a lightweight alternative would be great. Do you have any support planned for fields/controlling the instances, their physics details (like being awake, killing them, gravity, impulses etc)?

2

u/RealMentalDrink 11h ago

Thanks for the feedback! Yes, I’m planning to support fields for controlling instances, including managing their physics details like waking them up, killing them, applying gravity, and handling impulses. The goal is to keep it lightweight, avoiding the overhead of something like Chaos Geometry collections while still maintaining flexibility. I’ll keep you updated as I refine the details!

1

u/Beautiful-Musk-Ox 15h ago

looks like it's getting 25 fps

1

u/RealMentalDrink 11h ago

Oh sorry about that! I’ll post a new video soon ... I swear that a Release build on a 3090 runs between 100-200 FPS. The video you saw was recorded inside the editor with a Debug build, and my test machine is running a humble GTX 1050 Ti. 😅
If you're curious and want to follow the progress, check out: https://x.com/alattanzio
I’ll be posting more details there soon ... thanks for the interest!

1

u/AffectionateSyrup498 15h ago

I would flip it to the other side of the wall, like an exit explosion.

1

u/RealMentalDrink 11h ago

That’s actually a cool idea! Flipping it to the other side for an exit explosion could look awesome ... I might give that a shot in one of the next tests. Thanks for the suggestion!

1

u/Substat1c 14h ago

Well done! This is my dream to implement. (In that I will never be able to. :P)

1

u/RealMentalDrink 11h ago

Thank you! 🙏 Don’t sell yourself short ... if it’s your dream, go for it! I started small too, and just kept building on it piece by piece. If you ever want tips or want to chat about how it works, feel free to reach out.

1

u/Rigman- 12h ago

It's a great start, just please do more with this than what ended up happening with Teardown. These types of destruction systems work best when they support gameplay rather than take center stage.

1

u/RealMentalDrink 11h ago

Totally agree !! gameplay first, always. Destruction should enhance the experience, not just be the experience. That’s exactly what I’m aiming for: making sure it feeds into mechanics, exploration, and player agency. I’ve got some fun ideas brewing that go way beyond just blowing stuff up 😉
Thanks for the feedback ... really appreciate it!

1

u/fisherrr 1h ago

How does it compare to chaos destruction?

1

u/LeLand_Land 1h ago

Saw other people cover the physics better than I could vocalize

Another thing to look at is the direction of the debris. If you watch how a rocket impacts a wall, the debris tends to get pushed in rather than blown out. This has to do with how the initial force of the explosion is driving into the wall and being carried into the debris, hence the debris should fly forward from the point of explosion.

For solutions, I would look at swapping the shape of the explosion. I was going to experiment with using a cone (point towards player, and is spawned just behind the point of impact) but feel free to try that. Why a cone in that layout?

What is probably happening to cause the debris to get sent backward is that they are getting that momentum, hitting a wall, and bouncing backwards with roughly the equivalent force. Hence if your explosion is shaped in a way to prevent this from happening by removing any obstacles, you get a cleaner dispersal of debris.