Forums Gallery Downloads LOGIN |REGISTER

3rd Person Player model in 1rst Person view

Topics about 3DS Max, Maya, Photoshop, and various other software packages.


 

User avatar
Wisdomcube2000
Just getting started
Just getting started
 
Posts: 27
Member since: 17.08.2011, 17:25
Likes: 0

3rd Person Player model in 1rst Person view

Postby Wisdomcube2000 » 06.02.2012, 23:55

Well as the title says, I would like to know how to use a third person player model in first person view. Or in other words, I would like to be able to look down towards the ground and be able to see my characters body/legs. Hopefully this is possible/not too hard. Btw sorry if this is the wrong location for this thread as I wasn't too sure of where it would fit best.

But anyway, thx in advance :))
User avatar
AltairzShadow51
Developer
Developer
 
Posts: 208
Member since: 19.01.2012, 18:39
Location: Shadow-City
Likes: 0

Re: 3rd Person Player model in 1rst Person view

Postby AltairzShadow51 » 07.02.2012, 00:07

Well,You could add a camera change script?
Contact Shadow-Tech:
Website: http://ShadowTechStudios.wordpress.com
Personal email: AltairzShadow@hotmail.co.uk
Shadow-Tech Email: Shadow_Tech_Studios@hotmail.co.uk
Skype: AltairzShadow51
Steam: AltairzShadow510
User avatar
Wisdomcube2000
Just getting started
Just getting started
 
Posts: 27
Member since: 17.08.2011, 17:25
Likes: 0

Re: 3rd Person Player model in 1rst Person view

Postby Wisdomcube2000 » 07.02.2012, 02:39

AltairzShadow51 wrote:Well,You could add a camera change script?


I'm not sure I understand what your saying. I just did a quick search for what you said, but they were all for making the game into a 3rd person. I want it to be 1rst person just with the added body/limbs when you look around. So yeah if you could clarify/explain this, that would be great.

thx again
User avatar
Wisdomcube2000
Just getting started
Just getting started
 
Posts: 27
Member since: 17.08.2011, 17:25
Likes: 0

Re: 3rd Person Player model in 1rst Person view

Postby Wisdomcube2000 » 09.02.2012, 00:13

So can anyone help me out here?
User avatar
SnowGecko
Not my first Rodeo
Not my first Rodeo
 
Posts: 461
Member since: 30.06.2011, 13:37
Location: Ottawa, Ontario - Canada
Likes: 5

Re: 3rd Person Player model in 1rst Person view

Postby SnowGecko » 09.02.2012, 02:52

I completely under stand what you are asking and would love to see this done more. You will. Probably need to set up a camera in the engine to do this using code so in third person you will actually see through the new camera.
Image
User avatar
Wisdomcube2000
Just getting started
Just getting started
 
Posts: 27
Member since: 17.08.2011, 17:25
Likes: 0

Re: 3rd Person Player model in 1rst Person view

Postby Wisdomcube2000 » 10.02.2012, 06:57

SnowGecko wrote:I completely under stand what you are asking and would love to see this done more. You will. Probably need to set up a camera in the engine to do this using code so in third person you will actually see through the new camera.


Alright thx, I guess I'm off to mess with the code for a bit tomorrow. I'll have to let you know how it goes, and if it works well I'll post what I did for anyone else looking into this. :))
DeadCityGames
Just getting started
Just getting started
 
Posts: 10
Member since: 22.09.2011, 17:15
Likes: 0

Re: 3rd Person Player model in 1rst Person view

Postby DeadCityGames » 10.02.2012, 15:01

The cryengine 3 should already be set the first person view as default just change the model to your own then go into game mode.
User avatar
the_grim
Superstar Dolphin
Superstar Dolphin
 
Posts: 9884
Member since: 16.08.2004, 10:46
Location: Finland
Likes: 189

Re: 3rd Person Player model in 1rst Person view

Postby the_grim » 10.02.2012, 21:01

Cryengine hides all attachments in the player character in the first-person view, and the default player model is built so that the base character is only an empty skeleton and ALL parts (shoes, legs, torso, hands, head) are attachments. This means that nothing will show in the first-person viewport. The player character in Crysis had the nanosuit legs as the base mesh and the upper body as attachment, so the legs would show in the FP viewport.

In order to display the player body in the free SDK you'd need to create a new player character which has the player model's legs (Objects/Characters/Agent/legs.chr) as the base mesh and the rest of the body as skin attachments. You can do this in the Sandbox character editor: open Legs.chr and then add the rest of the body as skin attachments and they should automatically be in the right place. Save the character (for example "player.cdf").

