Jump to content
  • Advertisement
Sign in to follow this  
ouraqt

OpenGL Real-Time Digital Sculpting

This topic is 3181 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

I'm working on an application that will allow users to digitally sculpt into a triangle mesh. Rendering is done in OpenGL. The basic concept is that users can sculpt into a mesh with a pillbox-shaped tool (a pillbox is a cylinder with half-spheres at the ends - it can also be thought of as a line segment with thickness radius r). The way the user moves this virtual tool around in space is irrelevant. But any time the tool intersects with the mesh, it should basically "subtract" away that intersecting portion. What is the best way to do this? My first approach was to simply move the vertices until they are no longer intersecting the mesh, but this doesn't account for when the tool goes all the way through the mesh to make a "hole" in the solid. How do I handle this? I was thinking of some method that never moves vertices around, but instead deletes the intersecting triangles/vertices and generates new ones around the boundary region. Is this a good approach? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
I'd get a copy of ZBrush and make careful observations of what happens to the verts when you perform these operations in their tool ;)

A simpler approach might be to perform the sculpting on voxel data structure and render using verts/triangles.

Share this post


Link to post
Share on other sites
As Hodgman says, voxels could be a good solution for this kind of problem. I have an Open Source library for handling their representation and conversion to triangles, and it was recently used to create a 'Dental Surgery Simulator' which seems like a similar application to what you are presenting.

Alternatively, you can try to operate on the raw triangle data. This is non-trivial but 'Constructive Solid Geometry' is the term to search Google for. You can also try faking the effect in image space using something like OpenCSG

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!