Page 1 of 3

Head bobbing

Posted: 19 May 2019, 17:05
by dreaddymck
Hello all.
Would like an option to enable "head bobbing" for first person movement. Currently using DN 2.2 enhanced but there are issues. Looking for an alternative solution, any recommendations?

Re: Head bobbing

Posted: 20 May 2019, 03:48
by Stomy
I don't believe OpenMW has a proper way of handling this, as it's best done in-engine.

It is something I'd like to have as well though so we could add it as a feature request, though it probably won't be implemented at least until the new scripting system is integrated which is still a while away.

Re: Head bobbing

Posted: 21 May 2019, 18:27
by Strela99
Okay, and if I got things right, finding a way around it or an alternative way to implement head bobbing will be longer and more difficult that waiting for the next feature implementation... It's too bad, but hey, at least it can happen some day.

Re: Head bobbing

Posted: 22 May 2019, 01:29
by Stomy
It revolves around whether we want it to be something controlled by mods, or if we consider it a per-user setting in the cfg file and modders aren't allowed to touch it (for accessibility reasons, this might actually be the better idea). If it's the latter, then I could set up head-bobbing in time for the next release no-problems, but it's not my call alone to make.

Re: Head bobbing

Posted: 22 May 2019, 03:35
by wareya
head bobbing makes lots of people nauseous, it should never not be disableable, yes

Re: Head bobbing

Posted: 22 May 2019, 05:57
by Chris
I'd definitely go with the latter option, a cfg setting that mods can't override. IMO, it should also only apply when the actor the camera is attached to is on the ground (i.e. not swimming, levitating, or no-clipping).

Re: Head bobbing

Posted: 22 May 2019, 06:35
by raevol
wareya wrote: 22 May 2019, 03:35 it should never not be disableable
Couldn't agree more. It doesn't make me nauseous, but it makes games unplayable for me.

Re: Head bobbing

Posted: 22 May 2019, 08:40
by Stomy
On that we can all agree then, I would make the head bobbing disabled by default regardless.

The other question then is whether we want it to be driven by an animation, or for it to be parametric and done purely within the engine itself. Skyrim I'm pretty sure uses an actual animation for its head bobbing, while Oblivion's is so simplistic it could be either way. I'm personally partial to a Thief 2 style head bob that I tend to emulate in my personal projects.

We could eventually allow either, and make the option a three-way selection like how Strength for Hand-to-Hand works (Off, On, On excluding Werewolves / Off, Parametric, Animation), with a warning in the popup that the Animation version requires the presence of an appropriate animation group. But for now the Parametric way is a cinch to implement and I could have something ready to show this week. The animated form would have to wait however until someone makes a fallback animation as I'm not very familiar with creating animations for Nif format.

Re: Head bobbing

Posted: 22 May 2019, 12:18
by wareya
Chris wrote: 22 May 2019, 05:57 I'd definitely go with the latter option, a cfg setting that mods can't override. IMO, it should also only apply when the actor the camera is attached to is on the ground (i.e. not swimming, levitating, or no-clipping).
Isn't it technically possible for custom animations to add head bobbing right now? Does this interact with issue 4448 (https://gitlab.com/OpenMW/openmw/issues/4448)?
Stomy wrote: 22 May 2019, 08:40 The other question then is whether we want it to be driven by an animation, or for it to be parametric and done purely within the engine itself. Skyrim I'm pretty sure uses an actual animation for its head bobbing, while Oblivion's is so simplistic it could be either way.
Parametric headbob is easier to implement and has less problems. You don't want the view to suddenly teleport a few units over to the side and stop moving because an animation got cancelled, for example. And if you just have the headbob be its own singular animation (or animations) with a bunch of inter-animation blending so that you don't have that kind of problem, then you might as well just be going parametric.

Re: Head bobbing

Posted: 22 May 2019, 12:42
by Stomy
wareya wrote: 22 May 2019, 12:18 Parametric headbob is easier to implement and has less problems. You don't want the view to suddenly teleport a few units over to the side and stop moving because an animation got cancelled, for example. And if you just have the headbob be its own singular animation (or animations) with a bunch of inter-animation blending so that you don't have that kind of problem, then you might as well just be going parametric.
That's how I see it too, I'll set up some parameters I think look tasteful as defaults. I wouldn't discount animation-based entirely as a future modder with a lot of attention to detail could potentially make something that looks really good, but in the meantime I'd be fine myself with only parametric or off.
Chris wrote: 22 May 2019, 05:57 it should also only apply when the actor the camera is attached to is on the ground (i.e. not swimming, levitating, or no-clipping)
Don't worry, I wouldn't be able to sleep at night if I allowed myself to make head-bobbing run while levitating or tcl-ing. For swimming though, a small amount of vertical bob wouldn't look too out of place to simulate a breast-stroke.
wareya wrote: 22 May 2019, 12:18 Isn't it technically possible for custom animations to add head bobbing right now?
They should be able to, you just change first-person movement animations to move the camera the way falling-over and stagger animations do. They do have a big flaw though in that they'd be driven by movement speed which has no inertia in Morrowind, you'd get very sudden and janky starts and stops. This could be mitigated with an alternate character controller that includes acceleration and friction, but with a proper implementation we can just simulate this for the head bob whether the character controller is changed or not.