Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Hybrid Renderer not rendering anything?

Discussion in 'Entity Component System' started by Alturis2, May 12, 2022.

  1. Alturis2

    Alturis2

    Joined:
    Dec 4, 2013
    Posts:
    38
    I have been experimenting with the DOTS/ECS System. This seems like a common problem that people have experienced but in scouring the internet the solutions that others have discovered have either become no longer applicable or are not working for me that I can tell.

    I have these packages installed in my project.
    • Entities package 0.50.1-preview.2
    • Hybrid Renderer 0.50.0-preview.44
    • Universal RP 10.9.0
    I am using a hybrid ECS approach where I use a GameObject prefab that has a Mesh Filter and a Mesh Renderer and I can see the entities it creates with the ConvertToEntity component do have what appears to be a valid RenderMesh data component with the right mesh and material. But nothing renders in the Game view.

    I have even tried placing a vanilla 3D sphere GameObject in the scene with default material, adding the ConvertToEntity component, and even that does not render anything.
     
    NoFuchsGavin likes this.
  2. Alturis2

    Alturis2

    Joined:
    Dec 4, 2013
    Posts:
    38
    Hmm... Well this is interesting. I decided to create a fresh UDP project and install the entities and hybrid renderer packages and now at least I am getting a visible error:

    A Hybrid Renderer V2 batch is using the shader "Hidden/Universal Render Pipeline/FallbackError", but the shader is either not compatible with Hybrid Renderer V2, is missing the DOTS_INSTANCING_ON variant, or there is a problem with the DOTS_INSTANCING_ON variant.
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  3. Alturis2

    Alturis2

    Joined:
    Dec 4, 2013
    Posts:
    38
    OK that seems to be because I had pulled a material reference from my previous project in my prefab. After resetting the material to one that is in the proper UDP new project, I am now seeing Entities render! Yay.

    So I guess my original problem had something to do with the fact that I was installing the Entities, Hybrid Renderer, and UDP packages to a sample 2D project.
     
  4. GriffinflyStudios

    GriffinflyStudios

    Joined:
    Oct 21, 2021
    Posts:
    8
    You can right click your material / shader and click reimport to update it to hybrid renderable. Also make sure your URP settings enable SRP batching which it should by default
     
  5. NoFuchsGavin

    NoFuchsGavin

    Joined:
    Sep 29, 2018
    Posts:
    5
    That's not changing anything for me ...

    My Material:


    My simple plane:
    upload_2022-5-15_10-0-54.png

    Before Playmode (note: the capsule has not "ConvertToEntity"):

    upload_2022-5-15_10-1-53.png

    In Playmode:
    upload_2022-5-15_10-2-17.png

    DOTS Hierarchy Window:
    upload_2022-5-15_10-4-37.png

    EDIT: Before you ask hybrid renderer is installed! Player has ENABLED_HYBRID_RENDERER_V2 and the base project was a new project based on the URP sample from Unity 2020.3.34f1.
     

    Attached Files:

  6. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,993
    HybridChunkInfo not having Valid checked is a problem. That means that the Hybrid Renderer is not processing your entity and initializing its backend rendering state. Make sure the HybridRendererSystem is running and detecting your entity in its queries.
     
  7. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,647
    You didn't happen to install netcode in your project did you?
     
  8. unity_5F7253D93C9911B28F1A

    unity_5F7253D93C9911B28F1A

    Joined:
    Sep 1, 2021
    Posts:
    1
    Wow~ I nerver thought the problem is Netcode package. (╯°□°)╯︵ ┻━┻
    • Entities 0.50.1-preview.2
    • Hybrid Renderer 0.50.0-preview.44
    • Netcode 0.50.1-preview.19
    • Physics 0.50.0-preview.43
    • Burst 1.6.4
    • Collections 1.2.3
    • Jobs 0.50.0-preview.9
    • Mathematics 1.2.5
    After removed Netcode, create a cube and set ConvertToEntity, the cube is renderered.ヽ(。◕o◕。)ノ
    But I have no idea what's wrong with installing Netcode.....
    (Probably when installed Netcode,
    Hybrid Renderer System runs in ClientWorld0 but the entity instantiated in Default World?)
     
    Last edited: May 18, 2022
  9. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,647
    Basically you instantiated the entity in the default world and not on server as a ghost or client where the renderer works. NetCode does not support the ConvertToEntity component anymore, subscenes are required.
     
  10. personalnanomancy

    personalnanomancy

    Joined:
    Jul 9, 2022
    Posts:
    4
    I also have this problem.
    Unity 2021.3.6f1
    • Entites 0.51.0-preview.32
    • Hybrid renderer 0.51.0-preview.32
    I don't have NetCode so that shouldn't be an issue, right? When I use the Convert To Entity component and hit play the object disapears like OP describes.
     
    MagiJedi likes this.
  11. saikarthi_unity

    saikarthi_unity

    Joined:
    Dec 29, 2021
    Posts:
    1
    same problem