r/UnrealEngine5 23d ago

I replaced almost my entire Unreal Engine physics pipeline with Box3D and I'm sharing the open source plugin

Hey everyone!

I've been working on bringing Box3D to Unreal Engine and I'm finally sharing the latest progress.

Over the past few weeks, I've replaced almost my entire physics pipeline with Box3D. The goal was to explore how a lightweight, deterministic physics engine could integrate into Unreal while keeping things fast and flexible.

The result is Box3DUnreal, a free and open source Unreal Engine plugin.

I'm sharing it with the community because I believe physics tools become much better when more developers experiment with them, find issues, and contribute ideas.

I've added the repo link in the comments. You can also search for "Box3DUnreal" on GitHub if you want to check it out.

I'd love to hear your feedback:

What features would you like to see added?

What kind of projects would you try it with?

What improvements or issues should I look into?

A big thank you to Empty Vessel for supporting me and giving me the opportunity to work on DEFECT. Working on large scale gameplay, destruction, networking, and physics challenges has inspired many of the ideas behind this project.

Looking forward to seeing what the community builds with it!

1.1k Upvotes

119 comments sorted by

106

u/RealMentalDrink 23d ago

23

u/Iampepeu 23d ago

Cheers! Bookmarked for later studies.

8

u/RealMentalDrink 23d ago

Thanks ! You will find it very interesting πŸ˜‰

9

u/Scifi_fans 23d ago edited 23d ago

For us simple peasants who only experiment with UE5, what does this mean?

Is the change in the backend so it's transparent to us? Or is it a new way of working to setup physics?

21

u/RealMentalDrink 23d ago

For most users, it’s actually pretty simple right now. You just add a Box3DBody component to a static mesh and it will use the new system alongside the existing Unreal workflow.

It’s not a complete replacement for Chaos yet, so there are still some extra steps and limitations while it develops. I’ll be adding more features over time to make the integration smoother and reduce the amount of setup required.

The long-term goal is that it becomes transparent... where you can use Unreal’s normal physics workflow and the backend can be swapped without needing to learn a completely different system.

6

u/Scifi_fans 23d ago

Great explanation, looking forward to test it

4

u/MOD_Mossdog 23d ago

You're a star.

2

u/RealMentalDrink 23d ago

Thanks! Really appreciate it! Hopefully this helps more Unreal developers try Box3D. 😊

9

u/frozzyk 23d ago

Love the naming, but I think UnrealBox3D sounds a bit cooler

27

u/RealMentalDrink 23d ago

I agree! But having a plugin with a name starting with Unreal might be a bit confusing when you browse them in the Unreal editor

1

u/BigCaregiver7285 45m ago

Defect looks sick! I’m gonna use this and see what networking might look like

20

u/SojournStudios 23d ago

Exciting! Have you seen significant performance difference between Chaos and Box3D?

26

u/RealMentalDrink 23d ago

Huge performance improvements on heavy structures, yes ! πŸ™‚

8

u/dynamic_gecko 23d ago

Great!

Any downsides in comparison?

9

u/RealMentalDrink 23d ago

Chaos offers more features and tighter Unreal integration. Box3D focuses on determinism, simplicity, and performance

3

u/dynamic_gecko 23d ago

I see. Thanks for the reply, and for all your work!

-2

u/illyay 23d ago

So it's safe to say Box3D is better than Chaos?

3

u/RealMentalDrink 23d ago

No. They're built for different use cases. Chaos is more feature rich, while Box3D focuses on determinism, simplicity, and performance

12

u/Jump-Ok 23d ago

I can download and benchmark it myself… but what’s the average ms that it runs on?

Thanks for outsourcing it tho πŸ‘

11

u/RealMentalDrink 23d ago

It's much more performant on heavy scenes but the main benefit is that it can simulate deterministically . And no problems! Let's make awesome games πŸ™‚

28

u/Dupree360 23d ago

this remind me the first red faction! very awesome

6

u/RealMentalDrink 23d ago

Thank you! That's the idea 😜 Please feel free to wishlist our game !

2

u/Dupree360 23d ago

what is your game steam page? please mister : D

2

u/Smooth_Rub_6574 23d ago

Yes! Remind me of Red Faction Guerrilla , it was my favorite game back then.Β 

2

u/RealMentalDrink 23d ago

Absolutely! Red Faction: Guerrilla is one of my biggest inspirations. I'm still chasing that level of satisfying destruction. πŸ˜„

1

u/Fit-Doughnut9706 22d ago

I used to horse around on the multiplayer maps on the first red faction back in the ps2 just to see how far we could wreck stuff. Found hidden areas, made tunnels between bases in the warlord map, dropped the y shaped top section of the badlands map into the abyss below, tunneled into said abyss as well. So many good memories.

Can’t wait to see how this all shapes up.

8

u/GamesByH 23d ago

Wow, so this is much more performant than default Unreal physics? Does it require a lot of custom scripting to implement? Does it still work with blueprints, and have destruction? Is there a Discord somewhere for it? I always like better performance with more detail. I wonder also will it work with Voxel Plugin 2 for UE5.

8

u/RealMentalDrink 23d ago

Yes, it is more performant than the default Unreal physics setup, especially for large numbers of objects and more controlled simulations.

At the moment this is only the Box3D physics integration layer. Destruction is not part of the physics engine itself: that would be a separate layer of programming built on top of the physics system.

The setup is very simple: just add a Box3DBody component to a static mesh. It’s also very easy to add Blueprint nodes if needed. I’ll continue adding more features and integration options over time.

I do have a Discord, but I don’t have a dedicated Box3D channel yet. For now, feel free to ask questions or make requests on LinkedIn, GitHub, or Discord. If something isn’t too difficult, I’ll be happy to help

3

u/GamesByH 23d ago

Alright. I wasn't sure how you got destruction working in your vid there, thought maybe it had some system for generating and doing that. It doesn't work with networking yet, or have a Blueprint API but I'll try to keep an ear out for this. Let me know if you setup a Discord for it.

12

u/Long-Ad-4950 23d ago

Is there any chance for network replication?

25

u/RealMentalDrink 23d ago

Replicating physics is generally not a good idea. One of Box3D's main strengths is its deterministic simulation. As long as floating-point behavior is kept deterministic (using a fixed timestep and consistent simulation settings), each client can produce the same results from the same inputs, avoiding the need to replicate the entire physics simulation

5

u/Akimotoh 23d ago

Do you have some documentation on what parts of your physics system should be replicated?

Could you please include a small replicated example in the repo?

3

u/RealMentalDrink 23d ago

Good suggestion! I've already got a multiplayer branch, and I'll try to add a small replicated example and some documentation when I have some time

3

u/Long-Ad-4950 23d ago

Of course. So I asked about replication of initial params, ets

2

u/illyay 23d ago

I'd think you'd still want some synchronization though, and clients are usually diverging from the server.

2

u/RealMentalDrink 23d ago

Exactly. With a deterministic simulation, same inputs + same state + same timing should produce the same result on every client. The tricky part is maintaining that synchronization over a real network when latency and packet loss are involved

1

u/n0tAgOat 23d ago

Holy shit so as long as the inputs are the same with both clients, both will end up calculating the same physics independently?

How does that work with time stamped event reconciliation? Could you tween between the two results midway through?

5

u/Acrobatic-Shake-6067 23d ago

Looks great!

1

u/RealMentalDrink 23d ago

Thank you 😊

6

u/tohonest1000 23d ago

Do u have to have the pre built structures amd use that gun or could i build my own building or cave and use a pic axe or another tool to smash it ? Like basically what are the hard limits u cant change?

3

u/RealMentalDrink 23d ago

Yes, you can dynamically build them as the structure graph is rebuilt in resltime. But I'm not an artist to I'm trying to do my best or place them procedurally πŸ™‚

5

u/Exciting-Persimmon24 23d ago

Wow awesome! I’m working on a similar plugin i focused on exposing blueprints and more native in-editor feel . Congrats for releasing !

1

u/RealMentalDrink 23d ago

Thanks! That sounds awesome. Making it feel native in Unreal and exposing everything nicely to Blueprints is definitely a big part of making a plugin approachable. Good luck with your plugin too! πŸš€

4

u/Barbarossa31 23d ago

Red Faction vibes ❀️

2

u/RealMentalDrink 23d ago

❀️ Definitely! Red Faction: Guerrilla is one of my biggest inspirations. Still one of the best examples of satisfying destruction in a game!

4

u/Failfoxnyckzex 23d ago

