[HELP] Physics - What is possible? How? [INFORMATION]

Hey guys, I’m REALLY interested in game-physics and I saw that Unreal Engine has many options for it, but there are 0 videos about it.

Would something like this KEVA planks round tower build and destroy using Bullet Physics Engine - YouTube be possible with the basic collision-physics? (Or how would it be possible, if?)

In the vanilla engine, there’s only one kind of destruction AFAIK, “voronoi”. I worked with Blender quite a while ago and there was epic stuff possible with it.

Voronoi Fracture and Shatter Lab Tests - Blender & Bullet Physics - YouTube 8:35 is exactly what I mean

What can Voronoi do in UE4? How? There is completely 0 info about destruction and physics of UE4 in the internet.

Please give me information, even if it’s depressing!

I just want to know what is possible!

PS: I saw that there’s this APEX-Nvidia-thingie, not much information again on how it works/how I can get it to work but ye… is this only possible with Nvidia graphics cards? Cause I’ve got a “R9 280X” (AMD).

PLEASE help me and give me informations!

Hi Alo De Lore,

This really appears to be more Destructible oriented than specifically about physics in general.

The first video. Something like that should be doable. There may be some slow downs depending on the system with regards to all the simulating going on with that many pieces.

For the second video and even in regards to the first one, These are “offline” renderings and not real-time simulations. That can be a big difference.

With Destructibles you are limited to 2000 chunks in a scene without editing the hard-coded values. Destructibles also run off the CPU and not the GPU as to keep the performance the same with Nvidia and AMD Cards. PhysX in the engine does not require any specifics. This is true of all the features, they will work with Nvidia or AMD cards.

With Voronoi, you are going to be limited to 1 depth layer and some control over the depth layers that would benefit multi-depth destruction. That’s about the only limit I can think of.

If you use PhysX Labs (standalone app or 3Ds Max/Maya plugin available for free at Nvidia.com) you can set up to five depth layers for more specific types of destruction.

There isn’t much to go on at the moment with Destruction in the engine, but there are plans to remedy this. :slight_smile: I can’t give a specific ETA for any official documentation on the subject, but I’ve done a lot of extensive work with destruction assets and I’m aware of a lot of the issues that are reported at the moment.

Until documentation and examples are released the best solution is to just ask questions here on the forums, AnswerHub, or dig into their documentation and start testing what works and what doesn’t. That is what I did to learn. I would focus on each settings and see how it worked in conjunction with other settings in the destructible until I understood it.

Feel free to ask any questions, I don’t mind helping as I do really enjoy destroying things! :slight_smile:

I’ve also setup a forum thread where I post mini-tutorials and such. If there is a specific test or setup you’d like to see I can see about doing something and posting for others as well. I’ve not been as active in the last week or two with it but I’d like to do some more fun destructibles stuff so suggestions are always welcome!

Let me know if you have any questions.

Uh, I wanna give you a hug :D.

That’s pretty much exactly what I wanted to know and hear haha :p.

I’m definitley going to look into all of your work tomorrow and test it out myself to understand it!
(And of course send you some questions after that haha.)

:smiley:

No problem. I enjoy helping!

There is a magic wand on the road map called vertex animation. Oldest form of animation ever but the thing about it is it just works and with FBX support and vertex animation there is nothing that can’t be done if there is not the need for real time.

All of the stuff in the second video could be done in Houdini, exported to UE4 using vertex animation, as a scripted cut scene.

Can be done because FBX already supports point cache data where physics or not you can brute force the result your looking for.

I did mass physics tests a while ago and stacked 1600 primitive cubes to a giant wall, then I build a little hoover tank that can shoot physics bullets (spheres) to bring it down.
It works in general, but the PhysX integration in UE4 is not well multi-threaded! This means, when you have 1600 cubes all simulating at the same time, you get low frame rate because only 1 or maybe 1 1/2 cores of you computer are used. The moment the wall is down and all cubes are on th ground, not interacting that much anymore with each other, the frame rate relaxes instantly.
I tested it on a Intel i5 laptop.

@Franke, thanks for the info, but I’m looking for stuff that can be done InGame aswell :/.

@dev Isn’t there maybe an option to allow multi-core threading? Cause I’ve got 6 CPU-cores and it would be a shame if they’d be meaningless :c.
I mean UE4 is quite new, and modern stuff normally has multi-threading implemented. :frowning:

The thing is, your target audience is very unlikely to have a 6-core CPU, so enabling it would be kind of pointless if you wanted other people with reasonable minimum spec’s to be able to use it. That said, quad-core is becoming more standardised now, so you could use up to 8 threads for it in a lot of scenarios. Obviously for mobile, that’s never going to happen.

I’m pretty sure the PhysX is multi-threaded by the engine by default, I think Dev100000 means that there’s room for improvement with the way in which it’s done by the engine.

If you want to simulate 1600 physics-simulating objects in game at higher than 30fps, forget about it. Especially if they have collision and whatnot. That logic along with all of your overarching game logic and engine stuff alongside isn’t going to give you a lot of processing room to toy with. Even Battlefield has very few proxies being simulated all the time, they’re switched off as soon as they hit the ground and subsequently disappear.

You can I believe Tim said, simulate destruction outside of the editor and then import it as animation. 3D Motive has a tutorial on how to do exactly that strangely enough, but for UDK. Process for UE4 shouldn’t be too different.
http://3dmotive.com/series/dynamic-destruction-in-udk.html

@TheJamsh:

I actually did a mini tutorial for how to set that up here: [TUTORIALS] Photons Be Free: Mini-tutorials and other curiosities - Community & Industry Discussion - Epic Developer Community Forums

It’s really not that hard. My setup is in 3Ds Max, but it should be similar in other programs. You need to set up your animation and get that the way you like, Select the objects and assign them as a group, Export your scene and when you import your FBX into UE4 it’ll be a rigid body animation. I struggled originally with this because every one I saw posting said there needed to be bones for each chunk which is not the case. They just need to be grouped.

Oh nice! Well in that case it should be even easier OP :slight_smile:

Also MAX Ftw :wink:

The 1600 cubes experiment was actually not impossible to use. That’s why I was raising the question about PhysX multihtreading.
I did it on a Laptop with Intel i5, which is around 3 times less cpu power the best available today.
It was actually play-able, just not at the 60fps. The feeling was, that with a little more cpu power or better multi-threading, is would have been fine.

I can upload the package. It works with a Xbox controller. It is not a full game, just a little experiment.

here is the 1600 cubes test.
You can play it. See download link.

If you have the task manager open, you will see it uses the cores very poorly. On my quadcore it uses maximum 46%. That’s not good.

Are you looking to do live physics in a real time game?

If that’s the plan then it’s super easy to maintain high performance requirements with in the local space.

If the plan is to go networked then that’s a totally different animal the goes far beyond the specifications of the local build as you will be limited to what the netcode can or can not do.