Blender

Blender

zeuschrist Sep 20, 2021 @ 7:12pm
trying to understand cameras and stuff like skyrim or gta v
im trying to understand how the camera and animation works for my game. but i cant seem to get an answer i understand. im not exactly a stranger to animation. been at it for a few months but its really difficult to grasp. if anyone could help that would be nice
< >
Showing 1-15 of 22 comments
Could you elaborate which part you struggle the most with?
In games like GTA that use a 3rd person view, the camera is basicly set to track to the player characters facing direction and where the stick/ mouse points, while it is made to also prevent to clip inside the void (i.e inisde of buildings or whatever), this is most often achieved by reducing camera distance to the player. I'm sure you will have noticed this effect in games. I think they code sort of a collision box of the cameras field of view that simply 'dodges' solid objects you are not supposed to see inside.
As far as blender goes, cameras have no restrictions or any scripted behavior since blender isnt a game, but you can have them follow paths, track objects, parent them to something or create a camera rig to mimic production equipment you find on sets to do dolly shots and the like. Further more you can use camera marker to switch/ cut to cameras upon certain frames.
Last edited by *P0P$*FR3$H3NM3Y3R*; Sep 20, 2021 @ 8:27pm
zeuschrist Sep 21, 2021 @ 12:45pm 
Originally posted by *P0P$*FR3$H3NM3Y3R*:
Could you elaborate which part you struggle the most with?
In games like GTA that use a 3rd person view, the camera is basicly set to track to the player characters facing direction and where the stick/ mouse points, while it is made to also prevent to clip inside the void (i.e inisde of buildings or whatever), this is most often achieved by reducing camera distance to the player. I'm sure you will have noticed this effect in games. I think they code sort of a collision box of the cameras field of view that simply 'dodges' solid objects you are not supposed to see inside.
As far as blender goes, cameras have no restrictions or any scripted behavior since blender isnt a game, but you can have them follow paths, track objects, parent them to something or create a camera rig to mimic production equipment you find on sets to do dolly shots and the like. Further more you can use camera marker to switch/ cut to cameras upon certain frames.
its really hard to elaborate but i want to get a view from first person while the character is in view while also being able to go to third person and it look more or less natural. best game i thought of was something like destiny 2.
The Renderer Sep 21, 2021 @ 1:45pm 
I don't really understand what you are trying in general. Blender is not a game engine. Do you want to make a movie/video that looks like a game?
zeuschrist Sep 21, 2021 @ 7:23pm 
Originally posted by The Renderer:
I don't really understand what you are trying in general. Blender is not a game engine. Do you want to make a movie/video that looks like a game?
ok its really hard to put down in words i want to understand how one can have a 1st person view in a game and have 3rd person view that shows the character model. it seems in most games the animation that plays in first person is not the same in third person and im trying to understand how. i dont think i can make it any simpler than that. perfect examples of what i want are something like skyrim. or maybe destiny 2
Imagine it like this:
https://i.imgur.com/NFRek7T.gif
Here's what both cameras would see:
https://i.imgur.com/kclZX6j.gif
As you can see in this simple setup, the only input needed is where the player points his cursor in screenspace.
As a final step, add in a master controller that represents player key inputs like forward/ backward/ strafe. Everything including the mouse target is parented to this master controller. So when hitting the strafe button everything will follow.
https://i.imgur.com/ZQMeGcy.gif

The 1st Person Camera is positioned where the players eyes would be, it tracks to where the player puts its pointer (mouse or controller) in the sceen space plane.
The 3rd Person Camera is parented to the Player character, meaning it's keeping its relative position and distance to the player character. It is also tracking to where the player points. This way the player character always stays in the middle and the camera focuses on where the pointer targets since its position in the parenting hierarchy forces it to copy the players 1st person camera heading, while the tracking makes sure its pointing up or down accordingly.
When the player hits the forward input button, the master controller moves forward in the direction the mouse target is pointing, when the player strafes it simply moves the master controller sideways relative to the mouse pointer plane.
That's the basic principle.

In games there are some extra intricacies as being able to scroll in and out, basicly just changing the distance between the player and the 3rd person camera. Furthermore damped track to constraints to reduce the overshoot when being scrolled far out and as mentioned 'dodging' the solid objects to prevent camera going into the void. Usually cameras in video games are also constrained from pointing directly up or down to prevent gimbal lock.
Usually 1st Person cameras have a narrow field of view (FOV) at around 75-105 degree, while 3rd Person Cameras often have a much wider FOV, like 120-180 degree, hence you can see more of the surrounding.

