Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: combine seperate meshes into a single shape?  (Read 89 times)
frumbert
Community Member
*
Posts: 89


« on: September 06, 2008, 06:32:42 PM »

How do I go about joining two meshes together to form a single convex shape? I could just group them, but then I would potentially have triangles "inside" the object which will never get rendered and would screw with UV mapping big time, I'm sure, so this is not a valid consideration for me.

Say, in 3d, I have a cylinder and a sphere. The sphere shares the same "center" as the cylinder but has a higher radius - you would see a tube with a bulge in it. I'd like to combine both the tube and the sphere into a single convex face with no "interior" polygons.

Or, in 2d, I might want to just combine two regular polygons into a single shape.
Logged

For every solution there are an equal to or greater than number of exceptions.
sybixsus
Customers
Community Member
*****
Posts: 1088


WWW
« Reply #1 on: September 06, 2008, 06:40:22 PM »

You might want to look into CSG, Constructive Solid Geometry. Essentially it works along the lines of the boolean operators seen in various modelling programs. You can create a union, an addition and a subtraction.

There's a paper about it here:

http://www.leadwerks.com/files/csg.pdf

There are also LGPL libraries which can help:

http://gts.sourceforge.net/

http://www.cgal.org/
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks