Search Unity

[Bug?] Object Rendering seems to be dependent on scene viewport instead of camera

Discussion in 'General Graphics' started by darreney, Apr 3, 2019.

  1. darreney

    darreney

    Joined:
    Oct 9, 2018
    Posts:
    34
    Somehow, rendering of a game object is dependent on whether it is being displayed in the 'scene' viewport, instead of whether the object is within camera view.

    It happens on both versions that i tested on (2018.2.14f and 2019.1b). Couldn't test it on 2018.3 cos all my prefabs went missing there D:



    Does anyone else experience this issue?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    If a skinned mesh is out of view, its animation update may be getting culled. Try enabling "Update when Offscreen" on the Skinned Mesh Renderer to make sure the animation is always updated.
     
  3. darreney

    darreney

    Joined:
    Oct 9, 2018
    Posts:
    34
    Hi @bgolus thank you for replying with the suggested fix!
    i've went ahead to turn on "Update when Offscreen" for all the body parts of the game object in question. However, there is not change to the results.. it is still rendering the same as described :(
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Okay, then the other possible solution I can think of is to uncheck that, and modify the bounds manually to be ubsurdly large. I think you can modify the extents in the inspector, just set the xyz values all to 1000000.
     
    darreney likes this.
  5. darreney

    darreney

    Joined:
    Oct 9, 2018
    Posts:
    34
    Ok so i have edited the bounds of just one body part belonging to the game object so that it is large enough to fall within the fov of the static camera. And voila it worked! It is now being rendered as per intended even in full screen mode! Thank u so much @bgolus for recommending this work around! Appreciate your great help~! :)


    Anyway, from this experience, can i say that it is common practice to have such animations that involves movement over a large distance to be done within Unity itself? Instead of having it animated within 3ds max or blender? And it is common to use this hack / workaround for such one-use cases that is meant for cinematic purposes?
    I'm pretty new to Unity, still trying to learn here~ heh
     
  6. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Generally big movements are done using game object movement driven by script, or at least using root motion (which applies the root bone's motion to a transform / rigidbody). If you have a big movement in an animation, tweaking the bounds isn't uncommon. However I would have expected the "always update" to work just as well.
     
  7. darreney

    darreney

    Joined:
    Oct 9, 2018
    Posts:
    34
    Thank you once again for the insights @bgolus ! :)