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

Question Ray Traced Reflections With Entities Graphics

Discussion in 'HDRP Ray Tracing' started by Clamibot, Aug 14, 2023.

  1. Clamibot

    Clamibot

    Joined:
    Jun 28, 2021
    Posts:
    6
    Hey everyone! I haven't had to post any questions in quite a long while as I've usually been able to find answers to them thanks to these forums. However, I've now come across a very interesting problem I don't know how to solve and can't find an answer for using my google-fu. I'm wondering if any of you know the answer.

    I'm currently developing a framework for multiple games I want to develop in the future (basically I'm developing an engine and custom tools for my games using Unity), and it uses a pure ECS/DOTS workflow, or at least as close as I can get to one. Since reflection probes are a no go for performant, accurate reflections, I decided to try out ray traced reflections in Unity.

    Ray traced reflections work great on gameobjects! However, they don't seem to work properly for entities. I see reflections for all the entities in my scenes, but only at their initial positions when the scene is loaded. If I move my character or any other entity, the reflections for those objects are not updated. However, their shadows reflect properly. The reflection of my character's shadow updates properly when I move it.

    Has anyone else come across this issue? If so, does anyone know what's causing it? Is this just a limitation due to the current state of Entities Graphics and/or HDRP?
     
  2. Rukhanka

    Rukhanka

    Joined:
    Dec 14, 2022
    Posts:
    204
    Entities.Graphics does not support HDRP ray tracing. I beleive, initial correct reflections comming from BLASes created from authoring GameObjects. Rendered meshes represented by entities are not updated in BLAS by Entities.Graphics anymore.
     
    Clamibot likes this.
  3. doomquake

    doomquake

    Joined:
    Sep 2, 2019
    Posts:
    14
    I went down this route after seeing the ECS Character Controller examples and assumed its good to get into and just slap on HDRP with DXR which I am also into. There are a lot of things that simply don't work but you can still do some tricks and get shadows (non raytraced) working and maybe do some sort of proxy's to process movements and physics in ECS and just draw them in the non ECS scene. But unless you want to explore that hard and prove something, then don't bother. and stay in URP or avoid Ray Tracing.
     
    Clamibot likes this.
  4. Clamibot

    Clamibot

    Joined:
    Jun 28, 2021
    Posts:
    6
    Thank you guys for answering. I thought for sure I was never going to get an answer to my question since it had been more than a month since I posted it, and nobody had answered.

    Looks like I'll have to engineer a custom solution to get raytraced reflections working with entities, but now I at least have an idea of where to start. Thanks again!
     
  5. lacenwolk

    lacenwolk

    Joined:
    Nov 28, 2023
    Posts:
    2
    Hi, did you manage to get anything to work? In my case, shadows don't work, but reflections do, somehow?
    I'm thinking of ditching ecs until this is resolved