Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

NEW | First Person View 3 - FPS Render for Default Render/HDRP/URP | No Clipping + 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,356
    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:
    91
    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,356
    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,356
    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,356
    well, i guess a FPV3 solution for LWRP/HDRP might no longer be needed with this new video Unity made :)
     
    Weendie-Games likes this.
  8. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    631
    @eskovas

    Considering picking this up. Do you still have the UFPS integration instructions?
     
  9. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,356
    Hi,
    The asset never had instructions for UFPS integration. The current instructions should work fine, as others were able to integrate into UFPS.
    A couple of notes to take into account:
    - This asset only supports the default renderer (not lwrp or hdrp)
    - the current version of the asset has included standard shader versions until version 2018.2, but the pdf included explains everything on how to set up on any version, so it will have a little setup work.

    -------

    I also decided that i will update the asset, with a new solution (shader based), mainly for LWRP and HDRP, but will also have support for the default renderer. Should work much better than the current one, without the need to change any cgincludes or anything like that.
    Will require some setup, but nothing complicated.
    It'll also mostly use the same files with some modifications, so you won't have to change much if you're already using FPV.
     
    Lars-Steenhoff likes this.
  10. xkinginthecastlecastlex

    xkinginthecastlecastlex

    Joined:
    Nov 7, 2018
    Posts:
    91
    @eskovas Hi, I bought your First Person View 2 asset recently. I am using Unity 2018.4 and noticed occlusion culling doesn´t work as soon as First Person View 2 is setup.
    I would appreciate if you have any idea how to solve this...

    Many thanks in advance
     
  11. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,356
    Talked about the issue in the post above in PMs, and the issue was most likely related to being set up incorrectly.

    ------------

    I also just submitted a small update to FPV 2.1. Here's the change list:
    - Added FPV shaders/CGIncludes for Unity 2018.4 and 2019.3
    - Simplified example scripts.
    - Improved Manual with missing sections on how FPV works.

    So now FPV includes examples for the following Unity versions:
    - 5.6.4; 2017.1.0; 2017.2.0; 2017.3.1; 2018.1.0; 2018.4.15; 2019.3.0.
    The manual includes all the necessary steps to setup FPV for any other Unity version not included in this package.

    ------------

    On another news regarding FPV3, happy to say that i've been able to add support for URP and HDRP, and i'm currently working on making the new solution work using the default renderer.
    I'll share more info and screens when close to complete.
     
    Weendie-Games and Vincent13122 like this.
  12. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,356
    Vincent13122 likes this.
  13. runelink

    runelink

    Joined:
    Jun 2, 2014
    Posts:
    4
    @eskovas hey,

    We're in the process of updating our project from unity 2017 and I'm thinking of choosing 2019.2 since this is hopefully more stable than 2019.3. There seems to be no example included for this so I was wondering if you would recommend using the 2019.3 example in unity 2019.2 or if you would recommend using 2019.3 for fpv or in general.
    Thanks
     
  14. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,356
    First Person View 3 has been submitted for review!
    Price of the asset will be increasing to 20$. Anyone that has bought the asset in the last 60 days of the date of release of the new version will get it for free, and anyone who has bought FPV2 in the past will be able to get FPV3 for 50% off!

    I'm finishing up a small video showcasing First Person View 3


    First Person View 3 offers a solution for first person render in Unity, where first person objects won’t clip through the environment, have a separate field of view and receive shadows from the environment.

    FPV3 now supports the Default Renderer for Unity versions 2018.4 and up, and also supports HDRP and URP for Unity versions 2019.3 and up.

    New in First Person View 3!
    - Support for HDRP and URP for Unity 2019.3+ using ShaderGraph,
    - Much simpler and easier setup for the Default Renderer,
    - Ability to easily fade in/out of First Person View, useful when interacting with the environment,
    - Finer control over changing shadow casting mode in and out of FPV.

    HDRP/URP Advantages:
    - Super easy setup using ShaderGraph
    - Doesn't require any code/GCInc changes
    - Doesn't require re-setup for newer Unity versions
    - Less limitations on Post Processing effects

    -- Notes --
    - Please note that this is not a first person controller.
    - Content from screenshots and videos are from my game, No Heroes, and are not included with First Person View 3.

    Default Renderer Limitations:
    - Partially supports temporal effects. In FPV3, Motion Vectors are essentially "disabled" but still active. TAA for example will still partially work, but temporal motion blur will not.
    - Light and Shadows calculations are stretched for first person objects.
    - Not a limitation, but when updating to a newer Unity version, you'll need to setup FPV again for that version of Unity. All steps are provided in the manual. HDRP/URP don't require this re-setup for newer versions.

    HDRP/URP Limitations:
    - Light and Shadows calculations are stretched for first person objects.
    - Due to an Unity issue, Skinned Mesh Motion Vectors don't play well with vertex scaling, so FPV3 needs to disable the Motion Vectors for skinned meshes. Most temporal effects will still work, with the exception of temporal motion blur.

    ----------

    The manual includes all the necessary steps to setup FPV for all renderers and future Unity versions.

    Every script is well documented to make it easier to learn and understand how these solutions were made.




     
  15. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    86
    Do you have to scale weapon objects when using this shader?
     
  16. GarbageCat

    GarbageCat

    Joined:
    Jul 31, 2012
    Posts:
    228
    interesting, how good does it transition between 3rd to 1rst ?
     
  17. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,356
    For HDRP and URP, the custom node/sub graph does vertex scaling automatically in the shader.

    You can instantly turn off/on first person view in FPV, or you can fade the effect to have a smooth transition between On/Off by just calling a simple static function.
    In the video in the next post i show a few examples where i use this fade feature to vault over objects and pickup weapons, so that nothing looks weird when interacting. This can be used for a number of things, like animating first person animations with interacting with the environment.
     
  18. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,356
    Here's the official demonstration and comparison video of First Person View 3, using No Heroes as an example.
    This demonstration is done in HDRP.
     
    Vincent13122 and paulojsam like this.
  19. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    86
    What is the frame per second when using this asset?
     
  20. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,356
    For Default Renderer, there's basically no performance impact.
    For HDRP/URP there is some extra work in the shader for vertex modifications, but it is negligible, since it's all done in the GPU.
    All in all, you most likely won't see performance degradation.
     
  21. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,356


    Because it took a long time to be approved, i increased the grace days for anyone that bought FPV2 close to it being deprecated. If you purchased First Person View 2 since March 1st, then you can get First Person View 3 for free :)

    For everyone else that bought First Person View 2, you can get the new version 50% Off.

    For some reason it's displaying the ratings from the previous version, even though this is a new package. Making the upgrade option must have carried over the ratings, which i wasn't counting on o_O
    Anyone know how not to include reviews from the deprecated package?
     
    Last edited: May 26, 2020
  22. xkingjohnx

    xkingjohnx

    Joined:
    Feb 22, 2016
    Posts:
    2
    hi there,
    any news regarding the compatibility of First Person View 3 with mmfpse ?
     
unityunity