To get the smooth transition between 1st and 3rd person camera, like in Skyrim, it is simply coded in a way, that upon zooming in the camera simply moves into the defined head position while it also adjusts its properties like field of view in between. Basicly smoothly interpolating between the values of the 1st and 3rd person camera.
Skyrim also allows to rotate the camera around the player either when idling or standing around but as soon as you hit the forward button it will act as a toggle to make the camera follow the player again.

Hope this clears it up a bit. :)
Last edited by *P0P$*FR3$H3NM3Y3R*; Sep 21, 2021 @ 10:09pm
zeuschrist Sep 21, 2021 @ 10:19pm 
Originally posted by *P0P$*FR3$H3NM3Y3R*:
Imagine it like this:
https://i.imgur.com/NFRek7T.gif
Here's what both cameras would see:
https://i.imgur.com/kclZX6j.gif
As you can see in this simple setup, the only input needed is where the player points his cursor in screenspace.
As a final step, add in a master controller that represents player key inputs like forward/ backward/ strafe. Everything including the mouse target is parented to this master controller. So when hitting the strafe button everything will follow.
https://i.imgur.com/ZQMeGcy.gif

The 1st Person Camera is positioned where the players eyes would be, it tracks to where the player puts its pointer (mouse or controller) in the sceen space plane.
The 3rd Person Camera is parented to the Player character, meaning it's keeping its relative position and distance to the player character. It is also tracking to where the player points. This way the player character always stays in the middle and the camera focuses on where the pointer targets since its position in the parenting hierarchy forces it to copy the players 1st person camera heading, while the tracking makes sure its pointing up or down accordingly.
When the player hits the forward input button, the master controller moves forward in the direction the mouse target is pointing, when the player strafes it simply moves the master controller sideways relative to the mouse pointer plane.
That's the basic principle.

In games there are some extra intricacies as being able to scroll in and out, basicly just changing the distance between the player and the 3rd person camera. Furthermore damped track to constraints to reduce the overshoot when being scrolled far out and as mentioned 'dodging' the solid objects to prevent camera going into the void. Usually cameras in video games are also constrained from pointing directly up or down to prevent gimbal lock.
Usually 1st Person cameras have a narrow field of view (FOV) at around 75-105 degree, while 3rd Person Cameras often have a much wider FOV, like 120-180 degree, hence you can see more of the surrounding.

To get the smooth transition between 1st and 3rd person camera, like in Skyrim, it is simply coded in a way, that upon zooming in the camera simply moves into the defined head position while it also adjusts its properties like field of view in between. Basicly smoothly interpolating between the values of the 1st and 3rd person camera.
Skyrim also allows to rotate the camera around the player either when idling or standing around but as soon as you hit the forward button it will act as a toggle to make the camera follow the player again.

Hope this clears it up a bit. :)
wow i think i get it. thanks so much for your help. this was killing me for the last 3 days :D
zeuschrist Sep 21, 2021 @ 10:32pm 
Originally posted by *P0P$*FR3$H3NM3Y3R*:
Imagine it like this:
https://i.imgur.com/NFRek7T.gif
Here's what both cameras would see:
https://i.imgur.com/kclZX6j.gif
As you can see in this simple setup, the only input needed is where the player points his cursor in screenspace.
As a final step, add in a master controller that represents player key inputs like forward/ backward/ strafe. Everything including the mouse target is parented to this master controller. So when hitting the strafe button everything will follow.
https://i.imgur.com/ZQMeGcy.gif

The 1st Person Camera is positioned where the players eyes would be, it tracks to where the player puts its pointer (mouse or controller) in the sceen space plane.
The 3rd Person Camera is parented to the Player character, meaning it's keeping its relative position and distance to the player character. It is also tracking to where the player points. This way the player character always stays in the middle and the camera focuses on where the pointer targets since its position in the parenting hierarchy forces it to copy the players 1st person camera heading, while the tracking makes sure its pointing up or down accordingly.
When the player hits the forward input button, the master controller moves forward in the direction the mouse target is pointing, when the player strafes it simply moves the master controller sideways relative to the mouse pointer plane.
That's the basic principle.