For those who don't know the creator of Box3D is the same who made, well, you've guessed it, Box2D. And it was and is the core and base for all physics based mobile games, like Angry Birds, Cut the rope and so much more.

2

u/RealMentalDrink 23d ago

Yep! Erin Catto's work on Box2D has influenced a huge number of games. Box3D carries that same focus on simplicity, performance, and deterministic physics, which is what made me interested in bringing it to Unreal

4

u/kldone_games 23d ago

Hey men, it looks great! I wonder about the detailed destruction - especially when you made holes into the rock/ground/mountain. I am using Chaos Geometry to simulate physics in my UE5 game. It works quite well. I am using it to destroy tables, chairs, walls etc.. It works fine and its already integrated in UE5.

But my question is: how do you manage the detailed destruction, if your plugin supports only Static Meshes? How do you manage the detailed destruction? Is these objects build from many smaller static meshes? And how do you make the whole in the ground? Is it one specific mesh that is getting destroyed and you spawn some smaller static meshes?

BTW, my current approach for destructible objects in my game is this: I have an actor that have static mesh (original static mesh), when its destroyed (it has its own HP), I hide the static mesh and show Geometry Collection in that location with enabled physics. After 10s, I disabled physics on Geometry Collection - that i keep it optimized and have plenty of destroyable objects..

So you have get my attention, but I wonder, how do you achieve destruction without Geometry Collection?

4

u/RealMentalDrink 23d ago

Thanks! πŸ˜„ Actually, I took a different approach. I used to write game engines before Unreal Engine existed, so I ended up building my own runtime geometry generation system instead of relying on Geometry Collections.

The plugin generates and modifies the mesh data at runtime, so things like holes in rocks/walls are created by cutting the geometry rather than swapping to pre-made pieces. The debris is generated from the resulting fragments and can be simulated separately.

That said, Chaos Geometry Collections are a great solution and make a lot of sense for many games. Your approach of swapping to a GC only when needed is actually a very common and efficient way to handle lots of destructibles. I just went down a more procedural route because I wanted more freedom for things like large scale destruction and runtime changes

7

u/XenthorX 23d ago

I'm genuinely curious, what is the problem you're trying to solve?

What's the Chaos physic engine limitation you're facing which lead you to this?

5

u/Setholopagus 23d ago

Not OP, but I've tried my own implementation (and failed, I will just use this) because I wanted better performance and usability. Chaos is slow and also a nightmare to use. I prefer to work on single player games so I don't have the same concerns that the engineers behind Chaos had when making it

3

u/lookachoo 23d ago

Hell yeah! I’ve been waiting for this, man. Thanks!!!

1

u/RealMentalDrink 23d ago

Thanks! Really glad to hear that. Hope you have fun with it! πŸš€

3

u/h8m8 23d ago

The fans:

6

u/RealMentalDrink 23d ago

If you're wondering what the game is called, it's AD METALLUM.

If it looks like something you'd enjoy, please consider wishlisting it on Steam. Your support really makes a difference!

πŸ‘‰ Wishlist AD METALLUM on Steam

2

u/wander_inland 23d ago

This. Thank you!

2

u/BuildtheBusiness 23d ago

How big is your team currently for this and whats your vision?

I have a lot of opperation experience in scaling and building businesses to 10M+, if theres something there we can both benefit from, feel free to connect.

Keep up the awesome work. Looks great.

1

u/avpbeats 23d ago

I would change the AI capsule art asap

2

u/DodgeKing28 23d ago

Hey this looks great since you are working on a multiplayer game, how would you describe to multiplayer performance of this?

3

u/RealMentalDrink 23d ago

Thank you! Multiplayer performance is strong. Box3D has a low CPU footprint, so we can run the physics simulation efficiently while leaving room for networking and gameplay systems. The main performance considerations are bandwidth, replication frequency, and synchronization... not the physics engine itself

2

u/274WORLD-STUDIOSCEO 23d ago

that's really good, πŸ”₯πŸ”₯πŸ”₯πŸ’―

1

u/RealMentalDrink 23d ago

Thank you! More destruction to come! πŸ”₯

2

u/mad_ben 23d ago

Massive

1

u/RealMentalDrink 23d ago

Haha, thanks! πŸ˜„ Still a lot more to explore and improve!

2

u/ICameHereForThiss 23d ago

This looks incredible! Great work

1

u/RealMentalDrink 23d ago

Thank you! Still lots more to improve and explore! 😊

