Advertisement

Bone Animation, feedback needed

Started by May 10, 2020 04:08 PM
78 comments, last by Calin 4 years, 7 months ago

The performance cost is not much higher than a dead ragdoll, but i need to update physics at 90-120 Hz. Maybe i could go down to 60 now because physics engine has improved a lot. (120 Hz is good - i remember research papers that needed 500 or lots of substeps.)
Back then i assumed to have 10 living ragdolls in a game, which should be enough. The controller can be used to create procedural animation as well, so for distant characters i would not enable physics simulation.

But yes, it's a lot of work and research, and no guarantee it will ever work good enough at all.
Natural Motion is not used that often either, which surely has it's own reasons.

Beside walking you want the character to be in balance when fighting, carrying stuff etc. … and walking on a 3d terrain.

My project`s facebook page is “DreamLand Page”

Advertisement

It is doable in shared computing. The PC of every player takes care only for the simulation of his own character. The changes are streamed to the other players. This way it is about physically emulating your own character and reading the animation of the rest of characters from the network.

If somebody wants to have an avatar with long hairs, his PC will work more than the computer of the player who uses a bald character. If some NVidia Quadro user is streaming something too heavy to you, you can lower his options, and see him in low options. Or, buy a Quadro or 5 Quadros

@joej you conception of the physics of movement is erroneous. I don't say i can do that better (i probably can't). The skeleton works with bones, muscles, levers, deflection, direction change, linear movement, torques and forces, moments, inertness, energy demand to set in and maintain movement. These can be modelled, not only in game programming, also when it comes to explain how organisms make a living. The discipline to study that is called functional morphology or kinesiology.

My idea would be, if you want to model this with a somewhat physical background, you might look at how they explain the functions and morphology of a skeleton.

We're in a good position, compared to a paleontologist. We only have the physical parameters to model. It can get much more complicated ;-)

Edit: but, of course, for most game applications, the standard somewhat robotic movement style will suffice :-)

Calin said:
Beside walking you want the character to be in balance when fighting, carrying stuff etc. … and walking on a 3d terrain.

I made tests on moving platforms like this:

Works on its own, also if the platforms move much faster. I can do this with standing only on one leg and keeping the other pointing towards a target position. Balancing does not become more difficult because of this.

NikiTo said:
It is doable in shared computing.

Not necessary. People always assume this would be super expensive, but it is not. It's just 20 bodies and joints to solve, and change per frame is small. It's not more expensive than any other game using hundrets of rigid bodies.

Green_Baron said:
you conception of the physics of movement is erroneous.

No it's correct. Notice that i use simple models like inverted pendulum. To model balancing it is not necessary to deal with multiple joints and bones, or even individual muscles. It is the sum of all things that matters here. The whole body has only a single center of mass, and you can treat a skeleton as a single rigid body to calculate the necessary ground force to keep it upright, and even to plan basic motion which always has the goal to move that whole body as a single entity.
Individual bones and joints then only matter for the IK solver to calculate a pose that places com and guarantees contact at expected positions.

We would need to talk about more complex tasks where individual muscles or limbs would matter, but balancing is no such complex task. Can't think of a good example, but my stuff would fail on anything that requires intelligence of course.

However, there is research work that does very accurate muscle simulation, but for games that's surely a waste with no win. I'd like to simulate muscles only for graphics purposes. For physics it's enough to set min/max torques per axis so we do not make superman by accident.

JoeJ said:
Not necessary. People always assume this would be super expensive, but it is not. It's just 20 bodies and joints to solve, and change per frame is small. It's not more expensive than any other game using hundrets of rigid bodies.

I think it is expensive. But i could be wrong. I can not radically argue about that.

In 2D animation frame by frame, hand drawn, it is super mega hard to make it look natural. Extremely hard from an artist point of view. In 3D modeling is a little bit easier as you can manipulate accelerating curves. Acceleration is the most important at the moment to make it look natural.

Without acceleration/deacceleration it becomes a robot.

Advertisement

JoeJ said:
Works on its own, also if the platforms move much faster. I can do this with standing only on one leg and keeping the other pointing towards a target position.

Balancing while standing is the core behaviour, combat is a variation of that. If it`s a game however (and even in a movie if you want to cover all scenarios ) units/characters will fall so you need to handle rising back. It`s just a natural consequence of the environment you`re building. You have to go all the way.

My project`s facebook page is “DreamLand Page”

NikiTo said:
Without acceleration/deacceleration it becomes a robot.

The equations of motion for inverted pendulum are a system of position dependent acceleration. This dependency makes it hard, but the result looks very similar to motion of constant acceleration.

So yes, if i would work on procedural animation, i would build it around that. It's the usual easy quadratic equations to get constant acceleration to hit a target in given time, for example. And this looks natural. I'll also use this to control arms of my ragdoll, where no balancing is involved.

In robotics, they often work with constant velocity motors instead, and this is what we perceive as ‘looking robotic’.

I did not know 3D software has acceleration curves now? That's new and sounds a very good idea. I made a walk cycle animation only once but it took 3 days to make it look good.

Calin said:
units/characters will fall so you need to handle rising back.

Yeah that's a good example for problems. Likely i could hardcode stand up bahviors, e.g. if landed on back or belly. But imagine the character falls under a table. Dumb ragdoll is doomed to do embarrassing stuff i guess. Things become hard then… but current game scan't do that either.

Before you can run, you need to "lose" balance toward the direction you want to run.
Running is a special case of displaced center of mass.
This is a small problem in games where fast reaction matters.
In a fantasy game, you can change attack in the middle of the air. But irl, if you are running, and suddenly you want to dodge a car, you will fall. You can dodge it, but you will fall.
The response can not be instant like in current games.

JoeJ said:
I did not know 3D software has acceleration curves now? That's new and sounds a very good idea. I made a walk cycle animation only once but it took 3 days to make it look good.

No need to make it frame by frame anymore.

When you start a movement, there is acceleration, the so called Easy-In, and little bit before you reach your final pose, you start to slow down. So called easy-out. Otherwise it looks robotic. If you emulate one single force field per muscle(no need for millions of muscle fibers), you will get that natural easy-in easy-out movements. This is a nice thing about muscle simulation.

This topic is closed to new replies.

Advertisement