1
Graphics / Tracing images to create Box2D objects
« on: November 17, 2011, 04:48:28 pm »
I wrote a Java program to create paths by tracing around sprites. The program outputs a series of coordinates for the path. I've also written an algorithm to simplify the path by selectively removing points. The path can then be directly used as an edge shape in Box2D or as a dynamic shape if you perform an triangulation. I've written a blog posts explaining the process in detail with full source code. The first tutorial covers how to trace around an image to create a path http://www.deluge.co/?q=box2d-tracing-shape-outlines the second explains how to simplify the path by selectively removing points http://www.deluge.co/?q=box2d-tracing-shape-outlines-part-2.