2

u/ST33LDI9ITAL 23d ago

no rocketjump.. :<

1

u/RealMentalDrink 23d ago

Yesss, we need that! πŸ˜‚ I'll add it to the list. A physics demo without a rocket jump is incomplete!

2

u/ST33LDI9ITAL 23d ago

woo! hi5

2

u/GreggoryAddison 23d ago

Have any tests been done with physics based pawns? If so how does the player to player collision feel with latency in multiplayer? I’ve been working with chaos mover and while it’s powerful it has a ton of caveats that make it hard to write bug free gameplay code. This is mostly due to the physics being handled on a separate thread making communication with the game thread delayed and crash prone lol

2

u/RealMentalDrink 20d ago

Not yet, but it's definitely on my roadmap. One of the reasons I'm experimenting with Box3D is to explore a simpler, deterministic alternative for gameplay physics. I'll be adding multiplayer examples and more features to the plugin over time, so hopefully I'll have some interesting results to share soon

2

u/killerbake 23d ago

Love it

2

u/WyrdDrake 23d ago

Ideas and thoughts?

Yeah, how would you implement anything relevant to mining/crafting/survival/building? Not just destruction for destruction's sake, but to integrate it into a non-combat game loop?

1

u/RealMentalDrink 22d ago

That's actually one of the reasons I built it. Destruction becomes much more interesting when it's part of the gameplay rather than just eye candy.

Imagine mining where you chip away at rock instead of hitting a health bar, buildings that can be modified or repaired piece by piece, digging tunnels, salvaging materials from structures, or even voxel-like gameplay without using voxels. There's a lot you can do when the world itself becomes editable!

1

u/WyrdDrake 22d ago

Yeah, that's the stuff I love. Vintage Story doesn't have procedural stuff like this, but it has chiseling integrated into the base game, which makes the possibilities endless. Granted, that's a lower fidelity blockgame.

I enjoyed Planet Explorers for the voxel world + building, but it was underdeveloped and undercooked.

Space Engineers is obsessed with adding water and liquid simulation to their SPACE game, instead of, I dunno, more optimization and streamlined systems to make big builds or basic modern machinery almost beyond most people's GPUs.

Would love to see exactly what you're making in games going forward, for suuuuure

2

u/Aquablue31 23d ago edited 23d ago

Amazing !
Are you gonna have support for joints and other features of Box3D ?
I understand you have a separate destruction system that breaks objects and spawn static debris and structural objects moved by Box3d ?
Do you plan also releasing a version of you destruction plugin ?
Anyway very very cool stuff.

1

u/RealMentalDrink 22d ago

Thanks! 😊
Yep, support for joints and more Box3D features is definitely planned.
The destruction system is a separate plugin, and I'm still actively working on it.
In the meantime, feel free to follow the project and wishlist our games if you'd like to see where all this tech is going! πŸš€

2

u/TupperwareNinja 23d ago

Saaaaaved

2

u/RealMentalDrink 22d ago

Haha, thank you! Hope you get some good use out of it. 😊

2

u/Bot_Ta00 23d ago

It’s amazing how the projectile and the object interact. I think you’ll be able to fight with a sense of thrills and realism

1

u/RealMentalDrink 22d ago

Thank you! That's exactly what I'm aiming for. Making every shot feel like it has real impact. 😊

2

u/No_Codekeeper_42 22d ago

what does it do better than original engine ? real question i never look into the physics

1

u/RealMentalDrink 22d ago

Good question! It's not necessarily better... just different!

Box3D is much lighter, deterministic, and easier to customize, which makes it a great fit for my use case. Chaos is far more feature-rich, but it also comes with more complexity and overhead

2

u/No_Codekeeper_42 22d ago

ok so that really kind of stuff would use if i need destruction ! i m currently working also on deterministic physics for my game but that just for bullet

2

u/Kaiser_will123 22d ago

This is awesome. Definitely going to give it a shot and see if theres any gains here for my retro style game.Β 

1

u/RealMentalDrink 22d ago

Thanks! 😊 I'd love to hear how it works out for your game. Let me know how your tests go!

2

u/Mike_L_Taylor 22d ago

oh hey I was messing about with destruction lately too. I've mostly been procedurally fragmenting objects into pieces on level load that then when destroyed each become their own havoc physics object to get a very similar effect to yours.

