Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Generating Skinned Sprite Rig from Script (from Json / Blender Armature)

Discussion in 'Animation' started by nikefootbag, Oct 18, 2022.

  1. nikefootbag

    nikefootbag

    Joined:
    Jun 13, 2017
    Posts:
    28
    I’m trying to generate a Skinned Sprite Rig from script, specifically trying to convert a Blender Armature that’s skinned to a 2D mesh, into a 2D sprite rig in Unity.
    Sprites corresponding to the meshes of the armature are automatically exported from blender as pngs, and a json file keeps track of bounds, pivots, bones, weights etc.
    Basically I want control over Unity’s 2D Skinning editor, and am about to see how it goes making an editor/import script that generates SpriteBones, sets Sprite bindposes and VertexAttributes for all the things.

    Before I embark on this i’m wondering if anyone has been able to do Sprite Skinning from script, i.e. without the Sprite Skinning Editor or other manual handling.
    So regardless of pretext, is it possible to generate the 2D mesh, bones, set the vertex weights etc from script?

    Thanks in advance anyone
     
  2. thornebrandt

    thornebrandt

    Joined:
    Mar 22, 2015
    Posts:
    15
    Did you ever find out anything?