https://wiki.ldraw.org/index.php?title=Cleaning_LDraw_Files_for_Export&feed=atom&action=historyCleaning LDraw Files for Export - Revision history2024-03-28T17:24:46ZRevision history for this page on the wikiMediaWiki 1.40.0https://wiki.ldraw.org/index.php?title=Cleaning_LDraw_Files_for_Export&diff=4405&oldid=prevMichael Horvath: /* Coincident surfaces */ edits2016-01-23T21:08:03Z<p><span dir="auto"><span class="autocomment">Coincident surfaces: </span> edits</span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 21:08, 23 January 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l9">Line 9:</td>
<td colspan="2" class="diff-lineno">Line 9:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Coincident surfaces==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Coincident surfaces==</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The third issue is redundancy: Let's take for example a model composed of two identical bricks stacked on top of each other. The bricks are flush with each other such that the bottom surface of the top object is pressed against the top surface of the bottom object. You could say that many of the surface details where the two objects meet occupy the same place, or are coincident. In reality, there's a tiny gap between these surfaces where a small amount of air can pass through. In computer modeling, however, it is often <del style="font-weight: bold; text-decoration: none;">useful </del>to disregard <del style="font-weight: bold; text-decoration: none;">these differences </del>and simply make all points and surfaces mathematically perfect. While this is trivial to do and can lead to pleasing results, it introduces a problem<del style="font-weight: bold; text-decoration: none;">. Each </del>part has a set of matching surfaces and vertices shared by the other part. Some of these surfaces and vertices are in fact duplicates. The duplicate elements no longer serve a useful purpose, and end up merely taking up much needed space in the model file. There's a strong need to get rid of these redundant, wasteful elements.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The third issue is redundancy: Let's take for example a model composed of two identical bricks stacked on top of each other. The bricks are flush with each other such that the bottom surface of the top object is pressed against the top surface of the bottom object. You could say that many of the surface details where the two objects meet occupy the same place, or are coincident. In reality, there's a tiny gap <ins style="font-weight: bold; text-decoration: none;">(the seam width) </ins>between these surfaces where a small amount of air can pass through. In computer modeling, however, it is often <ins style="font-weight: bold; text-decoration: none;">desirable </ins>to disregard <ins style="font-weight: bold; text-decoration: none;">the seam width </ins>and simply make all points and surfaces mathematically perfect. While this is trivial to do and can lead to pleasing results, it introduces a problem<ins style="font-weight: bold; text-decoration: none;">: each </ins>part has a set of matching surfaces and vertices shared by the other part. Some of these surfaces and vertices are in fact duplicates. The duplicate elements no longer serve a useful purpose, and end up merely taking up much needed space in the model file. There's a strong need to get rid of these redundant, wasteful elements.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Surface reduction==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Surface reduction==</div></td></tr>
</table>Michael Horvathhttps://wiki.ldraw.org/index.php?title=Cleaning_LDraw_Files_for_Export&diff=4404&oldid=prevMichael Horvath: /* Coincident surfaces */ many2016-01-23T21:06:16Z<p><span dir="auto"><span class="autocomment">Coincident surfaces: </span> many</span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 21:06, 23 January 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l9">Line 9:</td>
<td colspan="2" class="diff-lineno">Line 9:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Coincident surfaces==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Coincident surfaces==</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The third issue is redundancy: Let's take for example a model composed of two identical bricks stacked on top of each other. The bricks are flush with each other such that the bottom surface of the top object is pressed against the top surface of the bottom object. You could say that the surface details where the two objects meet occupy the same place, or are coincident. In reality, there's a tiny gap between these surfaces where a small amount of air can pass through. In computer modeling, however, it is often useful to disregard these differences and simply make all points and surfaces mathematically perfect. While this is trivial to do and can lead to pleasing results, it introduces a problem. Each part has a set of matching surfaces and vertices shared by the other part. Some of these surfaces and vertices are in fact duplicates. The duplicate elements no longer serve a useful purpose, and end up merely taking up much needed space in the model file. There's a strong need to get rid of these redundant, wasteful elements.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The third issue is redundancy: Let's take for example a model composed of two identical bricks stacked on top of each other. The bricks are flush with each other such that the bottom surface of the top object is pressed against the top surface of the bottom object. You could say that <ins style="font-weight: bold; text-decoration: none;">many of </ins>the surface details where the two objects meet occupy the same place, or are coincident. In reality, there's a tiny gap between these surfaces where a small amount of air can pass through. In computer modeling, however, it is often useful to disregard these differences and simply make all points and surfaces mathematically perfect. While this is trivial to do and can lead to pleasing results, it introduces a problem. Each part has a set of matching surfaces and vertices shared by the other part. Some of these surfaces and vertices are in fact duplicates. The duplicate elements no longer serve a useful purpose, and end up merely taking up much needed space in the model file. There's a strong need to get rid of these redundant, wasteful elements.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Surface reduction==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Surface reduction==</div></td></tr>
</table>Michael Horvathhttps://wiki.ldraw.org/index.php?title=Cleaning_LDraw_Files_for_Export&diff=4403&oldid=prevMichael Horvath at 21:02, 23 January 20162016-01-23T21:02:27Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 21:02, 23 January 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l16">Line 16:</td>
<td colspan="2" class="diff-lineno">Line 16:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Note that there is an additional issue related to MeshLab's internal face reduction approach: back-face culling (BFC). When cleaning parts from a model, Meshlab requires that the vertices of the triangles be "wound" properly. Winding is what allows the program (and other programs that use 3D models) to determine the surface normal when not specifically defined, and thus (roughly) the "outside" and "inside" of the model. If the vertices are not wound properly, the program will get confused and behave improperly. Unfortunately, in the case of LDraw models not all parts have been validated as "BFC certified", and thus wound properly. This fact peculiar to LDraw models will likely make the approach untenable in the majority cases.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Note that there is an additional issue related to MeshLab's internal face reduction approach: back-face culling (BFC). When cleaning parts from a model, Meshlab requires that the vertices of the triangles be "wound" properly. Winding is what allows the program (and other programs that use 3D models) to determine the surface normal when not specifically defined, and thus (roughly) the "outside" and "inside" of the model. If the vertices are not wound properly, the program will get confused and behave improperly. Unfortunately, in the case of LDraw models not all parts have been validated as "BFC certified", and thus wound properly. This fact peculiar to LDraw models will likely make the approach untenable in the majority cases.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>==Links<del style="font-weight: bold; text-decoration: none;">:</del>==</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>==Links==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [http://meshlabstuff.blogspot.com/search/label/mesh%20cleaning How to remove internal faces with MeshLab]</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [http://meshlabstuff.blogspot.com/search/label/mesh%20cleaning How to remove internal faces with MeshLab]</div></td></tr>
</table>Michael Horvathhttps://wiki.ldraw.org/index.php?title=Cleaning_LDraw_Files_for_Export&diff=4402&oldid=prevMichael Horvath: edits2016-01-23T21:02:09Z<p>edits</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 21:02, 23 January 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==Introduction==</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>LDraw models are great to look at, but are generally inappropriate for real-time rendering tasks such as video games. Here's why.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>LDraw models are great to look at, but are generally inappropriate for real-time rendering tasks such as video games. Here's why.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==Level of detail==</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The main issue is detail. LDraw models are highly accurate representations of real Lego parts. Each part can have lots of minute details, and the number of parts in a single large model can be quite huge! This amount of detail translates into lots and lots of polygons, which is the main limiter of how well a real-time rendering application will run.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The main issue is detail. LDraw models are highly accurate representations of real Lego parts. Each part can have lots of minute details, and the number of parts in a single large model can be quite huge! This amount of detail translates into lots and lots of polygons, which is the main limiter of how well a real-time rendering application will run.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==Hidden objects==</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The second issue is hidden objects: LDraw models are made up of multiple smaller parts. These parts are assembled as they are, with no modification. Thus, all the inner bits and pieces (such as studs) that are visible when viewing the part by itself but invisible when viewing the entire model are still there. That means there's lots of detail (and thus polygons) in the model that will never see the light of day!</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The second issue is hidden objects: LDraw models are made up of multiple smaller parts. These parts are assembled as they are, with no modification. Thus, all the inner bits and pieces (such as studs) that are visible when viewing the part by itself but invisible when viewing the entire model are still there. That means there's lots of detail (and thus polygons) in the model that will never see the light of day!</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The third issue is redundancy: Let's take for example a model composed of two identical bricks stacked on top of each other. The bricks are flush with each other such that the bottom surface of the top object is pressed against the top surface of the bottom object. You could say that the objects occupy the same place, or are coincident. In reality, there's a tiny gap between these surfaces where a small amount of air can pass through. In computer modeling, however, it is often useful to disregard these differences and simply make all points and surfaces mathematically perfect. While this is trivial to do and can lead to pleasing results, it introduces a problem. Each part has a set of matching surfaces and vertices shared by the other part. Some of these surfaces and vertices are in fact duplicates. The duplicate elements no longer serve a useful purpose, and end up merely taking up much needed space in the model file. There's a strong need to get rid of these redundant, wasteful elements.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==Coincident surfaces==</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The third issue is redundancy: Let's take for example a model composed of two identical bricks stacked on top of each other. The bricks are flush with each other such that the bottom surface of the top object is pressed against the top surface of the bottom object. You could say that the <ins style="font-weight: bold; text-decoration: none;">surface details where the two </ins>objects <ins style="font-weight: bold; text-decoration: none;">meet </ins>occupy the same place, or are coincident. In reality, there's a tiny gap between these surfaces where a small amount of air can pass through. In computer modeling, however, it is often useful to disregard these differences and simply make all points and surfaces mathematically perfect. While this is trivial to do and can lead to pleasing results, it introduces a problem. Each part has a set of matching surfaces and vertices shared by the other part. Some of these surfaces and vertices are in fact duplicates. The duplicate elements no longer serve a useful purpose, and end up merely taking up much needed space in the model file. There's a strong need to get rid of these redundant, wasteful elements.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==Surface reduction==</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>I know of two tentative, partially automated ways of addressing these issues that, when used in conjunction with each other, might eliminate the above problems: removing internal faces using MeshLab and using LDBoxer to convert parts to simpler, lighter versions. I will not discuss these in detail. They are, however, addressed in the links at the end of this article. Simple poly-reduction techniques such as Blender's "Decimate" operation will not work, as they choose polygons more or less randomly, and don't differentiate between the "inside" and "outside" of a model.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>I know of two tentative, partially automated ways of addressing these issues that, when used in conjunction with each other, might eliminate the above problems: removing internal faces using MeshLab and using LDBoxer to convert parts to simpler, lighter versions. I will not discuss these in detail. They are, however, addressed in the links at the end of this article. Simple poly-reduction techniques such as Blender's "Decimate" operation will not work, as they choose polygons more or less randomly, and don't differentiate between the "inside" and "outside" of a model.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Note that there is an additional issue related to MeshLab's internal face reduction approach: back-face culling (BFC). When cleaning parts from a model, Meshlab requires that the vertices of the triangles be "wound" properly. Winding is what allows the program (and other programs that use 3D models) to determine the surface normal when not specifically defined, and thus (roughly) the "outside" and "inside" of the model. If the vertices are not wound properly, the program will get confused and behave improperly. Unfortunately, in the case of LDraw models <del style="font-weight: bold; text-decoration: none;">only a small minority of </del>parts have been validated as "BFC certified", and thus wound properly. This fact peculiar to LDraw models will likely make the approach untenable in the majority cases.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Note that there is an additional issue related to MeshLab's internal face reduction approach: back-face culling (BFC). When cleaning parts from a model, Meshlab requires that the vertices of the triangles be "wound" properly. Winding is what allows the program (and other programs that use 3D models) to determine the surface normal when not specifically defined, and thus (roughly) the "outside" and "inside" of the model. If the vertices are not wound properly, the program will get confused and behave improperly. Unfortunately, in the case of LDraw models <ins style="font-weight: bold; text-decoration: none;">not all </ins>parts have been validated as "BFC certified", and thus wound properly. This fact peculiar to LDraw models will likely make the approach untenable in the majority cases.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Links:==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Links:==</div></td></tr>
</table>Michael Horvathhttps://wiki.ldraw.org/index.php?title=Cleaning_LDraw_Files_for_Export&diff=3679&oldid=prevTimgould: Created page with "LDraw models are great to look at, but are generally inappropriate for real-time rendering tasks such as video games. Here's why. The main issue is detail. LDraw models are h..."2012-07-31T10:11:12Z<p>Created page with "LDraw models are great to look at, but are generally inappropriate for real-time rendering tasks such as video games. Here's why. The main issue is detail. LDraw models are h..."</p>
<p><b>New page</b></p><div>LDraw models are great to look at, but are generally inappropriate for real-time rendering tasks such as video games. Here's why.<br />
<br />
The main issue is detail. LDraw models are highly accurate representations of real Lego parts. Each part can have lots of minute details, and the number of parts in a single large model can be quite huge! This amount of detail translates into lots and lots of polygons, which is the main limiter of how well a real-time rendering application will run.<br />
<br />
The second issue is hidden objects: LDraw models are made up of multiple smaller parts. These parts are assembled as they are, with no modification. Thus, all the inner bits and pieces (such as studs) that are visible when viewing the part by itself but invisible when viewing the entire model are still there. That means there's lots of detail (and thus polygons) in the model that will never see the light of day!<br />
<br />
The third issue is redundancy: Let's take for example a model composed of two identical bricks stacked on top of each other. The bricks are flush with each other such that the bottom surface of the top object is pressed against the top surface of the bottom object. You could say that the objects occupy the same place, or are coincident. In reality, there's a tiny gap between these surfaces where a small amount of air can pass through. In computer modeling, however, it is often useful to disregard these differences and simply make all points and surfaces mathematically perfect. While this is trivial to do and can lead to pleasing results, it introduces a problem. Each part has a set of matching surfaces and vertices shared by the other part. Some of these surfaces and vertices are in fact duplicates. The duplicate elements no longer serve a useful purpose, and end up merely taking up much needed space in the model file. There's a strong need to get rid of these redundant, wasteful elements.<br />
<br />
I know of two tentative, partially automated ways of addressing these issues that, when used in conjunction with each other, might eliminate the above problems: removing internal faces using MeshLab and using LDBoxer to convert parts to simpler, lighter versions. I will not discuss these in detail. They are, however, addressed in the links at the end of this article. Simple poly-reduction techniques such as Blender's "Decimate" operation will not work, as they choose polygons more or less randomly, and don't differentiate between the "inside" and "outside" of a model.<br />
<br />
Note that there is an additional issue related to MeshLab's internal face reduction approach: back-face culling (BFC). When cleaning parts from a model, Meshlab requires that the vertices of the triangles be "wound" properly. Winding is what allows the program (and other programs that use 3D models) to determine the surface normal when not specifically defined, and thus (roughly) the "outside" and "inside" of the model. If the vertices are not wound properly, the program will get confused and behave improperly. Unfortunately, in the case of LDraw models only a small minority of parts have been validated as "BFC certified", and thus wound properly. This fact peculiar to LDraw models will likely make the approach untenable in the majority cases.<br />
<br />
==Links:==<br />
<br />
* [http://meshlabstuff.blogspot.com/search/label/mesh%20cleaning How to remove internal faces with MeshLab]<br />
* [http://home.swipnet.se/simlego/ldraw/ldboxer/ldboxer.htm LDraw Boxer]<br />
<br />
[[Category:Tutorials]]</div>Timgould