Then you need to open Scripts/Entities/actor/player.lua in Notepad and change "fileModel" and "clientFileModel" to your new character. (example: fileModel = "Objects/Characters/Agent/player.cdf"). You guessed it: this will tell the engine which model it should use for the player. ;)

Last, go to Objects/Characters/Agent and make a copy of skeleton_character.chrparams and skeleton_character.cal and rename them to legs.chrparams and legs.cal. This will copy all the parameters that control the character's animations, from the base character that's in the default player model (skeleton_character.chr) to be used with the base character you used for the new player model (legs.chr).

The result:
playerlegs.jpg

Legs show fine and animations work, but because the shoes were a separate attachment (and were thus hidden) it looks like the player's legs are chopped off at the ankles. :P This means you need to model and rig your own player character that has complete legs.


An easier alternative is to use the third-person Gears Of Crysis (GOC) mode, and adjust the camera location so it's at the player's head position instead of being a couple meters back. ;)

Use these console commands:

g_tpview_enable 1 (this enables usage of third-person view without having to press F1)
g_tpview_control 1 (this actually sets the third-person view)
g_tpview_force_goc 1 (this forces GOC mode which allows adjusting the camera position for an "over the shoulder" view - alternative is goc_enable 1)

goc_targetx 0 (default 0.5; camera is offset 0,5 metres to the RIGHT from the player)
goc_targety 0.3 (default -2.5 which would be 2,5 metres BEHIND the player)
goc_targetz 0.3 (default 0.2 I think, this means 0,2 metres HIGHER than the player head)

Result:

player_gocmode.jpg


Enjoy! :) Please note that this alternative may cause clipping and glitches since the third-person animations are not completely in sync with the player camera movements. This is why you can't have goc_targety and goc_targetz at zero which would be the player head - due to third-person walking and running animations parts of the player body and head will occasionally show through the camera. Even with the settings above the body may clip through the camera when running or turning.

You can of course make a custom player model that has no head and hence won't cause clipping. Th player shadow will betray this cheat though.

Also note that the free SDK doesn't have proper animations for proning, so while you can go prone (Z) the player model will still be standing up which can look ugly when looking up at prone stance. :P The shadow shows the standing character even without GOC mode.




There are some downsides to this method, mainly stuff that won't work properly since you're not technically in first-person view anymore (for example aiming might be hard, and it's pretty much impossible to pick up small objects since the crosshair isn't exactly where you'd think it is) so if you're making a proper game it's advisable to use the actual first-person mode with a custom model instead of this hack. ;)
User avatar
Zengotten
Just getting started
Just getting started
 
Posts: 29
Member since: 08.10.2008, 01:42
Location: California
Likes: 0

Re: 3rd Person Player model in 1rst Person view

Postby Zengotten » 11.02.2012, 00:22

How would you go about attaching the camera to the head of the character so that when you run and move around the camera moves with the head and thus no clipping happens?
User avatar
Wisdomcube2000
Just getting started
Just getting started
 
Posts: 27
Member since: 17.08.2011, 17:25
Likes: 0

Re: 3rd Person Player model in 1rst Person view

Postby Wisdomcube2000 » 11.02.2012, 01:57

the_grim wrote:Cryengine hides all attachments in the player character in the first-person view, and the default player model is built so that the base character is only an empty skeleton and ALL parts (shoes, legs, torso, hands, head) are attachments. This means that nothing will show in the first-person viewport. The player character in Crysis had the nanosuit legs as the base mesh and the upper body as attachment, so the legs would show in the FP viewport.

In order to display the player body in the free SDK you'd need to create a new player character which has the player model's legs (Objects/Characters/Agent/legs.chr) as the base mesh and the rest of the body as skin attachments. You can do this in the Sandbox character editor: open Legs.chr and then add the rest of the body as skin attachments and they should automatically be in the right place. Save the character (for example "player.cdf").

Then you need to open Scripts/Entities/actor/player.lua in Notepad and change "fileModel" and "clientFileModel" to your new character. (example: fileModel = "Objects/Characters/Agent/player.cdf"). You guessed it: this will tell the engine which model it should use for the player. ;)

Last, go to Objects/Characters/Agent and make a copy of skeleton_character.chrparams and skeleton_character.cal and rename them to legs.chrparams and legs.cal. This will copy all the parameters that control the character's animations, from the base character that's in the default player model (skeleton_character.chr) to be used with the base character you used for the new player model (legs.chr).

The result:
playerlegs.jpg

Legs show fine and animations work, but because the shoes were a separate attachment (and were thus hidden) it looks like the player's legs are chopped off at the ankles. :P This means you need to model and rig your own player character that has complete legs.


