Search Unity

HDRP & Multiple Cameras

Discussion in 'Graphics Experimental Previews' started by CortiWins, May 20, 2019.

  1. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    38
    So what's the state of art now when it comes to using a gun-camera in an FPS with HDRP?
    • Stacking cams doesn't work anymore.
    • Does a solution exist?
     
    Zipe92, Incar_Jack and Jack31081988 like this.
  2. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    131
    In hdrp 4.10 you can write PP effect for this. In the 5.+ we can't do even that, because PPv3 is not extensible and PPv2 doesn't work, so I see no solution right now.
     
  3. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    441
    Was just about to create a thread on this too.

    In some threads, people have mentioned workarounds to camera stacking/multiple cameras, but those workarounds have their own set of problems.

    LWRP is getting its own workflow for camera stacking, but how about HDRP?

    How can we get different post processing with UI vs game world?
     
  4. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    38
    So people doing FPS with HDRP have now all their weapons clipping into walls and thinking "oh maybe unity will fix it some day?" There has to be a way. How does the Unity FPS Sample do it?
     
  5. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    548
    FOV change in shader for the hands and weapons
     
    CortiWins likes this.
  6. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    38
    Thanks for the answer! I guess i'm not experienced enough to understand what that means and how to replicate it. Does a guide exist for that? Didn't find anything on youtube.
     
    GileanVoid likes this.
  7. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    276
    in the fps project that unity has on github there is a shadergraph for the first person weapon models that changes the fov. its worth checking out as it pretty much negates the need for a second camera solution(for weapons at least).
     
  8. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    441
    The FPS example seems great for overlaying something in front of the view, but what about for far away objects?

    For example, planets and other distant objects in space. This is trivial with camera-stacking and sort order, but how would you accomplish this in HDRP? Objects with huge scale at extreme distances means extremely far clip plane and problems associated with that. Doing it via render textures causes a lot of other problems as well.

    Is there or will there be a method of handling this elegantly in HDRP?
     
  9. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    441
    Can any Unity HDRP dev give a suggestion of how to accomplish the above? Thanks.
     
  10. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    479
    Use a skybox
     
  11. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    441
    Thanks. The background objects are loaded individually and dynamically based on certain things, and some of them move slightly, so I can't put them in a skybox.

    Anyway, for now I'm able to use a really large far clip plane. This causes problems with shadow flickering, but it's something I can try to minimize by messing with the near clip plane.