Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug MARS with Universal Render Pipeline

Discussion in 'Unity MARS' started by FutureSystems, Jun 23, 2020.

  1. FutureSystems

    FutureSystems

    Joined:
    Aug 21, 2019
    Posts:
    19
    Hi, We would like to use MARS with URP. It looks like the MARS environments are not upgrading to URP. Could you please assist me with this issue? Thanks
     

    Attached Files:

    • urp.PNG
      urp.PNG
      File size:
      502.8 KB
      Views:
      338
  2. leweyg_unity

    leweyg_unity

    Unity Technologies

    Joined:
    Jan 29, 2020
    Posts:
    38
    Hey @FutureSystems, if the pink materials are the issue, you can simply change the shader on them (there are only a handful of shared materials used). Please excuse the hassle,
     
  3. FutureSystems

    FutureSystems

    Joined:
    Aug 21, 2019
    Posts:
    19
    Thanks I fixed the materials but the problem is that I do not see the MARS Gizmos and Proxy Planes and I am wondering whether that is related to URP? I have attached the images from the MARS documentation which I follow but the purple objects do not appear in My Scene nor Simulation View in URP.
     
  4. JonathanNUnity

    JonathanNUnity

    Unity Technologies

    Joined:
    Sep 27, 2016
    Posts:
    14
    Hi @FutureSystems, in some of the shaders in Unity MARS we use the first pass as a depth pre pass. In URP these passes need to be tagged to draw correctly with the normal forward pass. Both `DepthMask.shader` and `TexturedStableFresnel.shader` need `Tags{"LightMode" = "DepthOnly"}` added to the beginning of their first pass.

    You could also replace the shaders in the package with the ones I have attached in these locations
    • <Your-Project>/Library/PackageCache.com.unity.mars@<version>/Runtime/Shaders/DepthMask.shader
    • <Your-Project>/Library/PackageCache.com.unity.mars@<version>/Runtime/Shaders/TexturedFresnel/TexturedStableFresnel.shader



    This will addressed in an upcoming release.

    -Edited-
    • Updated files to remove the .txt extension.
    • Added locations of files to replace.
     

    Attached Files:

    Last edited: Jun 29, 2020
    ROBYER1 likes this.
  5. FutureSystems

    FutureSystems

    Joined:
    Aug 21, 2019
    Posts:
    19
    Thanks a lot for the explanation but I am not quite sure what to do with the two files that you have attached. Shall I put them somewhere in the unity project directory?
     
  6. samshool

    samshool

    Joined:
    Sep 21, 2017
    Posts:
    31
    im having a strange issue on restarting unity with mars in URP on 2019.4.1f1 or 2019.3.15f1 ...it will instantly crash if the simulation/device windows were left open .... can you please share if you had any such issues ? thanks appreciate!
     
  7. JonathanNUnity

    JonathanNUnity

    Unity Technologies

    Joined:
    Sep 27, 2016
    Posts:
    14
    @FutureSystems I updated my previous reply with the shader files with fixed file extensions and the locations in your project where they are located.
     
    FutureSystems likes this.
  8. patpre

    patpre

    Joined:
    Jan 12, 2021
    Posts:
    28
    Hi there, just updated to Unity Mars 1.3. / Unity 2019.4.18f1 / Universal RP 7.5.3... When working with Mars 1.2. changing the files as mentioned here worked... now in 1.3. with every opening of the project it jumps back to the default, which is a black mask?? Can you help on how to keep it transparent?