Hello Guest

Author Topic: [Creating a Customizable 2D Character] Creating Atlases Dynamically at Runtime  (Read 16662 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
I can't really comment about the spine integration as I didn't write it.
Try creating a sprite with it.
x and y is from the top left, corresponding to an image in Photoshop / TexturePacker / etc - you're probably just drawing a transparent part of the texture - creating a sprite with it will let you work that out quickly, you'll should at least see transparent geometry when the sprite is selected.

aikitect

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 14
    • View Profile
Great, I got it to work.  Now I'm running into one (hopefully) last issue.  When I actually output the character onto the screen, I get the attached image.  If you look closely, you will see a white outline around each body part of the character (the arms are a good example).  In addition, there are white pixels that appear above the left ear and to the right of the right ear that are not part of the source image.

Why is this happening?  I did some reading on it, and my hypothesis is that it is related to the shader that is used to create the RenderTexture.  Do you have any idea how I can fix this?

aikitect

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 14
    • View Profile
Nevermind figured it out.  I searched up another thread and found that I needed to turn on premultiplied alpha and set the shader to PreMulVertexColor.  Also, the weird pixels I saw were because I didn't include padding into my algorithm for generating the atlas texture.  Once I did that, everything worked.  Thank you so much for your help, this is amazing! :)