Triangulator library

I have ported Nick Gravelyn’s Triangulator from XNA to Paradox Game Engine and made it available as a nuget package. Thought I’d share it here, maybe someone else can find it useful aswell.

Demo

In a nutshell, it’s a small library where you send a set of 2D points in and get data required to build vertex and index buffers out. You can also cut arbitrarily shaped holes into existing geometry which allows to create complex 2D shapes.

Link to original XNA project.
Link to ported Paradox project.

All credit to Nick Gravelyn!

A little side note: I must say that porting this from XNA was a blast! The entire process was really easy, didn’t really need any modifications and took less than an hour. It’s a great thing Paradox Game Engine has a similar API :wink:

4 Likes

Can you please provide some more visual examples?

Nice work, both Nick and yourself.

Looks pretty cool, I thought I should point out however that you can’t build this project without having the original textures which appear to be missing.

Thanks for pointing this out!! I assumed the texture was copied to RawAssets when I added it, but it seems it was linked instead from its original location. I’ll have this fixed asap.

I currently don’t have any other means to demonstrate this than what can be seen from the original post. It might be interesting to see the wireframe version of this where you can see how the triangles are generated for shapes such as those.

Screenshot

1 Like