HDRP camera help

I don’t know how to create first person hands and gun HDRP.

I loaded fps sample to learn how to get depth pass for gun and holding hand.
But, I can’t see how to do it. Scripts on the player don’t work and I don’t know how does camera work.
Please, can someone explain to me how does this camera pass in HDRP work in fps sample?

I think they posted a video on youtube that talks about the first person and the hands (prolly where I know this from.)

I believe we use 1 camera, and the hands/gun are drawn within that camera as a normal model. … … but the render has a tick for “FOV” that makes it render above the rest of the items and excludes collision.

So the FPS Sample does not use TWO cameras like other games do, where you have a scene camera, and a hands/wep camera. Instead the renderer that renders the hands and gun, has a new value “FIRST PERSON FOV” that scales/warps the model from the camera to provide the same effects without the dual camera performance hit.

Run the client in the editor, and go back to the scene view and look at the player, and you will see their hands exist within the world for that single player camera, and not linked to another layer ect.

Good Luck out there!
Micah

1 Like

I can’t get client to work.
Could you post screen in your project of what FIRST PERSON FOV is and how is linked to the gun and holding hand?

The FOV setting on the first person and arms models are not rendering them on top of everything else.
The way it works is that the first person arms and weapon are scaled down to 0.3 on all 3 axis.
Then you add a separate material to them and tick the FOV setting.

What this does is rendering these ate a lower FOV (40 as standard) the the rest of the game making them look as big as normal, even if they are scaled down.

This is way they can get away with using a single camera.

But you can do it however you want as this is not a mandatory method for the FPS sample. It’s just how they did it.

1 Like

Thank you!
Where can I get FOV setting for the material ? I can’t see First person shader perspective asset*.*

5173676--513467--s5.JPG

Is it possible to make in HDRP like they did for lwrp ?

https://www.youtube.com/watch?v=5AmI2yOx0Nc

1 Like

You need to use the correct shader to find the FPS Mode (FOV setting)…

1 Like

@karstenv did they remove that FOV tick? Because in the latest HDRP version I cannot find that tick when creating a HDRP/Lit material (it seems to look the same for everything else though)

I havent used it for a while so im not sure if it got removed. perhaps you can switch to debug mode in the inspector and that will expose all parameters. Maybe they just hid contra removed it?

What is the reason for the weapons to be scaled to 0.3? Is this intentional or is it just because the models are big?

The reason is that by scaling it down by 0.3 you get it back to the original size as the smaller FOV makes it bigger.