L3DT development blog
Large 3D terrain generator

News for August 2011

August 22

Mesh edge optimisation

Hi All,

An update to the 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 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:

Unoptimised north and east edges
(orthographic view in Blender).

This problem was due to a limitation of my implementation of the 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:

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 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.

2011/08/22 09:38 · aaron

August 19

L3DT release 11.08 is available

One year and a few days since the last major release of L3DT, I give you the next one. L3DT release 11.08 is now available for download, in Standard, Professional and Pro for Torque editions.

This release includes some really big structural changes, including a thoroughly revised plugin API, and the use of non-contiguous memory for all maps. There have also been some nice improvements to the user interface and file I/O, including a new mesh exporter, and an attributes map importer. Of course, a host of bug fixes have also been included. These changes are described in more detail below, and the full list of changes is available here.

Plugin API

Probably the most significant change in L3DT 11.08 is one that most users won't notice; the plugin API has been cleaned up and re-written to make it easier for developers to learn and use. Unlike previous revisions to the plugin API, this update breaks backwards compatibility with old plugins, so all plugins must be re-compiled to work with L3DT 11.08 (see note below). If you are developing a 3rd party plugin, I have provided a tutorial on upgrading plugins over here. If you’d like to try your hand at writing a plugin, well, there’s a tutorial for that too.

If you have compiled your plugin using Zeolite API v2.9.4 or later, you don't need to re-compile to be compatible with L3DT 11.08.

In addition to tidying up the API structure, I have also added a significant performance optimisation for map calculations in the form of a direct access interface to raw map data. This optimisation was found to increase the calculation speed by between 30% to 5x.

Memory management

Several users had reported problems with running out of memory (specifically, contiguous memory) when loading or saving map files. To fix this problem, L3DT now stores all maps as arrays of small non-contiguous memory tiles. This change reduces memory fragmentation, and should mean that the use of large non-mosaic maps will no-longer cause problems with insufficient memory.

Please note that some image file format plugins still allocate their own contiguous memory blocks for storing images. Thus, when loading/saving very large images (mainly JPEGs or PNGs), you could still run into 'insufficient memory' errors. However, the frequency of these problems should be reduced, as the rest of the L3DT map data won't be hogging large swathes of contiguous memory, leaving more room for these recalcitrant plugins. A re-write of these plugins is on the cards for the next release (v12.XX).

Mesh exporter

There has been a substantial improvement in the way L3DT exports terrain mesh files. As announced earlier, L3DT has a new mesh exporter, which can:

  • Export meshes in the industry-standard COLLADA (.dae) format, as well as OBJ/MTL, X, and 3DS.
  • Export the map as a set of seamlessly tiled meshes, with matching texture tiles.
  • Export textures, alpha maps, and other auxiliary map data.
  • Export selected areas of the map as mesh files.
  • Export vertex normals.

The mesh exporter, which is described here, includes a 'preview' button, which allows you to check and adjust the mesh settings before you export the mesh files:

Optimised mesh preview

You can see the seamless tiling feature in action in the following video, which shows a 4×4 tiled map being loaded tile-by-tile from mesh files produced by the new exporter:

4×4 seamless tiled mesh, in Sapphire.

Additionally, optimised mesh exporters are available for the DXMESH and FBX file formats thanks to the plugins created by Michael Koch (Miko, in the forum).

Attributes map importer

A long-standing request has been the ability to import land type coverage maps from colour-mapped images so that, for instance, you could create a map of land types in an image editor and then import that map into L3DT. This is now supported via the attributes map importer, which includes a nice user interface for matching colours to land types.

Algorithms

There have been no major changes to the either the heightfield or texturing algorithms in v11.08. However, there have been some nice little changes you may like, including:

  • A 'ridged multi-fractal' terrain generator was added, which is available as a ZeoGraph filter.
  • There are more heightfield blending options available, including an improved merge heightfield import option, as well as relevant filters and graphs for ZeoGraph.
  • A graph was also added to allow the exporting of full-resolution contour maps of the heightfield as image files (see this thread).

User interface changes

There have been quite a host of other changes to the L3DT user interface, including:

  • You can now add items to L3DT's menu using simple script files, making it easier to customise the user interface (see here).
  • A progress bar is now provided when loading plugins during the initialisation process, as this can take a few seconds.
  • There have been various tweaks to update manager to make it better-behaved.
  • There is now a 'graphs' pull-down menu in the L3DT main window, which allows you to quickly run calculations without having to open the graph editor.
  • You can now apply custom colour palettes to the heightfield, using PNG images.
  • There's a new icon set, including higher-resolution icons.

Sapphire

This time around there have been few public changes to the Sapphire 3D renderer. There have been a few minor tweaks to improve rendering speed, and also to improve the speed of tessellation convergence. There's also a work-around for what seems to be a bug in the OpenGL drivers of some ATI cards that causes huge lag when moving the mouse cursor (see this thread). Support for mesh objects is also coming along nicely, but it's not quite ready for prime-time yet (next release, hopefully).

Bug fixes

There have been quite a number of bug fixes, which you can read about over here.

How to download

As with all L3DT updates, this is a free update for all users of L3DT Standard Edition, as well as all users of L3DT Professional and L3DT Pro for Torque who have purchased a license within the past 18 months. If the 18 month 'free update' period for your license has expired (see the 'Help→About' box), you will need to renew your license to be able to use this update (contact sales@bundysoft.com to discuss discounts).

To download the update, please follow the instructions below:

L3DT Standard See downloads page.
L3DT Professional Please consult your sales/registration receipt e-mail for the URL.
L3DT for Torque Please see your 'my products' page at GarageGames.

Feedback

Please let me know what you think of the new release. Comments, requests and bug reports are all welcome. Please feel free to make use of this forum thread.

Fin

Cheers, Aaron.

2011/08/18 14:52 · aaron
 
l3dt/2011/aug.txt · Last modified: 2017/08/31 04:46 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
L3DT Development Blog RSS Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki