Search Unity

[FPS Render] First Person View 2.0 - No Clipping, Environment Shadow Support and Independent FoV

Discussion in 'Assets and Asset Store' started by eskovas, Sep 23, 2015.

  1. SamuelRoos

    SamuelRoos

    Joined:
    Dec 16, 2015
    Posts:
    9
    How am I able to make the Unity's built-in Particle Additive shader (and other particle shaders) to work with FPV?

    I followed the manual and it told that to implement other shaders with FPV, the following process is similar for all shaders;

    We add the “#pragma multi_compile __ FIRSTPERSONVIEW” and “#pragma multi_compile __ FPV_Light” to the CGINCLUDE section of the shader.
    We then add the tag “RenderType”=”FPV” to the tags section of the SubShader.

    This didn't work for me, though particles with the Alpha Blended shader which is included in FVP do work.

     
  2. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,341
    I just tested picking up the Particle Additive Shader from Unity's Built-in shaders, making those changes, putting the shader inside the folder with the custom UnityShaderVariables and re-compiling. It's working fine on my end.

    Note that for shaders with softparticles on, you will need to do some tuning to that value because of the custom projections FPV uses to achieve the effect, so you'll need to increase the "Soft Particles Factor" (maybe even above the default limit) in those shaders (if you want soft particles).
    Even then, you might not be able to see those particles if you are very close to a wall, because the softparticles just blends them in due to the very low distance to the wall. If that's a problem, try changing to a shader that does not have softparticles on, and make sure it doesn't intersect your FPV objects. Should result in a similar effect and not blend with world objects

    Also, be sure to put the shader inside the folder with the custom UnityShaderVariables and hit re-compile.
     
    Last edited: Dec 31, 2018
    SamuelRoos likes this.
  3. xkinginthecastlecastlex

    xkinginthecastlecastlex

    Joined:
    Nov 7, 2018
    Posts:
    86
    Hi there,
    First Person View 2 is exactly what I am looking for, however I am using Unity 2018.3 and it looks like the current ver. 2.1.2 supports only 2018.1 ?

    Is there an update planned for Unity 2018.3?
     
  4. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,341
    Hello everyone.

    I'm pleased to announce that i'm working on a new First Person View 3 HDRP version.
    It will be easier to setup and use, and won't have issues with the HDRP temporal post process effects like TAA.

    It's based on the solution of the FPS Sample (shader based), but with some modifications and easy workflow just like FPV2.
    Here's a quick video i posted on my Twitter, where the FOV of the weapon changes when aiming:

    https://twitter.com/Tiago11F/status/1166116286851616769
     
    Weendie-Games likes this.
  5. BeRtRoLlT

    BeRtRoLlT

    Joined:
    Nov 8, 2017
    Posts:
    2
    Hey,

    I'm happy to hear about the new FPV version being in development.

    Right now I am using FPV version 2 and shadows on FPV objects are stretched and sometimes flickering.
    I suppose this is because of the limitations that the current system has.
    How will shadows work on FPV objects with version 3?

    Also, as it is a HDRP version, will it require using the High Definition Render Pipeline in the project?
     
  6. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,341
    FPV supports later versions than the ones mentioned in the asset store, since i provide the details on how to do it in the documentation. I usually update the asset with newer versions of the required assets, but anyone can update them to later versions using the same logic. It just requires extra manual work.

    I'll try to add later Unity version in the future.

    The stretch shadows happen because the depth of the objects are also affected and they get very small, which is why the shadows appear like that. I've tried many times to fix that but it's very tricky and never got very good results.

    For FPV3, i will be supporting both HDRP and LWRP, with support for custom shaders (those have to be manually setup but i'll make the process easy).
    Same shadow stretch issue will most likely happen with this version, but i'll add some options where you can better tweak this depth to have a more balanced renderer without too much clipping with the environment.
    Same solution can't be done with the default renderer afaik due to some limitations/restrictions with Unity's motion vectors. (i guess if you wouldn't want to use screen space effects with motion vectors this would probably work though)
     
  7. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,341
    well, i guess a FPV3 solution for LWRP/HDRP might no longer be needed with this new video Unity made :)
     
    Weendie-Games likes this.