Search Unity

LOD groups behaving differently between editor and game

Discussion in 'Editor & General Support' started by CleverNickname, Feb 15, 2017.

  1. CleverNickname

    CleverNickname

    Joined:
    Aug 18, 2015
    Posts:
    16
    Hi, I just set up a character (consisting of a single skinned mesh renderer) with three LOD levels, plus a culling level. In the editor scene view, everything behaves as expected with the LODs, but in the game, the character is culled until it gets very close to the camera, and you basically have to be on top of it to get the highest quality level. I thought this was an issue with the LOD bias, but every single quality level has an LOD bias of 1 or greater, and I'm testing at the highest level. Any ideas what else might be causing this behavior? I'm running the latest 5.5.1 release, and this is a VR game for the Vive.
     
  2. Deleted User

    Deleted User

    Guest

    Hi CleverNickname,

    Most of the time this can be fixed by clicking the 'Recalculate Bounds' button within your LODGroup component.

    A good way to debug this issue is to play your scene and select the character, in the editor the LODGroup should be exposed and you should be able to play around with the LOD's. At this point take a note of all the property values while in play mode and examine then next to the editor values.

    If this does not yield a result then i do know of another behaviour that occurs with LODGroups to do with scaling. If you are scaling your character in play mode this could be the source of your issues.

    These are just tricks that i learned over the years from experience, if they don't help, let me know and ill research some more and attempt to fix the issue.

    Good luck and i wish you all the best.
     
  3. me4lmnts

    me4lmnts

    Joined:
    Aug 2, 2016
    Posts:
    8
    Hi CleverNickname ;)
    I encounter the same problem as you described 18 months ago: my LODGroups are behaving differently between Playmode (Editor) and Build. Actually in Playmode it's correct. In Build they are popping on and off.
    Have you found a solution to that?
     
  4. tsnyder321

    tsnyder321

    Joined:
    Jul 5, 2012
    Posts:
    2
    Hi,

    I know this is an old thread, but I ran into kinda the same issue. I would get different LOD results depending on if I was in the editor or what computer my build was running on. After a bit of time debugging, I found that my issue was the LODBias in the Quality Settings. If someone is having the same issue, I would suggest looking into this as a possible solution.

    Cheers!
     
    entropicjoey1 and amit-chai like this.
  5. entropicjoey1

    entropicjoey1

    Joined:
    Jun 1, 2014
    Posts:
    26
    thank you, i had a feeling this was the culprit!
     
  6. SamRock

    SamRock

    Joined:
    Sep 5, 2017
    Posts:
    250

    I have the same issue. Everything works fine in Editor and play mode. But build give me strange low LOD!

    What did you do in LODBias?

     
    Necron99 likes this.
  7. ReneGCastrejon

    ReneGCastrejon

    Joined:
    Apr 15, 2014
    Posts:
    1
    In case anyone need some guidance. I found that quality level was set to "very low" as default on Quality settings and the game was published using those settings. That give me differences between the editor and game published.
     
  8. MorganYT

    MorganYT

    Joined:
    Jul 29, 2017
    Posts:
    31
    I spent an hour to understand - unity3d LOD is not based on distance but size of object on screen. That is, if you have a different FOV in the Editor Camera that is different from the Game Camera, then the LOD will work differently. Hope it helps someone who comes across this thread.
     
  9. Wilhelm_LAS

    Wilhelm_LAS

    Joined:
    Aug 18, 2020
    Posts:
    55
    This is may because of the Quality Level you are using. LOD Bias basically tells you "Do not use those LOD Level's but use those instead".
    For example, LOD Level 2(Lowest) may not get triggered when the Quality Level set to High(Users wants to destroy his PC)
    Since LOD Level 0 is the Highest, it prefers highest. Also the Highest LOD Level selection also configurable.