Jump to content
  • Advertisement
Sign in to follow this  
BaSSraf

(Best) methods for extruding, tesselating and edge types

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 :).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!