Meshlab Decimation


(Scrupus) #1

Just a quick tutorial on how to use MeshLab for terrain model decimation, for those working on QuakeWars terrains:

I started using MeshLab for terrain map decimation (reduction from high-res to low-res model) after a tips from Hozz in the old forums, and never looked back. It was much faster than Blender and produced pretty good results, which let me generate and test out new terrain tweaks much faster. And with the latest version, the MeshLab developers seems to have added a LOT more filters and stuff, and the decimation process itself is working better than ever!

So for a start, download MeshLab here: http://meshlab.sourceforge.net/

I assume you already have a high-res version of your terrain, in .obj version. In my case, it’s a 1024 x 1024 high-res model, originally sculpted in Earth Sculpture and then “massaged” by World Machine 2 for erosion and other processing. World Machine 2 can export .obj so I just load that one straight into MeshLab. So here’s what you do:

In MeshLab:

  1. File->Open->(select your high-res .obj)

  2. Filters->Remeshing […]->Quadratic Edge Collapse Decimation

  3. Set your preferred values in the dialog, and specify how much to simplify the model.

The default values are pretty much ok, but I also check “Planar Simplifications”, as I believe it avoid flipping of faces. Not sure if that is what it do, but haven’t seen one single face flip after starting using it. The rest is best left unchecked (see screenshot below).

For the target number of faces, that’s up to you - this controls how much smaller the low-res model will be. I recommend 32768 in general - you can go up to about 100k for a more detailed model (but this will increase compile time and reduce fps), or down to 16k for a “highspeed” work copy - even further down if you have a simpler terrain without a lot of hills and such.

I also recommend to play a bit with the Quality Threshold - I currently use 0.5, which I believe give a smoother result and avoid too steep (and ugly) angles.

  1. Click apply, let it work for a minute or 2, and it should be done!

  2. Finally File-Save to your low-res obj model. (if you just save it will overwrite the high-res).

That’s it! (but you must still import the low-res model into Blender or similar for UV remapping).

Attached is sample “before and after” pics of Arctic Assault. The low-res loose a lot of details of course, but it still looks and feels pretty natural in-game :smiley:

btw: According to the changelog the latest MeshLab also have support for generating Ambient Occlusion. I’ve tried to figure out how it works but it’s not described very well - but if someone knows how let me know!

Before (2M faces):

After (32K faces):


(Donnovan) #2

Scrupus, there is something wrong with the image links.


(Scrupus) #3

Yeah, I noticed - and just fixed it, reload page please! :wink:

(forgot to remove the http:// so got them doubled)


(Donnovan) #4

Terrains are very similar. You have a lot of detail on the original version.

I believe some kind of retouch is always needed, but this is, somewhat, 90% of the work done.

Sadly, the 10% lefting still can take long to acomplish.


(Violator) #5

I also use meshlab for terrain as it is around 100x faster and doesn’t produce crap like Blender decimate - nice tut Scrupus! I also check ‘Preserve Boundary of the Mesh’ so it doesn’t try and round off the terrain edges. This tut has some useful info on the properties - http://www.shapeways.com/tutorials/polygon_reduction_with_meshlab


(Tron-) #6

This looks like a really useful tool, thanks for linking to it! :slight_smile:


(pazur) #7

MeshLab seems to be a nice tool


(light_sh4v0r) #8

yey, it’s arcis :slight_smile: