• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Helper classes for generating geometry?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

No replies to this topic

### #1Tocs  Members

Posted 05 October 2012 - 05:58 PM

I wanted to explore procedurally generating geometry for various things like buildings, weapons, spaceships, trees, etc... And realized I was rather ill-equipt to do so. So I was wondering if anyone had created some programming tools, or written about the issues involved.

Each one of those things are have some structure that then gets turned into a collection of vertices and indices. I'm not concered with generating the structure yet. (For example the floor plan of a building, or the branch structure of a tree.) That is a whole other problem. But rather how you turn those structures into an actual mesh.

My other experiences with generating geometry (such as height field terrain, marching cubes, and minecraft like voxels) have shown me its rather "messy" working with vertices and indices. I was very prone to screw ups and I had lots to worry about. Such as when you create vertices you need to worry about normals and texture coordinates. And when you create faces you need to worry about order/back facing.

Are there useful algorithms/tools to do things like make sure my texture coordinates are contiguous over a surface. Combine duplicate vertices? Stitch meshes together? Would I be better trying to do these things as I added/created vertices? Or as a "post-process" over the mesh? Or am I just going to have to deal with the "messyness" of it all?

Bottom line: I'd like to make some sort of MeshBuilder class that would make it easier to express the vertice/indice side of things so I can focus more on the aforementioned "structure". But I'm not sure where to go with it other than a list of vertices and faces, has anyone created something like this before?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.