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:
-
File->Open->(select your high-res .obj)
-
Filters->Remeshing […]->Quadratic Edge Collapse Decimation
-
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.
-
Click apply, let it work for a minute or 2, and it should be done!
-
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
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):