Hello Guest

Author Topic: Suggestion - Add a Generate Polygon Button on Sprite Collection Editor  (Read 2424 times)

wagenheimer

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 50
    • View Profile
Hi!

I suggest adding a generate polygon button when creating collision of sprites on a sprite collection.

There is an algorithm which is very easy to implement and gives good results,  "Graham's (1972) point elimination algorithm", basically you get all non alpha points of the image, runs the algorithm on it and it returns the final polygon! =)

I have ton of sprites and have to create all polygons by hand! This would be an excellent addition to 2DToolkit! =)

Is this possible?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Suggestion - Add a Generate Polygon Button on Sprite Collection Editor
« Reply #1 on: October 15, 2014, 10:49:01 pm »
Hi,

I've implemented a similar algorithm before for another project, but I don't have the time to implement something like that for 2D Toolkit. There are tk2d addons that already do contour detection - eg. http://2dtoolkit.com/forum/index.php?topic=1334.0