Search Unity

Rendering Issues. Conversion.

Discussion in 'Entity Component System' started by illinar, Jul 22, 2021.

  1. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    Converted objects disappear in the game view (but not in the scene view), so I decided to try a hybrind renderer. I installed 0.11. Now they glitch very hard and flash between normal rendering and objects being solid black and solid white every frame. Also some get blown up in terms of scale and placement.

    What doesnt make sense is that if I disable the converted objects in the hierarchy they disappear after they already been converted, so is the renderer actually using those game objects for rendering somehow??

    Can I keep normal game objects with normal rendering in the subscene?
     
  2. desertGhost_

    desertGhost_

    Joined:
    Apr 12, 2018
    Posts:
    260
    Did you activate Hybrid Render v2?
     
  3. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    Of course. Otherwise objsects would still be invisible. If you mean the define symbols.

    HDRP by the way.
     
    Last edited: Jul 23, 2021
  4. tassarho

    tassarho

    Joined:
    Aug 25, 2019
    Posts:
    75
    when starting a new hdrp project the package is not updated to th latest version check if you have the latest version of hdrp(1.5.1)
    upload_2021-7-23_14-59-56.png
     
  5. tassarho

    tassarho

    Joined:
    Aug 25, 2019
    Posts:
    75
    i had issue too with hdrp, i had to:
    1: upgrade to 1.5.1
    2: quit unity
    3: delete the library folder of my project(it will be downloaded when you restart unity)
    upload_2021-7-23_15-2-1.png
    4: reopen my project

    i don't know if the bug remain but from a unity dev. the library is not always updated when you upgrade HDRP
     
  6. apkdev

    apkdev

    Joined:
    Dec 12, 2015
    Posts:
    283
    I've encountered a flickering issue recently while trying to update Unity+HDRP+ECS that I narrowed down to the light layers setting in the HDRP asset. All objects rendered w/ HRv2 would have black flickering material artifacts. Check if disabling light layers helps.
     
  7. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    I will check those solutions, thanks.

    What if I don't want to use the hybrid renderer? What if I want all presentation to be unconverted. How can I prevent conversion to a hybrid renderer in a subscene?

    What kind of magic is happening to the converted mesh renderers in a subscene anyway that they become invisible although look like normal game objects with all necessary for rendering components?
     
  8. apkdev

    apkdev

    Joined:
    Dec 12, 2015
    Posts:
    283
    I don't think there's an easy solution. Subscenes are converted in entirety, and stored on disk in a new binary format. Unless there's some hybrid component magic that could be used here, I don't know much about those.

    A workaround would be to spawn regular GameObjects based on data saved in Entities. Not sure why you'd want to do this, though. This will probably be much less efficient than just loading a regular scene, so I'd suggest keeping the objects outside of the subscene entirely.

    There is no magic - you can check the entity debugger to see exactly what data is stored for each converted entity. The GameObjects are only used for authoring, and do not exist at runtime. Hybrid Renderer only relies on ECS data stored in subscenes for rendering. If they look exactly like regular GameObjects, that means the Hybrid Renderer is working correctly - after all, that is the goal :D
     
  9. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    But if I have a camera in a subscene it remains a working camera and I can move it around...
     
  10. apkdev

    apkdev

    Joined:
    Dec 12, 2015
    Posts:
    283
    Sorry for the confusion. AFAIK some types objects in subscenes are spawned as old style
    UnityEngine.GameObject
    s and
    Unity.Engine.Component
    s because they haven't been reimplemented in DOTS yet. You will notice that particle systems, VFX graphs, decals, cameras, volumes, lights, etc behave this way. This is rather inefficient and in the long run I expect all of those will be replaced with ECS-native implementations. However, Transform/MeshRenderer/MeshFilter/LODGroup components are already converted completely and do not require any GameObjects at runtime at all.
     
  11. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    Yes, I would really prefer there to be a way to control which objects and components are converted. I would probably prefer for now to have all presentation to be in objects and all simulation in entities, since I'm only interested in server side efficiency anyway and the way conversion works right now seems a bit unpredictable and unintuitive.

    I could go with ConvertToEntity I guess.
     
  12. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    NetCode has deprecated that workflow and asks to use subscenes.