====== Mesh edge optimisation ====== Hi All, An update to the [[bundywiki>plugins:calc:atMeshDecimator|mesh decimator]] plugin is now available that fixes a problem with poor mesh optimisation along the north and east edges of untiled mesh exports. In previous versions of the mesh exporter (including the exporter in [[l3dt:ann:v11.08|L3DT release 11.08]]), maps with sizes that were not equal to a [[#magic size]] would have their north and east edges fully unoptimised, resulting in an excessive and unwanted number of triangles along these edges, as shown below:
| {{:l3dt:2011:aug:mesh.png|}} | ^ Unoptimised north and east edges
(orthographic view in [[http://www.blender.org|Blender]]). ^
This problem was due to a limitation of my implementation of the [[http://en.wikipedia.org/wiki/ROAM|ROAM]] split-only tessellator. Fortunately, after some deep thought I worked out a way to make the renderer fully optimise the partially unfilled edge tiles for all map sizes. The screenshot below shows the new output of the updated mesh decimator, wherein you can now see that the north and east edges have been properly optimised:
| {{:l3dt:2011:aug:mesh2.png|}} | ^ Correctly optimised edges all around.
(This is the same heightfield as in the previous image.) ^
===== Variable lateral vertex spacing ===== Eagle-eyed readers may notice that the triangles along the north and east edges of the map are not isosceles right-angle triangles, whereas the triangles across the rest of the map are. This slight skewing of the lateral vertex spacing near the edges is a harmless side-effect of the method I used completely fill the tessellator edge tiles. However, this skewing may cause problems if you use a mesh renderer that assumes a constant lateral vertex spacing (why it would do this I cannot imagine, but I'm trying to be thorough.) In such cases, I recommend you resize the map to one of the [[#magic sizes]] before export. ===== Magic sizes ===== The 'magic' map sizes that did not cause unoptimised mesh edges in the old exporter, and that avoid [[#variable lateral vertex spacing]] in the new exporter, must be an integral multiple of 64 plus one in each dimension. Some 'magic' sizes are the old power-of-two plus one sizes: | 65 | 129 | 257 | 1025 | 2049 | 4097 | etc... | ...and also some in-between sizes: | 193 | 321 | 385 | 449 | 577 | 641 | etc... | ===== Getting the update ===== The updated plugin will be included in the next developmental build of L3DT, for which there is no definite ETA. If you would like the update now, the plugin is [[http://www.bundysoft.com/L3DT/downloads/plugins/bin/atMeshDecimator-bin.zip|available here]]. To use the plugin, extract it from the zip archive, and copy it over the existing plugin at: | Win32 | C:\Program files\Bundysoft\L3DT [version]\Extensions\atMeshDecimator.zeo | | Win64 | C:\Program files (x86)\Bundysoft\L3DT [version]\Extensions\atMeshDecimator.zeo | Please let me know (in the forum) if you find any problems with this update. Best regards,
Aaron. {{tag>meshes}}