#HDRP camera stacking

1 messages · Page 1 of 1 (latest)

graceful helm
#

Hello.
I am working on a mech game like Titanfall.

The Player or pilot sits inside a "closed" cockpit. The environment is visible though monitors.

The problem I have:

  • render the cokpit on top of everything (above the mech arms and weapons; see images)
  • make the players/pilots FOV independent from the environment view.

Now I have NO idea how to make it work in HDRP. Camera stacking is not supported OR it is way too expensive.

I already tried a multiple camera set up but it ruins the performance - I don't want to use it.
I tried custom passes to render the cockpit on top of the world (without success) but the problem of the pilot FOV would still exists.
I tried a fake cockpit with a rendered cockpit image set in screenspace-overlay but it looks not really realistic, the other UI elements can't placed in worldspace anymore and it won't affected by environment lighting...

Any ideas are highly appreciated - I am close to losing my mind...

Thanks

(The images shows a prototype scene and not exactly the actual models)

weary dune
#

You can fake firstperson fov pretty effectively just by scaling meshes relative to camera's forward axis

graceful helm
weary dune
weary dune
graceful helm
weary dune
#

Forced render order makes the problem worse because there's nothing to prevent the viewmodels from clipping into the lights (or into other geometry messing up shadowcasting also)

#

The usual solution is to make the lighting vague enough that these mismatches will not be noticeable
https://youtu.be/11sLIyw0pWQ?t=1436
(This is made for unreal but the concepts are the same)

graceful helm
weary dune
graceful helm
graceful helm
weary dune
#

I think older games had less issues with it because lighting and shadows have gotten significantly more complex and "realistic" each generation, so the techniques that used to work for viewmodels have become somewhat incompatible

graceful helm
weary dune
#

Examining references could be helpful too
I'd wager Titanfall games for example probably fake light interaction and shadows with the mech viewmodel parts, or do them in some very vague way

graceful helm
weary dune
graceful helm
# weary dune The difference between "actual full body" and "fps arms" is more or less arbitra...

Hey,
a small update in case you're interested:
I managed to make it work. (The image is just a prototype and not the final result I'd like to archive)
I tried many things and ended up using a two camera setup (sadly).

It's working.
However I'm sure that I'll switch to URP soon to use the native camera layer setup.
It's definitely better to have two cameras in URP rather than in HDRP....

Thanks again for your time and help

weary dune
graceful helm
weary dune
#

Seems like there'd be no downside

graceful helm
weary dune
#

A camera stack can be convenient if there's a lot of different things to render that would be tedious to do with Render Objects, or if camera features like frustum culling or excluding post processing are needed
But otherwise it can be a bit wasteful or less flexible