Search Unity

Converting a skinned rigged posed character to a static mesh?

Discussion in 'General Discussion' started by helgarddebarros, Feb 14, 2020.

  1. helgarddebarros

    helgarddebarros

    Joined:
    May 10, 2014
    Posts:
    169
    In my game I want to have a scene with multiple dead bodies lying around when the player gets to the scene I am hoping for about 50 bodies. So my idea is not to have 50 skinned and rigged models in "dead" poses lying around, but rather 50 static models, with no rigging or animations.

    The advantages I am hoping is that 50 static meshes will be a much lower overhead than 50 rigged models. Also, once the models are static meshes I can redo their AO maps to be more suited to that pose, I can maybe combine every 4 dead bodies into one model with a texture atlas to lower overheads. I could also work on the models, cutting off arms or legs in my modelling application for some added goriness.

    So I have tried various different ways of exporting the models in the "dead" pose to make a static model, but every method I have tried just exports the original T-pose model. Which plug-in would I need, or what process would I need to get the models into my modelling program (Mudbox) in the dead poses?
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,151
  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    If you want to do that in UNITY, then you'd need to call SkinnedMeshRenderer.BakeMesh.
    https://docs.unity3d.com/ScriptReference/SkinnedMeshRenderer.BakeMesh.html
    You could likely freeze geometry on startup this way.

    As for producing dead body geometry in a modeling program...
    For examle, in blender, skinning is done through "Armature" modifier, and when you want to freeze the armature permanently, you could Apply the armature, and it will turn into a static mesh. Not sure how to do it in mudbox.
     
  4. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I dunno about mudbox, but in maya just pose the model then delete history on the mesh. That will break the connection to the skeleton. Then export the mesh. That's all you'll have to do.
     
  5. helgarddebarros

    helgarddebarros

    Joined:
    May 10, 2014
    Posts:
    169
    Thanks everyone. Never used Blender or Maya, so I will try the Skinnedmeshrenderer way in Unity.