The resulting hero.p2d might look something like this (JSON example):
"version": 1,
"source": "hero.png",
"width": 128,
"height": 128,
"polygons": [
"type": "collision",
"vertices": [[12,0], [116,0], [128,12], [128,116], [116,128], [12,128], [0,116], [0,12]]
],
"simplification_tolerance": 1.2
Not all converters are created equal. Here are the features you should look for. png to p2d converter
| Feature | Why It Matters | |---------|----------------| | Batch Processing | Converts entire folders of PNGs to P2D without manual intervention. | | Tolerance Slider | Allows you to control polygon simplification (low tolerance = many vertices, high tolerance = boxy shape). | | Hole Detection | Recognizes donut-shaped sprites (e.g., a ring or tire) and creates inner polygons. | | Multiple Output Formats | Supports JSON, binary, or engine-specific P2D variants (Godot, Unity, Monogame). | | Normal Map Integration | Optionally embeds tangent space normal map references for dynamic lighting. | | CLI Support | Essential for integrating the converter into automated build pipelines (CI/CD). | The resulting hero