# (Best) methods for extruding, tesselating and edge types

This topic is 4966 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey guys, I'm wondering what techniques to use for extruding an arbitrary surface (convex list of points) into a 3D object, tesselate it, and possibly have 45 degree edges, rounded edges etc? Anyone implemented something like this and could point me in the correct direction? (solid tesselation algo's very welcome) thx

##### Share on other sites
If your list of points is convex then you should have an easy time of it. Extrusion can be done very simply by simply offseting a copy of the extrusion surface along the normal vector by some distance. Then to connect the two up, you simply draw triangles between the corresponding points on both the extruded and original surface.

Tesselating a convex surface is also very easy. You can use a recursive algorithm that picks one point, then it's two neighbors, and makes a triangle out of those. Then delete the middle point from the surface and continue onwards. This can lead to bad artifacts however, so you may want to look into voronoi triangulations which are more complicated to code, but will give you equal area triangles over your surface so there will not be shading irregularities.

Bevelling is also quite easy. All you have to do is inset your surface along a path in 3d to generate your desired bevel. You can draw this path in 2d, and then apply it to the surface to generate your bevel. Insetting is also very easy for convex objects, all you have to do is shrink your surface, essentially apply a scaling factor to it.

All of this is much more difficult if you have concave objects however. Especially the bevelling. If you have objects with holes then it gets even more fun :).

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 11
• 12
• 10
• 11
• 13
• ### Forum Statistics

• Total Topics
634096
• Total Posts
3015480
×