Ask Unreal Anything: Physics | September 28, 2022 at 1PM EDT

We’ve teamed up with Cédric, Chris, and Devon to chat about one of the most fundamental scientific disciplines—physics! These sorcerers of simulation and replicating the real-world are popping in to answer your questions in this month’s Ask Unreal Anything.

The team can field topics on anything from Chaos development and fluid simulation in Niagara to physics fields and beyond. We’re also happy to answer questions on general development, career advice, pets, and hobbies.

Have something you’d like to ask? Add your question in a reply below!

The team will join us at 2022-09-28T17:00:00Z.

MEET THE TEAM

AUA_CedricCaillaud

Cédric Caillaud is Senior Physics Programmer working on Chaos, and more recently destruction specifically. With 16 years of experience in the video game industry on projects like Need For Speed, Battlefield or UFC, he loves building tools that empower users to express their creativity. In his free time, Cédric plays guitar and synths, tinkers with DIY projects, and experiences real life physics by practicing Parkour around Vancouver.

Chris Caulfield is the Senior Physics Programmer responsible for the rigid body solver. He’s spent 25 years in game development with a background in physics, gameplay, core systems and engine architecture. In Chris’ spare time, he cycles or plays video games—mostly the latter.

Devon Penney is a Senior Physics Engineer and the primary author of Niagara Fluids, UE’s high quality fluid simulation system for both games and cinema. He’s passionate about building extensible, friendly, and efficient simulation tools. Previously, he was the Head of Engineering at VR storytelling startup Penrose Studios, and spent 7 years at PDI/DreamWorks, working both as a Lead Research and Development Engineer and Effects Artist. Outside of work, he’s an avid rock climber, skier and surfer.

GUIDELINES

  • Ask one question at a time by replying to this topic, using the button at the bottom. Please read through the questions to see if your question has already been asked, before posting your own.
  • Start with one question to give others a chance to participate.
  • Please do not reply to anyone else’s post—the purpose of replies in this topic is to receive answers from our guests. If you’d like to discuss a related topic in more detail, create a new topic.
  • Keep in mind, this is NOT a support session. Questions that are specific to your project or troubleshooting will be removed.
  • And don’t forget to have fun :slight_smile:

Posts not following these guidelines may be removed by moderators to keep the AMA flowing smoothly. Thank you!

10 Likes

It would be nice to tell people what the “repulsion force” is for in the character movement component and how to use it for physical objects, as for example The Division have (the object collides, does not block players or AI and does not sense navmesh). Including some collision filtering instructions (overall overview of penetration would be good). Basically, mainly gameplay stuff.

I’m a university student currently studying differential equations, but I’ve also taken multivariable calculus. I want to learn more about and write some code with physics simulation and fluid dynamics. I’m lost on where I could begin in such a complicated field; what would you recommend?

1 Like

Hello. Well, usual UE5 Physics question that is constantly around in community: PhysX / Apex backwards/continuity compatibility back in UE5, when? Thank You.

2 Likes

Likewise, time estimates regarding beta features or if there is an experimental feature. It is bad to incorporate into the project something that has been experimental for a few years (as if they were masked materials or chaos itself in UE4) and one does not know how much one can go over it, even if it seems good at first glance. What about Chaos cloth + chaos cloth editor for example? How much do I need it and time estimate?

And some example of a gameplay asset in the chaos and blueprint would be nice - for example cabinet that has joints and a door that can be shot and then fall down, that would be nice. I found lots of crumling walls and vertex animations from houdiny, but not much gameplay stuff (coinstraint, thruster, or another force with combination with Chaos, cloth etc).

Likewise, some appropriate use of physical material mask in the material editor would be nice. Or at least documentation… I couldnt get it to work on 4.27 with PhysX.

1 Like

I want to set up a system where multiple unconnected physics worlds are being simulated at once, for example: people playing table tennis in a moving train. The train moves and can collide with physical objects outside and the people inside the train can interact with physical objects inside, but the two need not be aware of each other. Doing this all in the same simulation, while not impossible, would have far too many challenges.

Can we create multiple physics worlds in a way that doesn’t require modifying the engine?

Or is there an easier solution than that?

Thanks!

1 Like

and another :smiley: Destructible car glass or only glass? The problems with the shader are that one needs to change collisions (mainly simple). How can it be done? With Niagara? At least some basic overview for classic gamedev workflow - damage, different material on damaged edges + what should one avoid when optimizing?

whether fluids can affect game mechanisms - for example, when flooded, whether the player can detect how deep it is and how its movement can be affected - will there be a link to the character movement component? Or behavior of chaos car and water fluid?

Can liquids damage the object? I assume that if it is based on DF and there is no hit event. So how about it in BP?

And there is nice video with geometry scripting that you proppably know. Which reminds me procedural destruction using the texture pattern form Ranbow Six Siege. So. Is there any time estimate on the Geometry scripting feature at least to the beta phase? Or with Nanite?

Also some overview regarding replication and fluids for example - what is synchronized. It’s a sad to develop energy for something and then find out that client and server is different (physx in UE4 for example).

Is there a link to wind, or how to do something, especially with regard to point wind? - cloth, chaos, fluids.

