Dealing with non-welded meshes (meshes that have coincident vertices) is proving to be very tricky. Consider the case below.
In mesh A, the original mesh, vertices V1 and V2 are very close together, maybe even coincident, but they are not the same vertex. The same is true for pairs V3-V4 and V5-V6.
Let's assume the algorithm decides to collapse V3 to V5, for example. To get correct results, the result of that collapse should be mesh B. V4 has to collapse to V6 as well. If V4 doesn't collapse to V6, there will be a hole on the mesh.
With an usual mesh representation with vertices and triangles, aided by edges (pairs of vertices) and a list of incident triangles at each vertex, there's no information that tells us to collapse V4 to V6 when we collapse V3 to V5.
What extra information do we need?
In addition to our per-vertex list of incident triangles, we probably need a per-vertex list of other coincident vertices. When doing a collapse, we not only follow the list of incident triangles and work with them. We also need to follow the list of incident triangles from the coincident vertices.
Is that enough? Not yet, probably. We know our source and destination vertices, V3 and V5. When we jump to V4 and process it, we need to know that we need to collapse V4 to V6, not V4 to V5.
What else do we need? What if V5 is coincident with V6 and a third vertex, V7? How do we know we need V6 and not V7?
I leave the answer as an exercise to the reader. I don't know it myself, at this point.
Ah, the joys of computational geometry!
July 22, 2010
July 21, 2010
Crystal Space fixes for Mac OS X 10.6
I've ran into several compatibility problems between Crystal Space and Mac OS X 10.6. Thankfully I've figured out workarounds for the most critical ones. Investigating these problems is a slight diversion from my main focus on GSOC, but I believe it's perfectly valid since it helps the Crystal Space community as a whole. I'll summarize the problems and fixes on this post.
"-bundle" error when building
To build Crystal Space on OS X 10.6, you have to remove the string "-bundle" from several places on the following files:
configure
cs-config-1.9
scripts/cs-config/makevar.macosx
mk/jam/macosx.jam
Universal binary and relaytool errors
Your "./configure" line must include "--disable-universal-binary --disable-relaytool".
Cg error
Remove "-Wl,--no-as-needed" from the section in the configure file where it tests for Cg (starting around line 53940).
CEGUI error
The configure script can't find the CEGUI framework. I haven't looked much into that one, but it seems like configure's test can't find the CEGUI.h header file. This happens even if you have the CEGUI framework correctly installed.
All of these problems will probably be fixed soon by the amazing CS folks (Eric Sunshine being the amazing Mac OS X maintainer), but this should at least help some people for now.
"-bundle" error when building
To build Crystal Space on OS X 10.6, you have to remove the string "-bundle" from several places on the following files:
configure
cs-config-1.9
scripts/cs-config/makevar.macosx
mk/jam/macosx.jam
Universal binary and relaytool errors
Your "./configure" line must include "--disable-universal-binary --disable-relaytool".
Cg error
Remove "-Wl,--no-as-needed" from the section in the configure file where it tests for Cg (starting around line 53940).
CEGUI error
The configure script can't find the CEGUI framework. I haven't looked much into that one, but it seems like configure's test can't find the CEGUI.h header file. This happens even if you have the CEGUI framework correctly installed.
All of these problems will probably be fixed soon by the amazing CS folks (Eric Sunshine being the amazing Mac OS X maintainer), but this should at least help some people for now.
July 3, 2010
Subscribe to:
Posts (Atom)