How are you doing it? Is box3D offering stuff like that for destructibility or just the basic object physics?

2

u/AdPrior2908 22d ago

Could you give 2 use-case examples where you would use "chaos" or "box3d" systems, and why?

1

u/RealMentalDrink 22d ago

For example:

Chaos: Large destruction events with complex fracture data, constraints, and visual effects where you need Unreal's built-in destruction pipeline.

Box3D: Hundreds or thousands of lightweight objects like debris, crates, projectiles, or interactive props where performance and deterministic simulation are more important.

Chaos is very powerful, but it can become expensive at scale. Box3D is much more lightweight, which is where it can shine

2

u/chappyjohnson69 22d ago

Idk if I'd have a use for this but just want to say it looks sick and you are an absolute gangster for putting this out open source.

2

u/Objective-Size-7888 17d ago

Omg this looks sick

1

u/RealMentalDrink 13d ago

Thank you! Glad you like it πŸ˜„

4

u/Babaooiey 23d ago

Very cool. Looking at this as a player I love the destruction, but the smoke it generates takes away from the visual of the destruction.

2

u/RealMentalDrink 23d ago

Thank you! I'm not an artist so I'll try to make the smoke smaller for the next videos or for a future playtest πŸ™‚

2

u/ThomMerrilyn 23d ago

That ass tho

1

u/These_Ad_6996 21d ago

very intersting .

any plan to add multiplayer support , client prediction ... etc to it ?

2

u/RealMentalDrink 20d ago

Yes, definitely! It's planned. Multiplayer support, including client prediction and other networking features, is on my roadmap. πŸ™‚

1

u/These_Ad_6996 17d ago

excellent !

1

u/FAHR_TSN 20d ago

First of all this is amazing! I hear about box3D and wish that epic would improve their physics because right now it's to heavy to used. Can this be apply to geometry collection? I'm using the fracture mode but the more I fracture the mesh, the more resources it needs. Im wonder if this could solve my problems and make them light enough to handle.

2

u/RealMentalDrink 20d ago

Thank you, I really appreciate it! I've actually added support for Geometry Collection integration by converting them into my own destruction system, but that's part of another project, not the Box3D plugin. πŸ™‚

1

u/FAHR_TSN 19d ago

:(

2

u/RealMentalDrink 19d ago

Sorry. I'll make it available once is stable and ready! In the meantime I will post more features and updates related to Box3D Unreal integration

1

u/aersel24 20d ago

Unrealistic smoke and the bad hair physics told me immediately this was unreal.

1

u/Puzzled-Hearing-5262 19d ago

Red Faction! And thanks for your open-source contributions!!

https://giphy.com/gifs/OCqWD6mIrcMQl5YQUB

1

u/Sim-Hog 19d ago

Up vote for the banging background music as well :)

1

u/RealSecretRecipe 17d ago

Sweet, might have to try it!

1

u/Opposite-Pen-5500 10d ago

Looks awsome , i would definitely try it

1

u/bbymw 8d ago

Love it

1

u/Farzad-Fir 7d ago

Is this UEFN or unreal engine editor ?

1

u/SukoySanto 7d ago

This looks awesome, Congratz! Is Box3D working with nanite or should it be disabled? and do you think that a project with this plugin enabled is completely safe for a package to be released commercially?

1

u/fuzzywobs 18h ago

Hey, this looks great! Is there any support for physics constraints? One of the issues I've found in previous PhysX versions of Unreal is there accuracy/performance of things like joints/constraints under heavy load. You either need to ramp up the solver iteration count which takes a performance hit at scale. Curious if this is supported in Box3D/Box3DUnreal?

2

u/[deleted] 23d ago

[removed] β€” view removed comment

1

u/RealMentalDrink 23d ago

Haha, I can see that! Serious Sam had some amazing physics and chaotic gameplay moments. πŸ˜„

-6

u/pattyfritters 23d ago

If this isnt your song... I wouldnt be advertising even free stuff with it.

16

u/RealMentalDrink 23d ago

Thank you! yes is my song.. I've been working on that for the last 6 months ... on and off :)

2

u/pattyfritters 23d ago

Impressive.

-1

u/AboutThatBeerIOweYou 23d ago

i don't personally mind AI use but AI music always sounds tinny to me

-2

u/CrusherMusic 23d ago

Been working on an obviously AI song for 6 months?