Thread: [Algorithms] CSG operations on textured meshes -- something better than CGAL?
Brought to you by:
vexxed72
From: Jon W. <jw...@gm...> - 2014-05-08 18:08:11
|
I have a triangle mesh composed of many submeshes with different textures/materials. This mesh may not be a 2-manifold -- it may have open edges. Typical game art. I now want to create a 3mm thick shell of this mesh. As an approximation, taking each triangle, and extrude it back along the normal of each vertex, and union all of those generated chopped pyramids would be an approximation of what I want. If I do literally that, and self-union the result, then that should resolve the self-intersection problems I'll run into along narrow sharp creases etc. I can't find any library to do this, though. CGAL has some fairly robust functions on NEF polyhedra, but those polyhedra don't seem to allow parameterization (which is academic speak for texture coordinates that may have discontinuities across edges.) So, what are some robust CSG libraries available that work on such game-style meshes, preserving texture coordinates? (And actually, I don't have one such mesh; I have > 120 million such meshes, so a by-hand or even script-the-Max-shell-modifier solution is unlikely to work. I do have hundreds of Linux servers at my disposal, though.) Sincerely, Jon Watte -- "I find that the harder I work, the more luck I seem to have." -- Thomas Jefferson |
From: Robin G. <rob...@gm...> - 2014-05-08 19:08:48
|
May I suggest another route? Implicit surfaces provide the kind of distance-field and union operations you need quite simply, and the results can be polygonalized using extremely robust, mature libraries. I know implicit surfaces haven't been a hot topic at Siggraph for years, but they are still useful for solving specific problem sets. - Robin Green. On Thu, May 8, 2014 at 11:08 AM, Jon Watte <jw...@gm...> wrote: > I have a triangle mesh composed of many submeshes with different > textures/materials. This mesh may not be a 2-manifold -- it may have open > edges. Typical game art. > > I now want to create a 3mm thick shell of this mesh. As an approximation, > taking each triangle, and extrude it back along the normal of each vertex, > and union all of those generated chopped pyramids would be an approximation > of what I want. If I do literally that, and self-union the result, then > that should resolve the self-intersection problems I'll run into along > narrow sharp creases etc. > > I can't find any library to do this, though. CGAL has some fairly robust > functions on NEF polyhedra, but those polyhedra don't seem to allow > parameterization (which is academic speak for texture coordinates that may > have discontinuities across edges.) > > So, what are some robust CSG libraries available that work on such > game-style meshes, preserving texture coordinates? > > (And actually, I don't have one such mesh; I have > 120 million such > meshes, so a by-hand or even script-the-Max-shell-modifier solution is > unlikely to work. I do have hundreds of Linux servers at my disposal, > though.) > > > Sincerely, > > Jon Watte > > > -- > "I find that the harder I work, the more luck I seem to have." -- Thomas > Jefferson > > > ------------------------------------------------------------------------------ > Is your legacy SCM system holding you back? Join Perforce May 7 to find > out: > • 3 signs your SCM is hindering your productivity > • Requirements for releasing software faster > • Expert tips and advice for migrating your SCM now > http://p.sf.net/sfu/perforce > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: Chris G. <cg...@va...> - 2014-05-08 19:43:54
|
I don’t believe you will be able to use your existing uv values with the mesh that results from this csg operation – it has a different topology, and there will be changes in the ratios of the areas of different parts of the model, with really bumpy areas of the mesh being smoothed out, etc. You’ll even have brand new areas emerge that don’t have corresponding areas on the original model, as holes are filled in, etc. What might work better is to just do the csg operation and generate a uv atlas for the resultant mesh. You can then generate a new texture map for this uv parametization by sampling from the original one, in a similar manner to the way in which people produce bumpmaps mapping the normals of highly tessellated models onto low-detail models. From: Jon Watte [mailto:jw...@gm...] Sent: Thursday, May 08, 2014 11:08 AM To: Game Development Algorithms Subject: [Algorithms] CSG operations on textured meshes -- something better than CGAL? I have a triangle mesh composed of many submeshes with different textures/materials. This mesh may not be a 2-manifold -- it may have open edges. Typical game art. I now want to create a 3mm thick shell of this mesh. As an approximation, taking each triangle, and extrude it back along the normal of each vertex, and union all of those generated chopped pyramids would be an approximation of what I want. If I do literally that, and self-union the result, then that should resolve the self-intersection problems I'll run into along narrow sharp creases etc. I can't find any library to do this, though. CGAL has some fairly robust functions on NEF polyhedra, but those polyhedra don't seem to allow parameterization (which is academic speak for texture coordinates that may have discontinuities across edges.) So, what are some robust CSG libraries available that work on such game-style meshes, preserving texture coordinates? (And actually, I don't have one such mesh; I have > 120 million such meshes, so a by-hand or even script-the-Max-shell-modifier solution is unlikely to work. I do have hundreds of Linux servers at my disposal, though.) Sincerely, Jon Watte -- "I find that the harder I work, the more luck I seem to have." -- Thomas Jefferson |
From: Jon W. <jw...@gm...> - 2014-05-13 23:41:37
|
> > I don’t believe you will be able to use your existing uv values with the > mesh that results from this csg operation The operations I want to do are rigid and well conditioned and do not stretch or generate new surfaces compared to the input meshes. They may invert the winding of triangles, though (so normal maps would have to be flipped) in the case of a cut-out. I also need to preserve vertex bone weighting, too... something that can preserve UV should be able to preserve that, too. Worst case, I put in a vertex ID value in the UV channel and loop up the other parameters based on that. So... no general purpose parameterized trimesh CSG library available? Sincerely, jw Sincerely, Jon Watte -- "I find that the harder I work, the more luck I seem to have." -- Thomas Jefferson On Thu, May 8, 2014 at 12:28 PM, Chris Green <cg...@va...>wrote: > I don’t believe you will be able to use your existing uv values with the > mesh that results from this csg operation – it has a different topology, > and there will be changes in the ratios of the areas of different parts of > the model, with really bumpy areas of the mesh being smoothed out, etc. > You’ll even have brand new areas emerge that don’t have corresponding areas > on the original model, as holes are filled in, etc. > > > > What might work better is to just do the csg operation and generate a uv > atlas for the resultant mesh. You can then generate a new texture map for > this uv parametization by sampling from the original one, in a similar > manner to the way in which people produce bumpmaps mapping the normals of > highly tessellated models onto low-detail models. > > > > > > > > *From:* Jon Watte [mailto:jw...@gm...] > *Sent:* Thursday, May 08, 2014 11:08 AM > *To:* Game Development Algorithms > *Subject:* [Algorithms] CSG operations on textured meshes -- something > better than CGAL? > > > > I have a triangle mesh composed of many submeshes with different > textures/materials. This mesh may not be a 2-manifold -- it may have open > edges. Typical game art. > > > > I now want to create a 3mm thick shell of this mesh. As an approximation, > taking each triangle, and extrude it back along the normal of each vertex, > and union all of those generated chopped pyramids would be an approximation > of what I want. If I do literally that, and self-union the result, then > that should resolve the self-intersection problems I'll run into along > narrow sharp creases etc. > > > > I can't find any library to do this, though. CGAL has some fairly robust > functions on NEF polyhedra, but those polyhedra don't seem to allow > parameterization (which is academic speak for texture coordinates that may > have discontinuities across edges.) > > > > So, what are some robust CSG libraries available that work on such > game-style meshes, preserving texture coordinates? > > > > (And actually, I don't have one such mesh; I have > 120 million such > meshes, so a by-hand or even script-the-Max-shell-modifier solution is > unlikely to work. I do have hundreds of Linux servers at my disposal, > though.) > > > > Sincerely, > > Jon Watte > > > -- > "I find that the harder I work, the more luck I seem to have." -- Thomas > Jefferson > > > ------------------------------------------------------------------------------ > Is your legacy SCM system holding you back? Join Perforce May 7 to find > out: > • 3 signs your SCM is hindering your productivity > • Requirements for releasing software faster > • Expert tips and advice for migrating your SCM now > http://p.sf.net/sfu/perforce > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: James R. <ja...@os...> - 2014-05-14 05:25:38
|
You are going to be distorting triangles in different ways depending on the overall shape of the mesh at any given point though. If you just retain existing UV coordinates for the new vertices, the results will be... strange. Consider the case where a convex region meets a concave one. One side of the triangle will be slightly expanded, while the other side will be contracted. Of course you know your input data better than us, so maybe such distortions are acceptable or won't be noticeable, but they will be there. On 14/05/2014 01:41, Jon Watte wrote: > > I don't believe you will be able to use your existing uv values with the mesh that results from this csg operation > > > The operations I want to do are rigid and well conditioned and do not stretch or generate new surfaces compared to the input meshes. They may invert the winding of triangles, though (so normal maps would have to be flipped) in the case of a cut-out. > I also need to preserve vertex bone weighting, too... something that can preserve UV should be able to preserve that, too. Worst case, I put in a vertex ID value in the UV channel and loop up the other parameters based on that. > > So... no general purpose parameterized trimesh CSG library available? > > Sincerely, > > jw > > > > > > Sincerely, > > Jon Watte > > > -- > "I find that the harder I work, the more luck I seem to have." -- Thomas Jefferson > > > On Thu, May 8, 2014 at 12:28 PM, Chris Green <cg...@va... <mailto:cg...@va...>> wrote: > > I don't believe you will be able to use your existing uv values with the mesh that results from this csg operation -- it has a different topology, and there will be changes in the ratios of the areas of different parts of the model, with really bumpy areas of the mesh being smoothed out, etc. You'll even have brand new areas emerge that don't have corresponding areas on the original model, as holes are filled in, etc. > > What might work better is to just do the csg operation and generate a uv atlas for the resultant mesh. You can then generate a new texture map for this uv parametization by sampling from the original one, in a similar manner to the way in which people produce bumpmaps mapping the normals of highly tessellated models onto low-detail models. > > *From:*Jon Watte [mailto:jw...@gm... <mailto:jw...@gm...>] > *Sent:* Thursday, May 08, 2014 11:08 AM > *To:* Game Development Algorithms > *Subject:* [Algorithms] CSG operations on textured meshes -- something better than CGAL? > > I have a triangle mesh composed of many submeshes with different textures/materials. This mesh may not be a 2-manifold -- it may have open edges. Typical game art. > > I now want to create a 3mm thick shell of this mesh. As an approximation, taking each triangle, and extrude it back along the normal of each vertex, and union all of those generated chopped pyramids would be an approximation of what I want. If I do literally that, and self-union the result, then that should resolve the self-intersection problems I'll run into along narrow sharp creases etc. > > I can't find any library to do this, though. CGAL has some fairly robust functions on NEF polyhedra, but those polyhedra don't seem to allow parameterization (which is academic speak for texture coordinates that may have discontinuities across edges.) > > So, what are some robust CSG libraries available that work on such game-style meshes, preserving texture coordinates? > > (And actually, I don't have one such mesh; I have > 120 million such meshes, so a by-hand or even script-the-Max-shell-modifier solution is unlikely to work. I do have hundreds of Linux servers at my disposal, though.) > > > > Sincerely, > > Jon Watte > > > -- > "I find that the harder I work, the more luck I seem to have." -- Thomas Jefferson > > > ------------------------------------------------------------------------------ > Is your legacy SCM system holding you back? Join Perforce May 7 to find out: > • 3 signs your SCM is hindering your productivity > • Requirements for releasing software faster > • Expert tips and advice for migrating your SCM now > http://p.sf.net/sfu/perforce > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... <mailto:GDA...@li...> > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com |
From: Jon W. <jw...@gm...> - 2014-05-21 15:05:57
|
> You are going to be distorting triangles in different ways depending on the overall shape of the mesh at any given point though. > If you just retain existing UV coordinates for the new vertices, the results will be... strange. I do this operation with some frequency in 3ds Max, and it works the way I expect there. The 3ds Max boolean (and proboolean) modifier behavior would be good enough for my purposes, although they do have some edge cases and limitaitons (a k a "bugs" :-) But I don't want to buy a copy of 3ds Max per server that will be running this code, not to mention I want to run the servers on Linux. So, does anyone know of any textured-triangle-mesh CSG library out there, free or paid for, that would work? Sincerely, jw Sincerely, Jon Watte -- "I find that the harder I work, the more luck I seem to have." -- Thomas Jefferson On Tue, May 13, 2014 at 10:07 PM, James Robertson <ja...@os...> wrote: > You are going to be distorting triangles in different ways depending on > the overall shape of the mesh at any given point though. If you just > retain existing UV coordinates for the new vertices, the results will > be... strange. > > Consider the case where a convex region meets a concave one. One side of > the triangle will be slightly expanded, while the other side will be > contracted. Of course you know your input data better than us, so maybe > such distortions are acceptable or won't be noticeable, but they will be > there. > > > > On 14/05/2014 01:41, Jon Watte wrote: > > I don’t believe you will be able to use your existing uv values with the >> mesh that results from this csg operation > > > The operations I want to do are rigid and well conditioned and do not > stretch or generate new surfaces compared to the input meshes. They may > invert the winding of triangles, though (so normal maps would have to be > flipped) in the case of a cut-out. > I also need to preserve vertex bone weighting, too... something that can > preserve UV should be able to preserve that, too. Worst case, I put in a > vertex ID value in the UV channel and loop up the other parameters based on > that. > > So... no general purpose parameterized trimesh CSG library available? > > Sincerely, > > jw > > > > > > Sincerely, > > Jon Watte > > > -- > "I find that the harder I work, the more luck I seem to have." -- Thomas > Jefferson > > > On Thu, May 8, 2014 at 12:28 PM, Chris Green <cg...@va...>wrote: > >> I don’t believe you will be able to use your existing uv values with >> the mesh that results from this csg operation – it has a different >> topology, and there will be changes in the ratios of the areas of different >> parts of the model, with really bumpy areas of the mesh being smoothed out, >> etc. You’ll even have brand new areas emerge that don’t have corresponding >> areas on the original model, as holes are filled in, etc. >> >> >> >> What might work better is to just do the csg operation and generate a uv >> atlas for the resultant mesh. You can then generate a new texture map for >> this uv parametization by sampling from the original one, in a similar >> manner to the way in which people produce bumpmaps mapping the normals of >> highly tessellated models onto low-detail models. >> >> >> >> >> >> >> >> *From:* Jon Watte [mailto:jw...@gm...] >> *Sent:* Thursday, May 08, 2014 11:08 AM >> *To:* Game Development Algorithms >> *Subject:* [Algorithms] CSG operations on textured meshes -- something >> better than CGAL? >> >> >> >> I have a triangle mesh composed of many submeshes with different >> textures/materials. This mesh may not be a 2-manifold -- it may have open >> edges. Typical game art. >> >> >> >> I now want to create a 3mm thick shell of this mesh. As an approximation, >> taking each triangle, and extrude it back along the normal of each vertex, >> and union all of those generated chopped pyramids would be an approximation >> of what I want. If I do literally that, and self-union the result, then >> that should resolve the self-intersection problems I'll run into along >> narrow sharp creases etc. >> >> >> >> I can't find any library to do this, though. CGAL has some fairly robust >> functions on NEF polyhedra, but those polyhedra don't seem to allow >> parameterization (which is academic speak for texture coordinates that may >> have discontinuities across edges.) >> >> >> >> So, what are some robust CSG libraries available that work on such >> game-style meshes, preserving texture coordinates? >> >> >> >> (And actually, I don't have one such mesh; I have > 120 million such >> meshes, so a by-hand or even script-the-Max-shell-modifier solution is >> unlikely to work. I do have hundreds of Linux servers at my disposal, >> though.) >> >> >> >> Sincerely, >> >> Jon Watte >> >> >> -- >> "I find that the harder I work, the more luck I seem to have." -- Thomas >> Jefferson >> >> >> ------------------------------------------------------------------------------ >> Is your legacy SCM system holding you back? Join Perforce May 7 to find >> out: >> • 3 signs your SCM is hindering your productivity >> • Requirements for releasing software faster >> • Expert tips and advice for migrating your SCM now >> http://p.sf.net/sfu/perforce >> _______________________________________________ >> GDAlgorithms-list mailing list >> GDA...@li... >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >> > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free."http://p.sf.net/sfu/SauceLabs > > > > _______________________________________________ > GDAlgorithms-list mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives:http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > > > ------------------------------ > <http://www.avast.com/> > > This email is free from viruses and malware because avast! Antivirus<http://www.avast.com/>protection is active. > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: Eric H. <eri...@gm...> - 2014-05-21 15:38:53
|
I'd certainly like to know, too. MeshLab might have one hiding in its bowels, but I haven't looked hard enough yet. MeshMixer looks super-cool, but appears to be just an application, not a library. On Wed, May 21, 2014 at 11:05 AM, Jon Watte <jw...@gm...> wrote: > > You are going to be distorting triangles in different ways depending on > the overall shape of the mesh at any given point though. > > If you just retain existing UV coordinates for the new vertices, the > results will be... strange. > > I do this operation with some frequency in 3ds Max, and it works the way I > expect there. > > The 3ds Max boolean (and proboolean) modifier behavior would be good > enough for my purposes, although they do have some edge cases and > limitaitons (a k a "bugs" :-) > But I don't want to buy a copy of 3ds Max per server that will be running > this code, not to mention I want to run the servers on Linux. > > So, does anyone know of any textured-triangle-mesh CSG library out there, > free or paid for, that would work? > > Sincerely, > > jw > > > > > > > Sincerely, > > Jon Watte > > > -- > "I find that the harder I work, the more luck I seem to have." -- Thomas > Jefferson > > > On Tue, May 13, 2014 at 10:07 PM, James Robertson <ja...@os...>wrote: > >> You are going to be distorting triangles in different ways depending on >> the overall shape of the mesh at any given point though. If you just >> retain existing UV coordinates for the new vertices, the results will >> be... strange. >> >> Consider the case where a convex region meets a concave one. One side of >> the triangle will be slightly expanded, while the other side will be >> contracted. Of course you know your input data better than us, so maybe >> such distortions are acceptable or won't be noticeable, but they will be >> there. >> >> >> >> On 14/05/2014 01:41, Jon Watte wrote: >> >> I don’t believe you will be able to use your existing uv values with >>> the mesh that results from this csg operation >> >> >> The operations I want to do are rigid and well conditioned and do not >> stretch or generate new surfaces compared to the input meshes. They may >> invert the winding of triangles, though (so normal maps would have to be >> flipped) in the case of a cut-out. >> I also need to preserve vertex bone weighting, too... something that can >> preserve UV should be able to preserve that, too. Worst case, I put in a >> vertex ID value in the UV channel and loop up the other parameters based on >> that. >> >> So... no general purpose parameterized trimesh CSG library available? >> >> Sincerely, >> >> jw >> >> >> >> >> >> Sincerely, >> >> Jon Watte >> >> >> -- >> "I find that the harder I work, the more luck I seem to have." -- Thomas >> Jefferson >> >> >> On Thu, May 8, 2014 at 12:28 PM, Chris Green <cg...@va...>wrote: >> >>> I don’t believe you will be able to use your existing uv values with >>> the mesh that results from this csg operation – it has a different >>> topology, and there will be changes in the ratios of the areas of different >>> parts of the model, with really bumpy areas of the mesh being smoothed out, >>> etc. You’ll even have brand new areas emerge that don’t have corresponding >>> areas on the original model, as holes are filled in, etc. >>> >>> >>> >>> What might work better is to just do the csg operation and generate a uv >>> atlas for the resultant mesh. You can then generate a new texture map for >>> this uv parametization by sampling from the original one, in a similar >>> manner to the way in which people produce bumpmaps mapping the normals of >>> highly tessellated models onto low-detail models. >>> >>> >>> >>> >>> >>> >>> >>> *From:* Jon Watte [mailto:jw...@gm...] >>> *Sent:* Thursday, May 08, 2014 11:08 AM >>> *To:* Game Development Algorithms >>> *Subject:* [Algorithms] CSG operations on textured meshes -- something >>> better than CGAL? >>> >>> >>> >>> I have a triangle mesh composed of many submeshes with different >>> textures/materials. This mesh may not be a 2-manifold -- it may have open >>> edges. Typical game art. >>> >>> >>> >>> I now want to create a 3mm thick shell of this mesh. As an >>> approximation, taking each triangle, and extrude it back along the normal >>> of each vertex, and union all of those generated chopped pyramids would be >>> an approximation of what I want. If I do literally that, and self-union the >>> result, then that should resolve the self-intersection problems I'll run >>> into along narrow sharp creases etc. >>> >>> >>> >>> I can't find any library to do this, though. CGAL has some fairly robust >>> functions on NEF polyhedra, but those polyhedra don't seem to allow >>> parameterization (which is academic speak for texture coordinates that may >>> have discontinuities across edges.) >>> >>> >>> >>> So, what are some robust CSG libraries available that work on such >>> game-style meshes, preserving texture coordinates? >>> >>> >>> >>> (And actually, I don't have one such mesh; I have > 120 million such >>> meshes, so a by-hand or even script-the-Max-shell-modifier solution is >>> unlikely to work. I do have hundreds of Linux servers at my disposal, >>> though.) >>> >>> >>> >>> Sincerely, >>> >>> Jon Watte >>> >>> >>> -- >>> "I find that the harder I work, the more luck I seem to have." -- >>> Thomas Jefferson >>> >>> >>> ------------------------------------------------------------------------------ >>> Is your legacy SCM system holding you back? Join Perforce May 7 to find >>> out: >>> • 3 signs your SCM is hindering your productivity >>> • Requirements for releasing software faster >>> • Expert tips and advice for migrating your SCM now >>> http://p.sf.net/sfu/perforce >>> _______________________________________________ >>> GDAlgorithms-list mailing list >>> GDA...@li... >>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>> Archives: >>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>> >> >> >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform available >> Simple to use. Nothing to install. Get started now for free."http://p.sf.net/sfu/SauceLabs >> >> >> >> _______________________________________________ >> GDAlgorithms-list mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives:http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >> >> >> >> >> ------------------------------ >> <http://www.avast.com/> >> >> This email is free from viruses and malware because avast! Antivirus<http://www.avast.com/>protection is active. >> >> >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform >> available >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> GDAlgorithms-list mailing list >> GDA...@li... >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >> > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: Vilya H. <vil...@gm...> - 2014-05-21 16:10:49
|
Have you come across Carve CSG? The repository is here: https://code.google.com/p/carve/ I haven't used the library myself, but the website does mention that it handles interpolating texture coordinates (and other arbitrary attributes) correctly across the output mesh. Hope that's useful, Vil. On 21 May 2014 16:38, Eric Haines <eri...@gm...> wrote: > I'd certainly like to know, too. MeshLab might have one hiding in its > bowels, but I haven't looked hard enough yet. MeshMixer looks super-cool, > but appears to be just an application, not a library. > > > On Wed, May 21, 2014 at 11:05 AM, Jon Watte <jw...@gm...> wrote: > >> > You are going to be distorting triangles in different ways depending on >> the overall shape of the mesh at any given point though. >> > If you just retain existing UV coordinates for the new vertices, the >> results will be... strange. >> >> I do this operation with some frequency in 3ds Max, and it works the way >> I expect there. >> >> The 3ds Max boolean (and proboolean) modifier behavior would be good >> enough for my purposes, although they do have some edge cases and >> limitaitons (a k a "bugs" :-) >> But I don't want to buy a copy of 3ds Max per server that will be running >> this code, not to mention I want to run the servers on Linux. >> >> So, does anyone know of any textured-triangle-mesh CSG library out there, >> free or paid for, that would work? >> >> Sincerely, >> >> jw >> >> >> >> >> >> >> Sincerely, >> >> Jon Watte >> >> >> -- >> "I find that the harder I work, the more luck I seem to have." -- Thomas >> Jefferson >> >> >> On Tue, May 13, 2014 at 10:07 PM, James Robertson <ja...@os...>wrote: >> >>> You are going to be distorting triangles in different ways depending on >>> the overall shape of the mesh at any given point though. If you just >>> retain existing UV coordinates for the new vertices, the results will >>> be... strange. >>> >>> Consider the case where a convex region meets a concave one. One side >>> of the triangle will be slightly expanded, while the other side will be >>> contracted. Of course you know your input data better than us, so maybe >>> such distortions are acceptable or won't be noticeable, but they will be >>> there. >>> >>> >>> >>> On 14/05/2014 01:41, Jon Watte wrote: >>> >>> I don’t believe you will be able to use your existing uv values with >>>> the mesh that results from this csg operation >>> >>> >>> The operations I want to do are rigid and well conditioned and do not >>> stretch or generate new surfaces compared to the input meshes. They may >>> invert the winding of triangles, though (so normal maps would have to be >>> flipped) in the case of a cut-out. >>> I also need to preserve vertex bone weighting, too... something that can >>> preserve UV should be able to preserve that, too. Worst case, I put in a >>> vertex ID value in the UV channel and loop up the other parameters based on >>> that. >>> >>> So... no general purpose parameterized trimesh CSG library available? >>> >>> Sincerely, >>> >>> jw >>> >>> >>> >>> >>> >>> Sincerely, >>> >>> Jon Watte >>> >>> >>> -- >>> "I find that the harder I work, the more luck I seem to have." -- >>> Thomas Jefferson >>> >>> >>> On Thu, May 8, 2014 at 12:28 PM, Chris Green <cg...@va...>wrote: >>> >>>> I don’t believe you will be able to use your existing uv values with >>>> the mesh that results from this csg operation – it has a different >>>> topology, and there will be changes in the ratios of the areas of different >>>> parts of the model, with really bumpy areas of the mesh being smoothed out, >>>> etc. You’ll even have brand new areas emerge that don’t have corresponding >>>> areas on the original model, as holes are filled in, etc. >>>> >>>> >>>> >>>> What might work better is to just do the csg operation and generate a >>>> uv atlas for the resultant mesh. You can then generate a new texture map >>>> for this uv parametization by sampling from the original one, in a similar >>>> manner to the way in which people produce bumpmaps mapping the normals of >>>> highly tessellated models onto low-detail models. >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *From:* Jon Watte [mailto:jw...@gm...] >>>> *Sent:* Thursday, May 08, 2014 11:08 AM >>>> *To:* Game Development Algorithms >>>> *Subject:* [Algorithms] CSG operations on textured meshes -- something >>>> better than CGAL? >>>> >>>> >>>> >>>> I have a triangle mesh composed of many submeshes with different >>>> textures/materials. This mesh may not be a 2-manifold -- it may have open >>>> edges. Typical game art. >>>> >>>> >>>> >>>> I now want to create a 3mm thick shell of this mesh. As an >>>> approximation, taking each triangle, and extrude it back along the normal >>>> of each vertex, and union all of those generated chopped pyramids would be >>>> an approximation of what I want. If I do literally that, and self-union the >>>> result, then that should resolve the self-intersection problems I'll run >>>> into along narrow sharp creases etc. >>>> >>>> >>>> >>>> I can't find any library to do this, though. CGAL has some fairly >>>> robust functions on NEF polyhedra, but those polyhedra don't seem to allow >>>> parameterization (which is academic speak for texture coordinates that may >>>> have discontinuities across edges.) >>>> >>>> >>>> >>>> So, what are some robust CSG libraries available that work on such >>>> game-style meshes, preserving texture coordinates? >>>> >>>> >>>> >>>> (And actually, I don't have one such mesh; I have > 120 million such >>>> meshes, so a by-hand or even script-the-Max-shell-modifier solution is >>>> unlikely to work. I do have hundreds of Linux servers at my disposal, >>>> though.) >>>> >>>> >>>> >>>> Sincerely, >>>> >>>> Jon Watte >>>> >>>> >>>> -- >>>> "I find that the harder I work, the more luck I seem to have." -- >>>> Thomas Jefferson >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Is your legacy SCM system holding you back? Join Perforce May 7 to find >>>> out: >>>> • 3 signs your SCM is hindering your productivity >>>> • Requirements for releasing software faster >>>> • Expert tips and advice for migrating your SCM now >>>> http://p.sf.net/sfu/perforce >>>> _______________________________________________ >>>> GDAlgorithms-list mailing list >>>> GDA...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>>> Archives: >>>> >>>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >>> Instantly run your Selenium tests across 300+ browser/OS combos. >>> Get unparalleled scalability from the best Selenium testing platform available >>> Simple to use. Nothing to install. Get started now for free."http://p.sf.net/sfu/SauceLabs >>> >>> >>> >>> _______________________________________________ >>> GDAlgorithms-list mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>> Archives:http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>> >>> >>> >>> >>> ------------------------------ >>> <http://www.avast.com/> >>> >>> This email is free from viruses and malware because avast! Antivirus<http://www.avast.com/>protection is active. >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >>> Instantly run your Selenium tests across 300+ browser/OS combos. >>> Get unparalleled scalability from the best Selenium testing platform >>> available >>> Simple to use. Nothing to install. Get started now for free." >>> http://p.sf.net/sfu/SauceLabs >>> _______________________________________________ >>> GDAlgorithms-list mailing list >>> GDA...@li... >>> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >>> Archives: >>> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >>> >> >> >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform >> available >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> GDAlgorithms-list mailing list >> GDA...@li... >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >> > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |
From: Graham R. ARA/S. <gr...@ar...> - 2014-05-21 20:05:54
|
Components of the IntegrityWare SOLIDS++ commercial middleware may be useful. For example: http://www.integrityware.com/meshlib.html Not sure how they handle interpolating vertex attributes, though. They might support a user-provided function for that. Beyond that, we use Spatial’s ACIS library for some quite complex CSG work. This adds another level of cost and complexity through, being primarily used in the CAD industry. It does support non-manifold topology, regularized and non-regularized solids, provides built-in functions to do operations such as extruding or offsetting a sheet into a thickened solid, geometry healing, etc. ACIS is extremely flexible in the way you can attribute intermediate surfaces and edge lists that arise during the evaluation of CSG ops. And there are the ACIS competitors…Parasolid, Granite, Open Cascade (assuming these others still exist…my knowledge of solid modeling kernels is slightly stale now). Graham From: Eric Haines [mailto:eri...@gm...] Sent: Wednesday, May 21, 2014 11:39 AM To: Game Development Algorithms Subject: Re: [Algorithms] CSG operations on textured meshes -- something better than CGAL? I'd certainly like to know, too. MeshLab might have one hiding in its bowels, but I haven't looked hard enough yet. MeshMixer looks super-cool, but appears to be just an application, not a library. On Wed, May 21, 2014 at 11:05 AM, Jon Watte <jw...@gm...<mailto:jw...@gm...>> wrote: > You are going to be distorting triangles in different ways depending on the overall shape of the mesh at any given point though. > If you just retain existing UV coordinates for the new vertices, the results will be... strange. I do this operation with some frequency in 3ds Max, and it works the way I expect there. The 3ds Max boolean (and proboolean) modifier behavior would be good enough for my purposes, although they do have some edge cases and limitaitons (a k a "bugs" :-) But I don't want to buy a copy of 3ds Max per server that will be running this code, not to mention I want to run the servers on Linux. So, does anyone know of any textured-triangle-mesh CSG library out there, free or paid for, that would work? Sincerely, jw Sincerely, Jon Watte -- "I find that the harder I work, the more luck I seem to have." -- Thomas Jefferson On Tue, May 13, 2014 at 10:07 PM, James Robertson <ja...@os...<mailto:ja...@os...>> wrote: You are going to be distorting triangles in different ways depending on the overall shape of the mesh at any given point though. If you just retain existing UV coordinates for the new vertices, the results will be... strange. Consider the case where a convex region meets a concave one. One side of the triangle will be slightly expanded, while the other side will be contracted. Of course you know your input data better than us, so maybe such distortions are acceptable or won't be noticeable, but they will be there. On 14/05/2014 01:41, Jon Watte wrote: I don’t believe you will be able to use your existing uv values with the mesh that results from this csg operation The operations I want to do are rigid and well conditioned and do not stretch or generate new surfaces compared to the input meshes. They may invert the winding of triangles, though (so normal maps would have to be flipped) in the case of a cut-out. I also need to preserve vertex bone weighting, too... something that can preserve UV should be able to preserve that, too. Worst case, I put in a vertex ID value in the UV channel and loop up the other parameters based on that. So... no general purpose parameterized trimesh CSG library available? Sincerely, jw Sincerely, Jon Watte -- "I find that the harder I work, the more luck I seem to have." -- Thomas Jefferson On Thu, May 8, 2014 at 12:28 PM, Chris Green <cg...@va...<mailto:cg...@va...>> wrote: I don’t believe you will be able to use your existing uv values with the mesh that results from this csg operation – it has a different topology, and there will be changes in the ratios of the areas of different parts of the model, with really bumpy areas of the mesh being smoothed out, etc. You’ll even have brand new areas emerge that don’t have corresponding areas on the original model, as holes are filled in, etc. What might work better is to just do the csg operation and generate a uv atlas for the resultant mesh. You can then generate a new texture map for this uv parametization by sampling from the original one, in a similar manner to the way in which people produce bumpmaps mapping the normals of highly tessellated models onto low-detail models. From: Jon Watte [mailto:jw...@gm...<mailto:jw...@gm...>] Sent: Thursday, May 08, 2014 11:08 AM To: Game Development Algorithms Subject: [Algorithms] CSG operations on textured meshes -- something better than CGAL? I have a triangle mesh composed of many submeshes with different textures/materials. This mesh may not be a 2-manifold -- it may have open edges. Typical game art. I now want to create a 3mm thick shell of this mesh. As an approximation, taking each triangle, and extrude it back along the normal of each vertex, and union all of those generated chopped pyramids would be an approximation of what I want. If I do literally that, and self-union the result, then that should resolve the self-intersection problems I'll run into along narrow sharp creases etc. I can't find any library to do this, though. CGAL has some fairly robust functions on NEF polyhedra, but those polyhedra don't seem to allow parameterization (which is academic speak for texture coordinates that may have discontinuities across edges.) So, what are some robust CSG libraries available that work on such game-style meshes, preserving texture coordinates? (And actually, I don't have one such mesh; I have > 120 million such meshes, so a by-hand or even script-the-Max-shell-modifier solution is unlikely to work. I do have hundreds of Linux servers at my disposal, though.) Sincerely, Jon Watte |
From: Jon W. <jw...@gm...> - 2014-05-27 16:20:42
|
That's actually quite helpful! Thanks. Sincerely, Jon Watte -- "I find that the harder I work, the more luck I seem to have." -- Thomas Jefferson On Wed, May 21, 2014 at 12:53 PM, Graham Rhodes ARA/SED <gr...@ar...>wrote: > Components of the IntegrityWare SOLIDS++ commercial middleware may be > useful. For example: > > > > http://www.integrityware.com/meshlib.html > > > > Not sure how they handle interpolating vertex attributes, though. They > might support a user-provided function for that. > > > > Beyond that, we use Spatial’s ACIS library for some quite complex CSG > work. This adds another level of cost and complexity through, being > primarily used in the CAD industry. It does support non-manifold topology, > regularized and non-regularized solids, provides built-in functions to do > operations such as extruding or offsetting a sheet into a thickened solid, > geometry healing, etc. ACIS is extremely flexible in the way you can > attribute intermediate surfaces and edge lists that arise during the > evaluation of CSG ops. And there are the ACIS competitors…Parasolid, > Granite, Open Cascade (assuming these others still exist…my knowledge of > solid modeling kernels is slightly stale now). > > > > Graham > > > > *From:* Eric Haines [mailto:eri...@gm...] > *Sent:* Wednesday, May 21, 2014 11:39 AM > *To:* Game Development Algorithms > *Subject:* Re: [Algorithms] CSG operations on textured meshes -- > something better than CGAL? > > > > I'd certainly like to know, too. MeshLab might have one hiding in its > bowels, but I haven't looked hard enough yet. MeshMixer looks super-cool, > but appears to be just an application, not a library. > > > > On Wed, May 21, 2014 at 11:05 AM, Jon Watte <jw...@gm...> wrote: > > > You are going to be distorting triangles in different ways depending on > the overall shape of the mesh at any given point though. > > > If you just retain existing UV coordinates for the new vertices, the > results will be... strange. > > > > I do this operation with some frequency in 3ds Max, and it works the way I > expect there. > > > > The 3ds Max boolean (and proboolean) modifier behavior would be good > enough for my purposes, although they do have some edge cases and > limitaitons (a k a "bugs" :-) > > But I don't want to buy a copy of 3ds Max per server that will be running > this code, not to mention I want to run the servers on Linux. > > > > So, does anyone know of any textured-triangle-mesh CSG library out there, > free or paid for, that would work? > > > > Sincerely, > > > > jw > > > > > > > > > > Sincerely, > > Jon Watte > > > -- > "I find that the harder I work, the more luck I seem to have." -- Thomas > Jefferson > > > > On Tue, May 13, 2014 at 10:07 PM, James Robertson <ja...@os...> > wrote: > > You are going to be distorting triangles in different ways depending on > the overall shape of the mesh at any given point though. If you just > retain existing UV coordinates for the new vertices, the results will > be... strange. > > Consider the case where a convex region meets a concave one. One side of > the triangle will be slightly expanded, while the other side will be > contracted. Of course you know your input data better than us, so maybe > such distortions are acceptable or won't be noticeable, but they will be > there. > > > > On 14/05/2014 01:41, Jon Watte wrote: > > I don’t believe you will be able to use your existing uv values with > the mesh that results from this csg operation > > > > The operations I want to do are rigid and well conditioned and do not > stretch or generate new surfaces compared to the input meshes. They may > invert the winding of triangles, though (so normal maps would have to be > flipped) in the case of a cut-out. > > I also need to preserve vertex bone weighting, too... something that can > preserve UV should be able to preserve that, too. Worst case, I put in a > vertex ID value in the UV channel and loop up the other parameters based on > that. > > > > So... no general purpose parameterized trimesh CSG library available? > > > > Sincerely, > > > > jw > > > > > > > > Sincerely, > > Jon Watte > > > -- > "I find that the harder I work, the more luck I seem to have." -- Thomas > Jefferson > > > > On Thu, May 8, 2014 at 12:28 PM, Chris Green <cg...@va...> > wrote: > > I don’t believe you will be able to use your existing uv values with the > mesh that results from this csg operation – it has a different topology, > and there will be changes in the ratios of the areas of different parts of > the model, with really bumpy areas of the mesh being smoothed out, etc. > You’ll even have brand new areas emerge that don’t have corresponding areas > on the original model, as holes are filled in, etc. > > > > What might work better is to just do the csg operation and generate a uv > atlas for the resultant mesh. You can then generate a new texture map for > this uv parametization by sampling from the original one, in a similar > manner to the way in which people produce bumpmaps mapping the normals of > highly tessellated models onto low-detail models. > > > > > > > > *From:* Jon Watte [mailto:jw...@gm...] > *Sent:* Thursday, May 08, 2014 11:08 AM > *To:* Game Development Algorithms > *Subject:* [Algorithms] CSG operations on textured meshes -- something > better than CGAL? > > > > I have a triangle mesh composed of many submeshes with different > textures/materials. This mesh may not be a 2-manifold -- it may have open > edges. Typical game art. > > > > I now want to create a 3mm thick shell of this mesh. As an approximation, > taking each triangle, and extrude it back along the normal of each vertex, > and union all of those generated chopped pyramids would be an approximation > of what I want. If I do literally that, and self-union the result, then > that should resolve the self-intersection problems I'll run into along > narrow sharp creases etc. > > > > I can't find any library to do this, though. CGAL has some fairly robust > functions on NEF polyhedra, but those polyhedra don't seem to allow > parameterization (which is academic speak for texture coordinates that may > have discontinuities across edges.) > > > > So, what are some robust CSG libraries available that work on such > game-style meshes, preserving texture coordinates? > > > > (And actually, I don't have one such mesh; I have > 120 million such > meshes, so a by-hand or even script-the-Max-shell-modifier solution is > unlikely to work. I do have hundreds of Linux servers at my disposal, > though.) > > > > Sincerely, > > Jon Watte > > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |