Head bobbing

Feedback on past, current, and future development.
User avatar
Stomy
Posts: 47
Joined: 11 Dec 2018, 02:55
Location: Fhloston Paradise!
Contact:

Re: Head bobbing

Post by Stomy »

I've got a first pass at head bobbing on GitLab, here's a brief video demonstration on discord.

As it stands though I'm not quite happy with how it interferes with weapon bobbing and footsteps, as it's not fully in sync with first person animations, and to put it in sync would be really jarring and frankly ruin the effect. So to that end I'm thinking I'll add some more options before marking it ready:
  • Off (Default)
  • On (with loaded first person animations)
  • On, Weapon Walk Paused (first person walking animations aren't played, footstep sounds are based on head bob instead)
  • On, Weapon Walk Hardcoded (first person walking animations replaced with parametric weapon bobbing matched to head, with added turning inertia, also configurable in cfg)
I'm thinking I'll also add additional options for head-bobbing while swimming, and some slight camera bounce when jumping and landing.
thephantomfiddler
Posts: 32
Joined: 06 Mar 2019, 01:03

Re: Head bobbing

Post by thephantomfiddler »

Honestly makes me a bit dizzy to look at.
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Head bobbing

Post by raevol »

That's funny, I was going to say it looks way better than I anticipated. Still not my style, but cool to see a feature like this in place.
mistermoonshine
Posts: 30
Joined: 03 Apr 2018, 20:35
Location: Ireland

Re: Head bobbing

Post by mistermoonshine »

I actually really like it
User avatar
wareya
Posts: 338
Joined: 09 May 2015, 13:07

Re: Head bobbing

Post by wareya »

Oh yeah, weapon sway is a pretty integral part of viewbob not looking janky. In fact it's probably the most important part. Also, some games make the view "crunch" or "spring" when you land from jumps.
User avatar
Stomy
Posts: 47
Joined: 11 Dec 2018, 02:55
Location: Fhloston Paradise!
Contact:

Re: Head bobbing

Post by Stomy »

I ended up keeping it much more simple, I added a separate hand bob over the top of the existing animations and I think it ends up looking quite natural after all: here it is in motion.

There's also landing bounce, some extra sway from movement inertia, and toggling sneak while head bobbing is on causes it to be a quick transition instead of an instant offset.

I'm pretty happy with it now, what do all of you think?
fredzio
Posts: 9
Joined: 12 Apr 2019, 05:56

Re: Head bobbing

Post by fredzio »

Stomy wrote: 25 May 2019, 11:42 I'm pretty happy with it now, what do all of you think?
Looks pretty neat :)
User avatar
wareya
Posts: 338
Joined: 09 May 2015, 13:07

Re: Head bobbing

Post by wareya »

It has a bobrate limit, right? Last thing I want is for my viewmodel to vibrate wildly when I have 10000 speed.

Also, the viewbob itself doesn't happen while in the air, right?
User avatar
Stomy
Posts: 47
Joined: 11 Dec 2018, 02:55
Location: Fhloston Paradise!
Contact:

Re: Head bobbing

Post by Stomy »

There's no bobrate limiting as it would get out of sync with the footstep sounds. The bob depth however has a soft cap at 400 movespeed (corresponds to running with about 70 Speed + 70 Athletics), after which it weakens asymptotically towards zero. As you go higher and higher you stop seeing it, I can't even tell at 10000 Speed.

It does still bob when levitating if your feet are touching the ground. But if you're jumping, levitating up in the air, swimming, or no-clipping it doesn't happen.
User avatar
wareya
Posts: 338
Joined: 09 May 2015, 13:07

Re: Head bobbing

Post by wareya »

Stomy wrote: 25 May 2019, 15:26 There's no bobrate limiting as it would get out of sync with the footstep sounds.
That's not better than having everything onscreen flicker back and forth randomly at at min(fps, refreshrate), which can trigger people with sensory sensitivity problems, like myself (though it's not epilepsy, it's related to ADHD). Make a hard bobrate limit of something like 10hz or 20hz in terms of full bob cycles or something like that, IMO.

>after which it weakens asymptotically towards zero

Oh, so the amplitude of the bobbing fades out? That might work. I'd have to try it out. Might as well limit the rate as well at that point, if you ask me...

>It does still bob when levitating if your feet are touching the ground. But if you're jumping, levitating up in the air, swimming, or no-clipping it doesn't happen.

I agree with that combination of behaviors.
Post Reply