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

After the Wizard Setup - Can I enable raytracing globally or its needed per light/material?

Discussion in 'HDRP Ray Tracing' started by newguy123, Dec 10, 2020.

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Hi Guys

    So after I've run the wizard and setup HDRP and DXR, whats next? Can I globally enable raytracing shadows for all lights and raytracing reflections for all materials, or I need to enable it manually for each light and each material?
     
  2. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Ray tracing shadows are set per light (in it's properties).
    Everything else (ray traced reflections/GI/AO/Refraction) goes through setting volume(s) with post processing and ray tracing settings there - no need for individual material tweaking.
     
    newguy123 likes this.
  3. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Hmmm weird, I'm not able to to add raytrace shadows for my main directional lights (the sun)

    I tick "Screen Space Shadows"
    followed by "Ray Traced Shadows (Preview)"

    ....but as soon as I tick that 2nd one, I get an error:

    upload_2020-12-11_16-20-17.png
     
  4. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    I suspect it has to do with my materials. I imported an FBX and just left all materials as is form the import, I havent assigned any HDRP materials yet
     
  5. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Settings on screenshot are correct, that error in console is caused by something but is it about materials... Probably it can be verified with simplest test - create a new scene using default DXR outdoor/indoor scene presets, spawn some default objects (cubes, capsules, spheres) and try to enable ray tracing shadows and other settings to see is it about materials or something else...
     
  6. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    hmmm no its not materials

    I deleted all models and created 2 new cubes and assigned new white HDRP Lit material, switch the sun's raytracing shadows off and on again, but the error remains :-(
     
  7. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    I'm using Unity 2021.1.0a8 and HDRP 11.0

    Any ideas?
     
  8. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    764
    Hey, this is not supposed to happens but sometimes there can be some issue during import. Can you try to select your HDRP package in the hierarchy and right click > Reimport ?

    upload_2020-12-16_14-44-15.png
     
  9. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    re-importing all raytrace scripts, solved the issue for me, thanks
     
    chap-unity likes this.