Create 3D out of Vertices

Nov 5, 2010 at 10:49 AM

Hi!

I'm making a game that will contain many dynamically created shapes, and therefore I have decided to create all of my objects out of vertices.

I thought that the fastest way would be throught 3D triangles, as dynamic 2D images is hard on the CPU. So now I'm stuck having no idea of how to convert my Vertices into flat 3D models...

Does anyone know an algorithm or a function for doing this?

Coordinator
Nov 6, 2010 at 4:15 AM

We only support 2D shapes and 2D tools. Could you explain what you are trying to accomplish?

Nov 6, 2010 at 9:01 AM

First you have to triangulate the shape (break it up into triangles). Then create the 3D vertexes for each triangle, using the same x,y points but leaving z = 0, and whatever color/uv coordinates you want. You can then render the vertexes as a trianglelist.

Farseer has it's own triangulation algorithm in EarClipDecomposer.cs. There is also Poly2Tri, which is more advanced and supports holes, but Earclip decomposer should be fine for everything else.