Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

HDRP Ray Traced shadows

Discussion in 'Graphics Experimental Previews' started by Ruchir, Sep 23, 2019.

  1. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    I have a rtx 2070 laptop, unity 2019.3.0b4
    HDRP 7.1.1

    I have not been able to enable raytraced shadows in my project since it has been available can someone just walk me through it from the starting (creating a hdrp project) to enabling it because I don't know what am I doing wrong it just doesn't work , ambient occlusion (RayTraced)is working , when I use the recursive rendering for raytraced materials many of the geometry disappears and andthe surface always reflects a bit even when smoothness is 0 , and even the RayTraced global illumination doesn't work

    Can someone just tell me what's wrong?
    (Btw I did use the HDRP render pipeline wizard to enable raytracing but it still doesn't work)
    HDRP problem.png
    (There is the "Ray Tracing Environment" GameObeject in the scene)
    you can see there are no soft shadows or any change at all when I turn on the raytraced shadows ON
    The only time I get soft shadows is when I use forward rendering
     
    sisermann likes this.
  2. freenomon

    freenomon

    Joined:
    Mar 21, 2019
    Posts:
    35
    I haven't been able to make raytraced shadow work for me either. raytraced AO and GI and "some" reflections seems to work (only shows against sky but the reflected objects shows no shading).
     
  3. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Ruchir likes this.
  4. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    elbows likes this.
  5. gdbbv

    gdbbv

    Joined:
    Apr 20, 2018
    Posts:
    11
    I don't see the Raytracing option in the Frame Settings. All other steps in the guide have been completed and verified.

    Also every time I restart unity the SHADEROPTIONS_RAYTRACING macro in ShaderConfig.cs.hlsl gets reset to 0.

    Any ideas?
     
    Ruchir likes this.
  6. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    same here
     
  7. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    please help
     
  8. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    There are several different approaches to that.

    Normally I just copy the hd config package files into the Packages folder of my project, and make sure that another version of that package is not also mentioned in manifest.json.

    But the way Unity tend to do it, is to put that foler somewhere else, and then use the file: way of doing things in manifest.json, to point to the folder with the hd config package.

    For example they recently did this with a DXR test project:

    https://github.com/Unity-Technologi...for-dxr-test/LocalTestProjects/HDRP_DXR_Tests

    They have created a LocalPackages folder, and within that folder they put com.unity.render-pipelines.high-definition-config

    Then in their Packages/manifest.json they use this line:

    "com.unity.render-pipelines.high-definition-config": "file:../LocalPackages/com.unity.render-pipelines.high-definition-config",

    Note that in this example the rest of the pipeline packages are also local and referred to using file, but you dont need to do that.
     
  9. gdbbv

    gdbbv

    Joined:
    Apr 20, 2018
    Posts:
    11
    I added this line to manifest.js

    "com.unity.render-pipelines.high-definition-config": "7.0.1",

    it was missing.
    The package is located in ......\Library\PackageCache\com.unity.render-pipelines.high-definition-config@7.0.1

    That recompiled some things but on restart it still Zeros the HADEROPTIONS_RAYTRACING macro in ShaderConfig.cs.hlsl and I don't see a Raytracing flag in the Frame Settings ...
     
  10. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Well normally it doesnt matter if that is 'missing' because that package is listed as a dependency in the package.json file of the main hdrp package, so it will still be included. We only need to include it manually ourselves when we want to point to a version of that package that lives in a different location, one we can edit without the changes being lost.

    I dont really know how to find more ways to try to explain the things I already tried to explain. So I'd say if you are still having trouble with some part of the instructions, consider trying the Small Office demo project from github:

    https://github.com/Unity-Technologies/SmallOfficeRayTracing/releases

    You will still need to get files for HDRP etc and put them in the right place so that the manifest.json file for this project looks in the right place for them. But this is a good chance to learn about how this stuff works, so you can use package manager system with local files that you have complete control of.

    Also I do sometimes see people on this forum giving advice that I think is another way to edit those files without the changes being lost. But I dont know anything about that other way of doing it, I always like to keep local copy of whatever HDRP versions etc I want for each of my projects, and get used to using package manager or manual editing of manifest.json to have control of all this.