In games there are some extra intricacies as being able to scroll in and out, basicly just changing the distance between the player and the 3rd person camera. Furthermore damped track to constraints to reduce the overshoot when being scrolled far out and as mentioned 'dodging' the solid objects to prevent camera going into the void. Usually cameras in video games are also constrained from pointing directly up or down to prevent gimbal lock.
Usually 1st Person cameras have a narrow field of view (FOV) at around 75-105 degree, while 3rd Person Cameras often have a much wider FOV, like 120-180 degree, hence you can see more of the surrounding.

To get the smooth transition between 1st and 3rd person camera, like in Skyrim, it is simply coded in a way, that upon zooming in the camera simply moves into the defined head position while it also adjusts its properties like field of view in between. Basicly smoothly interpolating between the values of the 1st and 3rd person camera.
Skyrim also allows to rotate the camera around the player either when idling or standing around but as soon as you hit the forward button it will act as a toggle to make the camera follow the player again.

Hope this clears it up a bit. :)
wait are the animations different in skyrim or is that the fov alternating the view.
*P0P$*FR3$H3NM3Y3R* Sep 21, 2021 @ 11:00pm 
The animations are most likely the same in skyrim, the switch between 1st and 3rd person simply changes the camera settings.
With alot of First Person-only games, there isn't even a full character model rendered in the viewport, most often there is just the lower arm for the weapon and a collision box making up the whole player model. This varies tho, some FPS games let you also see feet and legs occassionally.
Last edited by *P0P$*FR3$H3NM3Y3R*; Sep 21, 2021 @ 11:02pm
zeuschrist Sep 22, 2021 @ 8:22am 
Originally posted by *P0P$*FR3$H3NM3Y3R*:
The animations are most likely the same in skyrim, the switch between 1st and 3rd person simply changes the camera settings.
With alot of First Person-only games, there isn't even a full character model rendered in the viewport, most often there is just the lower arm for the weapon and a collision box making up the whole player model. This varies tho, some FPS games let you also see feet and legs occassionally.
So would that mean games like battlefield have a character model thats not completely rendered?
KAT_Editor Sep 22, 2021 @ 8:48am 
In some FPS game player have 2 modes, first model visible only for other players, second model visible only for player (most times its just arms + items), not all FPS works like that, but with that you can avoid some problems.
still__alive Sep 22, 2021 @ 11:23am 
Originally posted by zeuschrist:
Originally posted by *P0P$*FR3$H3NM3Y3R*:
The animations are most likely the same in skyrim, the switch between 1st and 3rd person simply changes the camera settings.
With alot of First Person-only games, there isn't even a full character model rendered in the viewport, most often there is just the lower arm for the weapon and a collision box making up the whole player model. This varies tho, some FPS games let you also see feet and legs occassionally.
So would that mean games like battlefield have a character model thats not completely rendered?

Yes. For some FPS games all they model is the player's hands + weapon.

I think the reason is because when you animate, what looks good in 3rd person might not work and look good in 1st person. I think that games where they use both a 3rd person and 1st person camera actually make two sets of animations, maybe even two sets of models - one animation for 1st person and one animation for 3rd person.

I'll use Vermintide because I'm more familiar with that game. Its a 1st person action game, the focus is mainly on melee combat, but there is a lot of ranged stuff too. So being melee, there are a bunch of combos and different attack animations as you'd expect from a melee game. It's also a coop game.

So in Vermintide what you see as the player is different animations as you attack with different weapon combos. But what the other players see in 3rd person is only one (possible two, one for light attacks and one for heavys) single attack animation. Kerillian has an attack with dual daggers where in first person she flips the daggers to an upside down grip then stabs both daggers downwards at the same time. In 3rd person there is no similar animation, its the same swing animation as all her other attacks. The 1st person animations don't correspond to the 3rd person animations at all.

The Vermintide developers probably could've made animations for every combo for the 3rd person model, but I'm guessing they'd would've had to do two separate sets for every different attack animation. And there is a lot in 1st person - animations are different for every different weapon. But for 3rd person, since that doesn't affect the player directly, just the coop buddies, all that you really need is one animation to communicate that this player is attacking things. Or blocking. So they saved themselves a lot of time by not doing every single attack animation twice.
zeuschrist Sep 22, 2021 @ 6:15pm 
Originally posted by still__alive:
Originally posted by zeuschrist:
So would that mean games like battlefield have a character model thats not completely rendered?

Yes. For some FPS games all they model is the player's hands + weapon.