An easier alternative is to use the third-person Gears Of Crysis (GOC) mode, and adjust the camera location so it's at the player's head position instead of being a couple meters back. ;)

Use these console commands:

g_tpview_enable 1 (this enables usage of third-person view without having to press F1)
g_tpview_control 1 (this actually sets the third-person view)
g_tpview_force_goc 1 (this forces GOC mode which allows adjusting the camera position for an "over the shoulder" view - alternative is goc_enable 1)

goc_targetx 0 (default 0.5; camera is offset 0,5 metres to the RIGHT from the player)
goc_targety 0.3 (default -2.5 which would be 2,5 metres BEHIND the player)
goc_targetz 0.3 (default 0.2 I think, this means 0,2 metres HIGHER than the player head)

Result:

player_gocmode.jpg


Enjoy! :) Please note that this alternative may cause clipping and glitches since the third-person animations are not completely in sync with the player camera movements. This is why you can't have goc_targety and goc_targetz at zero which would be the player head - due to third-person walking and running animations parts of the player body and head will occasionally show through the camera. Even with the settings above the body may clip through the camera when running or turning.

You can of course make a custom player model that has no head and hence won't cause clipping. Th player shadow will betray this cheat though.

Also note that the free SDK doesn't have proper animations for proning, so while you can go prone (Z) the player model will still be standing up which can look ugly when looking up at prone stance. :P The shadow shows the standing character even without GOC mode.




There are some downsides to this method, mainly stuff that won't work properly since you're not technically in first-person view anymore (for example aiming might be hard, and it's pretty much impossible to pick up small objects since the crosshair isn't exactly where you'd think it is) so if you're making a proper game it's advisable to use the actual first-person mode with a custom model instead of this hack. ;)


Wow how incredibly informative! Thanks aton man :love:
Will definitely have to follow that through, ill keep this thread updated when I'm done, maybe release a sample for others to mess with. :)

But again, thank you my good man, you have saved me a fair bit of trouble here :]
User avatar
tinypaperclip
Junior Dev
Junior Dev
 
Posts: 157
Member since: 26.12.2011, 03:56
Location: The Netherlands
Likes: 1

Re: 3rd Person Player model in 1rst Person view

Postby tinypaperclip » 11.02.2012, 02:24

I'd guess attach a camera entity to the head bone but there's no bone that's used for the camera orientation as far as I know. the up-down movement isnt 100% accurate, turning always is though.

Thanks grim, followed your tut just for giggles since I didn't even notice we didn't have FP body in freeSDK :P
(╯°□°)╯︵ ┻━┻

Angry coffee table flip attack!
User avatar
Zengotten
Just getting started
Just getting started
 
Posts: 29
Member since: 08.10.2008, 01:42
Location: California
Likes: 0

Re: 3rd Person Player model in 1rst Person view

Postby Zengotten » 11.02.2012, 03:03

How would I go about attaching a camera entity to the head bone? And when it is attached how would I be able to make it be used as the players view?
User avatar
tinypaperclip
Junior Dev
Junior Dev
 
Posts: 157
Member since: 26.12.2011, 03:56
Location: The Netherlands
Likes: 1

Re: 3rd Person Player model in 1rst Person view

Postby tinypaperclip » 11.02.2012, 03:21

in the trackview editor set it as a loop to view through that certain camera, and to attach the camera to a bone you have to link it through a flowgraph. I'd go more indepth if it weren't 2 AM by now.
(╯°□°)╯︵ ┻━┻

Angry coffee table flip attack!
User avatar
ultranew_b
Producer
Producer
 
Posts: 1389
Member since: 04.04.2010, 18:17
Location: Canada Eh !
Likes: 21

Re: 3rd Person Player model in 1rst Person view

Postby ultranew_b » 11.02.2012, 07:03

tinypaperclip wrote:in the trackview editor set it as a loop to view through that certain camera, and to attach the camera to a bone you have to link it through a flowgraph. I'd go more indepth if it weren't 2 AM by now.



Here is a post with steps to creating it:

viewtopic.php?f=322&t=69587&hilit=1st+person+camera+view
Image
User avatar
DURLI
Not my first Rodeo
Not my first Rodeo
 
Posts: 545
Member since: 21.10.2009, 19:52
Location: Slovakia, EU
Likes: 6

Re: 3rd Person Player model in 1rst Person view

Postby DURLI » 11.02.2012, 11:07

Thank you very much the_grim ! Your answer covers all my questions :)


 
Connect and collaborate with CRYENGINE developers in the official Forums.
Visit the Gallery to share what you have created and be inspired by what others are creating with CRYENGINE.
Community