Animation + physics simulation (for non-humanoid skeletons)

I am wondering, is it possible to partially simulate physics on a skeletal mesh that is not a character?

For example, I have this animated machine, but there are no inertial effects in the animation.

I would like to add partial simulation so that if the engine is deactivated, some inertia remains and it slowly spins down. Likewise, if the gearbox is disconnected from the engine, or is set to neutral, the gears and connected axle do not abruptly halt.

This partial simulation could also be used for simpler things such as doors. I have made purely physics hinge-constraint doors and animated ones, but I want to use both. It doesn’t have to be a constant blend – the simulation could only de/activate at certain times, and this would probably be good enough for my purposes.

I think this is possible because of this: Physics Driven Animation in Unreal Engine | Unreal Engine 5.2 Documentation

Theoretically there isn’t much difference between a humanoid skeleton and this mechanical one… right?
I am sorry if this was discussed before – I could not find it.

Non-organics should not use skeletal meshes.

If you make the thing out of parts as it should be, you can simulate whatever you want.

Also, you won’t have issues with getting the light on them to work correcly.
Particuarly considering you can’t even turn off sub surf scattering on skeletal meshes in at least 5 different engine version of the 4.* lineup…

Ah, hello again :slight_smile:

Here I thought I was doing this the right way by making this mechanism animated, using the montage, using the ABP, …, … and it turns out my old way of doing this with a bunch of in-engine physics constraints is actually the preferred approach?

Each component of these machines is an individual part – sort of. That is the only way I can approach modelling something like that. As a final step before exporting from blender I merge some individual meshes together.
here is how I set it up:

The colored areas I circled are the animated skeletal meshes. The rest is static and unmoving.

I don’t know if that is the most correct way of setting it up, it’s just what worked for me.

The machine featured in the image above – 99% of the time, it is repeating the same motion again and again continuously. It is only on startup and shutdown, or for the transmission, a gear shift, that I would want to see any inertial or simulated effects. The continuous, high-speed nature of the motion is part of why I made it into an animated skeletal mesh.

If there was a way to import an empty skeleton, run animations on it, and dynamically attach or detach the various parts, I’d have done that, but I couldn’t figure it out.

I do have stuff that is entire physics-simulated – pulleys etc.

I have not noticed any lighting issues. What am I not seeing?

For one, you probably won’t in editor.
You have to publish and run it on its own to see whatever the final product will look like.

Though, stuff like shadows on skeletal meshes will be mostly wrong 90% of the time even in editor.

For your machine, I’d suggest just setting it up somewhat realistically.

You can add and initialize a rotator to spin the engine, and you can control the speed of the rotator when you toggle a shut off or shifting.

Beware though.
The engine’s rediculous interpretation/application of motion blur will quickly destroy the visual effect of anything rotating at somewhat elevated speeds.

To habdle those object, you never animate or use physics on them, you create a material that makes them rotate.
Even rotating the verts in the material is a better solution (though im honestly not sure if motion blur would still apply to those or not).

Your bigger wheel seems like a possible candidate for this, so it wont budge or wiggle due to physics.

For the gear coupling, you could create a gear BP and include the rotator, then initialize the rotator speed and direction as exposed variables, or even via parenting;
Parent A to B > B takes speed and direction from A based on Dot product of position between A and B…

Etc.