Search Unity

Resolved Static batching: multiple static entities rendering not working [URP, Hybrid Renderer V2]

Discussion in 'Graphics for ECS' started by Krooq, Dec 19, 2020.

  1. Krooq

    Krooq

    Joined:
    Jan 30, 2013
    Posts:
    196
    Hi,

    I'm very new to DOTS and URP and most of Unity's dope features, e.g. lighting, render pipelines etc
    I know there is some stuff that is not supported in DOTS, particularly with URP and HR-V2.
    But I ran into this bizarre behaviour very quickly and just wanted to check I wasn't doing something dumb.

    Basically If I create a scene with 2 static entities in it then the rendering behaviour is completely wacko.
    This only seem to occur when the "Static > Batching Static" option is selected.

    Game mode (OK)
    gamemode.png
    Play mode (NOK)
    playmode.PNG

    The middle static sphere turned into a cube and both entities adopted the translation of the right cube while retaining the transform of the center sphere.
    It looks like the meshes have been combined in the inspector as well.

    So, I can sorta see what is happening, but I'm not sure why, can someone explain how this static batching is meant to work? Is this intentional behaviour?

    I couldn't find anything describing this behaviour or whether this exact thing was a known issue, but that could just be because I don't know where to look.

    EDIT: I'm just after some baked lighting in my entities scene with URP :)
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    With HR you should disable static batching in Project Settings completely.
    According to @Tim-C
    So the root issue here is that static batching is not supported in hyrbid renderer (v1 or v2). It combines objects to reduce draw calls, but it means they can't batch properly in hyrbid. So you have to disable it in player settings.
     
    Krooq likes this.
  3. Krooq

    Krooq

    Joined:
    Jan 30, 2013
    Posts:
    196
    Ah good to know! thanks!