Reversing Morrowind's formulas

Everything about development and the OpenMW source code.
Post Reply
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Reversing Morrowind's formulas

Post by scrawl »

May I request the spellmaking gold price formula to be researched next?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Reversing Morrowind's formulas

Post by Zini »

I can't find anything about athletics on the wiki. Do I miss something or haven't we started on this skill yet?
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Reversing Morrowind's formulas

Post by sirherrbatka »

The output from the athletics formula is just used to rescale the timing of movement animations. I can't tell exactly because the code is obscure, but the reference position and velocity tracks the root bone. If you jump slightly after you start walking, you jump diagonally because your initial velocity is taken from one of the first few frames of the walk animation which are noticeably asymmetric. It's important to the feeling of movement, though.

The reason weight affects speed and not height is because weight is applied as an rescale on the XY axes of the animation root to make you look "fatter". These are also the directions you move over land, which screws with the velocity calculations. The conceptual part of the bug is that applying non-uniform scale means you can't easily invert matrices with just the transpose anymore, causing problems with any auxillary functions that need to walk back up the heirarchy. In Morrowind, it caused problems with weapon particle emitters (local->world transform to place particles) and projectile aiming (local->world transform to orient arrows). Height rescales the Z axis, which probably makes jumping give you a tiny bit more ground clearance; luckily jumping is mostly kinematics driven.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Reversing Morrowind's formulas

Post by Zini »

Right. More complex than I thought. Sounds backwards though. I would expect the athletics skill to determine the movement speed and the walking animation being adjusted accordingly.
User avatar
Hrnchamd
Posts: 64
Joined: 11 Aug 2012, 00:48

Re: Reversing Morrowind's formulas

Post by Hrnchamd »

scrawl wrote:May I request the spellmaking gold price formula to be researched next?
It's already there on trading and services research.
Zini wrote:Right. More complex than I thought. Sounds backwards though. I would expect the athletics skill to determine the movement speed and the walking animation being adjusted accordingly.
It enables artist control over movement this way. If movement was just a constant velocity, it would feel Quake-like; with animation coupling it allows for uneven gait and accurate positioning when the animation stops. The lack of good animations kind of ruins that advantage, but I think it's important to the movement of Argonians/Khajit. If there was a limping animation, for example, it would work better when animation driven.
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Re: Reversing Morrowind's formulas

Post by Greendogo »

Zini wrote:I can't find anything about athletics on the wiki. Do I miss something or haven't we started on this skill yet?
We've done a lot of work on it, actually. Hrnchamd is right, actual speed is not just a simple function of the "athletics" skill, "encumbrance" amount and "speed" attribute.
User avatar
Hrnchamd
Posts: 64
Joined: 11 Aug 2012, 00:48

Re: Reversing Morrowind's formulas

Post by Hrnchamd »

Animation coupling also allows for knockback and death animations to move actors around with artist-controlled kinematics.

The problem I'm facing is that a lot of the extra code for Bloodmon (like werewolf movement) is directly pasted into the animation code and special cased elsewhere instead of being factored into the normal dispatch on type/flags movement functions.
trikorder
Posts: 44
Joined: 07 Feb 2012, 16:33

Re: Reversing Morrowind's formulas

Post by trikorder »

Hrnchamd wrote:Animation coupling also allows for knockback and death animations to move actors around with artist-controlled kinematics.

The problem I'm facing is that a lot of the extra code for Bloodmon (like werewolf movement) is directly pasted into the animation code and special cased elsewhere instead of being factored into the normal dispatch on type/flags movement functions.
Could you just use Morrowind without Bloodmon to test this?
User avatar
Hrnchamd
Posts: 64
Joined: 11 Aug 2012, 00:48

Re: Reversing Morrowind's formulas

Post by Hrnchamd »

Added what I have of the movement, athletics and speed mechanics. No confirmation about the werewolf or animation parts.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Reversing Morrowind's formulas

Post by Zini »

What happened to our fantastic research team? Everyone on vacation?
Post Reply