I think the reason is because when you animate, what looks good in 3rd person might not work and look good in 1st person. I think that games where they use both a 3rd person and 1st person camera actually make two sets of animations, maybe even two sets of models - one animation for 1st person and one animation for 3rd person.

I'll use Vermintide because I'm more familiar with that game. Its a 1st person action game, the focus is mainly on melee combat, but there is a lot of ranged stuff too. So being melee, there are a bunch of combos and different attack animations as you'd expect from a melee game. It's also a coop game.

So in Vermintide what you see as the player is different animations as you attack with different weapon combos. But what the other players see in 3rd person is only one (possible two, one for light attacks and one for heavys) single attack animation. Kerillian has an attack with dual daggers where in first person she flips the daggers to an upside down grip then stabs both daggers downwards at the same time. In 3rd person there is no similar animation, its the same swing animation as all her other attacks. The 1st person animations don't correspond to the 3rd person animations at all.

The Vermintide developers probably could've made animations for every combo for the 3rd person model, but I'm guessing they'd would've had to do two separate sets for every different attack animation. And there is a lot in 1st person - animations are different for every different weapon. But for 3rd person, since that doesn't affect the player directly, just the coop buddies, all that you really need is one animation to communicate that this player is attacking things. Or blocking. So they saved themselves a lot of time by not doing every single attack animation twice.
i thought that might be the case for some games but how would they do that? have two sets animations that are different from what you and what another player sees?
Originally posted by zeuschrist:
i thought that might be the case for some games but how would they do that? have two sets animations that are different from what you and what another player sees?
Yes exactly that.
With coding you always know which is the case, so several sets of models/ animations can exist at the same time. Depending on what mode the player is in it will use whatever set of models/ animations it uses for any given frame of gameplay. A simple example of this are Levels of Detail. Objects increasing/ decreasing in detail depending on the distance to the viewer. Very common in computer games, they simply swap one for the other at predefined threshholds. For example gun models in multiplayerr shooters, the player himself gets to see a shiny highpoly version , complete with relaod animations, shell casings and whatever blinb bling, while an enemy player that never gets very up close to the player gets to see a lowpoly simple version of the players weapon and so forth. It's about ressource management for smooth gameplay.
zeuschrist Sep 22, 2021 @ 7:10pm 
Originally posted by *P0P$*FR3$H3NM3Y3R*:
Originally posted by zeuschrist:
i thought that might be the case for some games but how would they do that? have two sets animations that are different from what you and what another player sees?
Yes exactly that.
With coding you always know which is the case, so several sets of models/ animations can exist at the same time. Depending on what mode the player is in it will use whatever set of models/ animations it uses for any given frame of gameplay. A simple example of this are Levels of Detail. Objects increasing/ decreasing in detail depending on the distance to the viewer. Very common in computer games, they simply swap one for the other at predefined threshholds. For example gun models in multiplayerr shooters, the player himself gets to see a shiny highpoly version , complete with relaod animations, shell casings and whatever blinb bling, while an enemy player that never gets very up close to the player gets to see a lowpoly simple version of the players weapon and so forth. It's about ressource management for smooth gameplay.
ok so im pretty sure i get it. i guess my thing now is how would that would go about. there wouldnt happen to be a video somewhere where it shows something like that?
Originally posted by zeuschrist:
Originally posted by *P0P$*FR3$H3NM3Y3R*:
Yes exactly that.
With coding you always know which is the case, so several sets of models/ animations can exist at the same time. Depending on what mode the player is in it will use whatever set of models/ animations it uses for any given frame of gameplay. A simple example of this are Levels of Detail. Objects increasing/ decreasing in detail depending on the distance to the viewer. Very common in computer games, they simply swap one for the other at predefined threshholds. For example gun models in multiplayerr shooters, the player himself gets to see a shiny highpoly version , complete with relaod animations, shell casings and whatever blinb bling, while an enemy player that never gets very up close to the player gets to see a lowpoly simple version of the players weapon and so forth. It's about ressource management for smooth gameplay.
ok so im pretty sure i get it. i guess my thing now is how would that would go about. there wouldnt happen to be a video somewhere where it shows something like that?
What do you mean? Do you plan to code a game? The actual implementation of these concepts depends on which game engine you would be using.
< >
Showing 1-15 of 22 comments
Per page: 1530 50

Date Posted: Sep 20, 2021 @ 7:12pm
Posts: 22