Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Raytrace Materials invisible from distance

Discussion in 'High Definition Render Pipeline' started by MumenRaidaa, Jan 11, 2021.

  1. MumenRaidaa

    MumenRaidaa

    Joined:
    May 3, 2020
    Posts:
    4
    Hello everyone,

    I am somewhat new to Unity especially when it comes to using HDRP. I have created a HDRP/DXR Scene and imported a Blender File as fbx. I also downloaded an Asset from the Asset Store called Retro Cartoon Car Cicada. Now I have a problem with the materials. Whenever I zoom out too far with the camera or scene view the car and all new HDRP/Lit Materials I created become "invisible" and make everything behind it see through. I noticed that it always happens with Materials which have raytracing as rendering pass.

    Here in the first Picture you can see the blue sky and yellow ground instead of the Mountains which are currently behind the house. Same with the car you will see through the ground that is under the car.

    unityOne.PNG

    And here in the second picture you can see how it should look like when I am close enough to the object.

    unityTwo.PNG

    Appreciate any help. Thank you
     
    Last edited: Jan 11, 2021
  2. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    771
    Hello @MumenRaidaa, I'm going to assume that you are using 8.x.x HDRP package (or lower).

    In those versions, the only reason to put any object in the ray tracing pass is if you want them to be rendered using recursive rendering (a ray tracing feature). This feature is supposed to be used on a very small amount of objects in your scene (because of cost) and is mostly meant to be used for transparent objects, like headlight of cars, that require a a lot of bounces to be rendered accurately.
    For recursive rendering to work in 8.x.x, you need to have a Recursive Rendering override in a global profile, otherwise your object will not be rendered. (That is probably what you are experiencing).

    If you want to use some ray tracing feature, you need to enable them one by one in volume overrides (ex : in screen space reflection) or using Ray Traced shadows in shadow tabs in the light component. Setting an object to use the ray tracing pass is by no means a way to "make the gameobject use ray tracing".

    I know this is very misleading and can be confusing. That's why, this "ray tracing pass" has been replaced by a recursive rendering checkbox in later versions.

    Hope it's clearer now.
     
  3. MumenRaidaa

    MumenRaidaa

    Joined:
    May 3, 2020
    Posts:
    4
    Hello @chap-unity
    Thank you for your answer and help. Indeed the problem lied in the Recursive Rendering.
    Actually I had it already set and enabled on my Sky and Fog Volume but the problem was that the default Ray Length was quite low and I know set that value higher which helped.

    Here is a picture in case it will help someone in the future.
    recursiveRaytrace.PNG

    Again thanks for the help :)
     
    chap-unity likes this.