Hello Guest

Author Topic: Attaching sprites to mesh  (Read 4147 times)

Jeremy

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Attaching sprites to mesh
« on: March 13, 2013, 02:31:34 am »
I've got animated characters composed of 2D planes (each one is a 2 triangle quad) animated in Blender, something like what Mika Mobile did with Zombieville or Braveheart.

I'm wondering if there is some way that a 2D Toolkit sprite can be attached to each one of the quads of the blender mesh, so I can easily add animations to each of the quads.  Right now Unity only lets me select a texture (which could be one of the 2D Toolkit sprites, but then I can't animate it).

Sorry if this has been discussed before!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Attaching sprites to mesh
« Reply #1 on: March 13, 2013, 11:50:26 am »
You can't apply a sprite to a quad, but you could set it up in Blender to work better. So, you have a hierarchy set up in blender - set it up as an armature. You can then delete the one geometry node after it gets into Unity, or just not export it. You can then set up the sprites on each bone, or attach them to the bone.

Sounds like the easiest way to go about this. Its not that straightforward initially, but all of this can be automated later on.

Jeremy

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Attaching sprites to mesh
« Reply #2 on: March 13, 2013, 01:07:47 pm »
Unikron,

Thanks, I know I can child them to the meshes, and deactivate the meshes within Unity.  The problem is that many of my rotations around the bones in Blender are all messed up, and when I correct them in Blender it destroys the animations I already made, and there is no way I can see to correct for the rotations within Unity3D.  I'm trying my best to find out how to fix this problem in a simple way =0

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Attaching sprites to mesh
« Reply #3 on: March 13, 2013, 01:34:08 pm »
If the rotation errors are consistent, then maybe you could rotate the child sprites to compensate. But if they aren't consistent, there really isn't any way around this.