Search Unity

Unity 4.3 - Optimize Game Object on Rig

Discussion in 'General Discussion' started by Jaimi, Aug 30, 2013.

  1. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Very interesting - about 1:40:00 on the youtube video of the keynote. This looks like a skinned mesh combine, along with a texture atlas builder. Would be great if this was available at runtime. :)
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    It's neither skinned mesh combine, nor texture atlas builder.

    What it is: instead of having 70 (or whatever) game object hierarchy with Transform components on each, it keeps at that "internally" (in a nicely packed arrays for performance). Since we found out that in many cases it's not the actual skinning or animation that's costing time - it's just recomputing the transform matrices from the hierarchy and sending update notifications to the transform components.

    So what the optimization does, is it reduces the number of game objects in your rig. This means way fewer cache misses, smaller memory consumption, ability to multi-thread skinning matrices computation, and way less transform update notifications.
     
  3. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    Sweet!
     
  4. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    That's pretty awesome.

    With that in mind, though, if we want to parent an external GameObject to a bone, how would we go about doing so?
     
  5. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    It was shown in the keynote video that you can expose selected items from hierarchy back to single gameobjects.
     
  6. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Awesome. :D
     
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Awesome! Is it callable from runtime? I currently build my characters and attach them to the bones at runtime. (and swap out pieces for equipment change).
     
  8. deram_scholzara

    deram_scholzara

    Joined:
    Aug 26, 2005
    Posts:
    1,043
    I'm also curious about this for the same reason. Would be a great benefit for customized characters in multiplayer games.
     
  9. Jingle-Fett

    Jingle-Fett

    Joined:
    Oct 18, 2009
    Posts:
    614
    I got so excited when I saw it in action, easily one of my favorite new features :D Just wanted to say great work whoever worked on that!
     
    Last edited: Aug 31, 2013
  10. Diogo-Teixeira

    Diogo-Teixeira

    Joined:
    Apr 9, 2010
    Posts:
    494
    Given that, using this optimization, the GameObject hierarchy associated with the skeleton disappears from the hierarchy, how can we access up-to-date/animated bone transform info? Is there an alternative way to query these transforms?
     
    Last edited: Nov 27, 2013
  11. Redz0ne

    Redz0ne

    Joined:
    Oct 19, 2010
    Posts:
    332
    I know this is a bit of a necro-post but I am curious about the optimize option also since currently I have game-objects that already have things attached (and they have scripts/fsms on them)

    If I collapse them on the objects themselves as is, will all that information be preserved or would I have to set them up that way again? if I have to set them up again that's not an issue but I'd like to know before I hit "apply" so that I can prepare what I need to prepare beforehand.