Skip to main content
GameDev.net gamedev.net
🔒 Locked

Bodycam-style realistic head-bobbing motion for first-person controllers?

Started by Josh Klint Jan 2 at 7:09 PM 4 replies 1.9k views
Original Post
Josh Klint
Josh Klint

I was impressed when I first saw the bodycam-style camera motion demos a couple years ago. I assumed I would be able to find something like this in the unity or unreal market places, but they are like ghost towns. I am not looking for a handheld camera overlay, I am looking for realistic motion, whether it's based on mocap data or procedural.

https://www.youtube.com/watch?v=otu_iFTivQw

Can anyone point me towards some resource for this, or do I need to record my own?

JoeJ
JoeJ

Ha, i have never noticed this game has some advanced head bobbing. And personally i'm quite critical. I don't like it when games mess around with my camera. So i'd want to play the game before trying something similar.

However, rewatching the video it seems the head (actually the whole spine) is bending over edges which might block view otherwise. Which is predictable and might feel good. But i can't tell what they do regarding more details.

or do I need to record my own?

You could just use any motion captured clip and mount the camera to the head bone.

I remember Star Citizen devs trying this, and talking about results. It felt very bad and they gave up on the idea.

I'm convinced a procedural system is the better way to make this work well.

Aressera
Aressera

First, question whether you really want something like that. Every time I've ever seen “realistic” camera motion it ends up making me (and probably others) feel sick. Strong camera motion that is not directly controlled by the player has that tendency. It's the same effect that causes VR to make people feel sick if the FPS is not high enough. A mismatch between what the player sees on screen and their vestibular system causes the body to think it has been poisoned, which causes nausea (to vomit up the poison).

The key thing to realize is that the human visual system has built-in stalibization that counteracts the natural motion of the body while moving. The head and neck will automatically adjust height and orientation to maintain their view on the current world-locked point of fixation. The eyes' gaze direction also compensates for head movement to keep the image stable on the retina. The eyes view the world in short snapshots (saccades), with no vision between. This is important for clear vision. If these stabilization systems didn't exist, vision would be a blur under any kind of motion.

So, assuming you are trying to replicate a truly realistic camera system, you need to model this stabilization. For instance, you might control the body pose by animations or some other physics-based method, but use a custom controller for the head/camera position that implements position and orientation stabilization. The body moves in a realistic way (e.g. motion capture), but the head tries to maintain a stationary gaze direction (in world space) as much as possible by applying rotation/translation within reasonable limits. For example, you might allow the head to move +/- 5cm in any direction, or to rotate +/- 110 degrees around the vertical axis, or +/- 40 degrees around the horizontal axis. The player's control of the camera adjusts the target world-space gaze direction for the head.

This topic is also intrinsically linked with how your character controller is implemented. Currently, I favor a physics-based controller which is a body-sized capsule (1m height, 0.2m radius) that floats above the ground at leg height (1m). Each leg uses ray casts to find and maintain valid footholds. A kind of damped spring PID controller is used to maintain the desired body height above the ground by applying forces and torques. Forces are also used to drive movement and friction. Since everything is physics-based, the motion is always smooth, which is much nicer than the jerky instantaneous motion most games seem to have. The head is located at the top of the body capsule, and it uses the stabilization system described above to maintain the user's desired gaze direction. This works really well. There is some natural motion and head bob caused by the foot stepping, but it is smoothed out by the stabilization. It's a good middle ground between extreme camera bob and none at all.

RmbRT
RmbRT

You get automatic vision correction from sensory feedback & bodily self-awareness, just like how doves bob their head around without getting dizzy. But in a video game, you don't have bodily awareness, or control over posture and the body and the limbs. And you don't feel the motion of the body, or the shape of the terrain, etc. So really, the brain has none of the natural sensations that let it adjust to camera bobbing.

I think bobbing viewmodels work very well, though, because they don't trip up spatial awareness.

Another thing I noticed is that it seems like they put a cap on the turn rate of the player. This means you can't just 720° noscope, but are tied to realistic maneuvers. I ranted about that in some old thread already. I think far more immersive than head bobbing that breaks sustained spatial awareness, stuff like accuracy penalties during movement or turning, and turn rate limits, might add more realism to FPSs in a way that does not cause cognitive strain. And it also makes those games less “sweaty” or what they call it.

Walk with God.
JoeJ
JoeJ

I share the concerns, but maybe they have figured out a way to do it right.

Without playing we can not tell if they take away camera control from the player at all. Instead, they may make the spine lag behind the head, and calculating camera tilt from that. (They might also show different behavior when strafing, i guess)

Also, FPS camera means we control just two Euler angles. The 3rd is unused (what i call 'tilting'), and maybe we can use it to implement cool effects or feedback to the player. It does not affect aiming, since camera forward vector remains the same.

Bringing more attention to weapon reloading also does not require to mess up forward direction. Instead they could just move the focal point up in the image, so more stuff below becomes visible. (Like some 2.5d games did to fake looking up and down)

It's interesting. I'll definitively check out the game when it comes out.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.