In UE 3 PhysX featured Cloth Tearing. Is it somewhere? The first Mirrors Edge used this and it was quite effective. It is also possible make tearable spiderweb (Batman: Arkham Asylum) and how? (does it doable in Niagara?) - I’m not talking about a precise and detailed procedure, but whether it’s possible at all. I will find it :smile:

Is it possible to hang something on chaos cloth, or it wil need riging and bones as always (rope and chains (i use cloth for example on basket hoop chains)? (for example, an outdoor dryer with laundry, after passing through it, does the fabric react to both wind or player?)
sometnig like this? or more Alien stuff :smile: - chains with the hook at the end?

Is it also possible to combine Niagara fluids with the material on meshes? Example. If I want to promote water or fire that affects the surface - wetness or burning damage? Or i can spawn particle where is fire base on particle and surface or its need to be manually by user vector location and trace or something? (something like this)
Or the spread of fire on the basis of the grid like in far cry - where do I spawn on the affected object another particles? But that’s too advanced i think. If not, is there any way to access the grid? (Far Cry: How the Fire Burns and Spreads)

How is the floating object with thesis and player? Can you drive it? Like freeze bomb in water in Batman Arkham Knight?

1 Like

Stacking thin cylinder shapes keep shaking and jittering indefinitely.
Do you have any plans to solve this issue?

I aim for stability and performance equivalent to Havok.

More details on this issue : Stacking cylindrical models keep shaking and jittering indefinitely - Chaos Physics

Thanks

6 Likes

QUESTIONS:

  1. What were the choices behind moving from PhysX to Chaos? Is there any fundamental differences between the 2 physics SDKs that developers need to know about and consider before deciding which to use?

  2. With modern Physics Engines now relying on concepts from Geometric Algebra and research in the fields of Position Based Dynamics (PBD), is Unreal leveraging any of these advancements with Chaos? How are Rigidbody and Softbody simulations improving with Chaos?

4 Likes

a few Questions!
1: will there be any plans for caching chaos for groom or cloth for cinematic use?
1a: can we get a chart in the documentation for which sim items are safe to use with which movie render queue settings?
2: is chaos realtime or cache VR friendly?
3: fluid sims are awesome but very heavy! any plans to be able sim cache to flipbooks that are locked to a camera for cinematic use?
4: any plans for nano VDB for usage in engine?
5: any plans to make any sim cache easily convertible to vertex animation textures for runtime optimization? (I guess more useful for VR or mobile)

[QUESTION]
Why does Epic not expose proper “Physics Tick” on either UE5 or UE4 when using substepping or async timestepping? I talk about being able to run my own physics code at every physics step, instead of only every Tick. And actually being able to use normal transform related getters on those physics steps (they now give you outdated cached values from previous Tick).

Background: I know there are ways to do this in c++ but it’s always been undocumented and more complicated than it really should be, and with chaos the boilerplate for this is even bigger if you go with same route as chaos vehicles did.

This alone has always made me think Epic treats actual game physics as second class citizen. In other engines I’ve used running your own physics code at physics steps has always been exposed out of the box. Please consider fixing this. You can make it better on UE5.

[Question]
Why performance of moving characters is 3-4 times worse on Chaos (UE 5.0.3) compared to PhysX (UE 4.26)? :sob: Is this something you’re aware of and working to improve?

[Question]
I have a background in both physics (not simulation) and computer science from uni, as well as a few years of unreal experience. How would you recommend going from here to learning computional physics simulation for games and movies?

How does one connect Physics Fields to normal Niagara emitters? Not using the chaos Niagara data interface. I just want to have Niagara react accordingly. If a radial field physics impulse goes off how do you connect it to Niagara? There is a field data interface in Niagara but when you add it its currently blank. You cant connect the two. Even in the latest 5.1 builds there are now these Niagara field blueprints but there is no Niagara inputs anywhere so I’m still confused on how to connect the two. I also know there is the sample physics fields in material land but no idea on how the connections should be used. This has also been asked in UDN as well.

Or the support for vector fields in Niagara. There has been little to no support done for it. There is no support for sampling world placed vector fields like Cascade could. Showing us how to either use the new field system with Niagara or getting the vector field implementation up to snuff would be great.
Thanks Jeremy

Very stable but also rotatable constraints / joints to simulate for example servos ( angular motors ) between objects:
In PhysX this was mainly achieved with the “solver iteration count” set to 255.

How I get very stable and still rotatable constraints in Chaos physics ?

1 Like

Any plan to provide, in the rigid body solver available for generic physics simulation (i.e. not for ragdolls/animations), support for the Featherstone/Reduced Coordinate representation, in addition to the classic Maximal Coordinate formulation?

If not, does Chaos provides any extension mechanisms to add custom solvers without having to switch to custom engine builds?

1 Like

[Question] What are the behavior differences for physics constraints between PhysX and Chaos and what issues are still to be fixed.

For example I’ve observed that setting linear limits on X and Y at the same time does not yield a circle area, but a square one. Why was this changed from the PhysX behavior? And how to generate a round one?

Also, what’s up with the soft constraints? I cannot seem to make a simple spring. Can you please show how to do a bouncy spring?
Edit: even in 5.1 soft constraints don’t seem to be working.