Mesh output feature control suggestion

It would be great if the Mesh Output could export more elaborate meshes. Instead of blindly exporting a face for each pixel, it would be great if it were possible to have a “feature detail” control that will, instead of just outputting a low resolution mesh, output an optimised mesh that retains the terrain’s features, as illustrated below, where you can see a low poly terrain with still an absurd number of faces and blurry shapes versus a heavily reduced low poly sketch on top of the high poly terrain.

Minimal Slope Delta

I think this is best implemented as a “minimal slope delta” parameter, which determines the minimal difference in slope between 3 (or more) vertexes to remain 3 (or more) separate vertexes instead of being blended together. This ensures that, when for example a hill has a 10*10 pixel area with an overall slope of 1°, WM will no longer export every single vertex in between, but only the start and end vertexes of that area, resulting in a reduction of 96 vertexes (see the image below for an illustration).

  • This prevents creating unnecessary detail (as seen in the low poly mesh in the first image), as an area with a constant slope will now result in just one big face with 4 vertexes instead of a subdivided plane with maybe 4096×4096 vertexes (if you were to export a Constant device’s terrain at 4K res), which is a waste of resources.
  • Since a low slope delta is almost analogues to a low feature area, it is a logical parameter to add.
  • It is an easy to understand parameter, as slope is a commonly used tool in WM.
  • “Downscaling” a high resolution image to a low poly mesh will probably look better than a mesh of a low resolution image.

Reasoning

As of now, it is not really possible to export a low poly terrain without losing shape determining features, such as ridges. Instead, the overall quality is reduced and still a lot of “unnecessary” detail remains, so you end up with a blurry terrain with still a lot of polygons. Also, a high poly mesh is difficult to handle/edit, often results in stuttering in the 3D program and has an immense file size, and therefore is annoying to work with.
WM already provides a normal map maker and to combine that with the low poly mesh creates for convincing terrain without all the extra polygons and since, when creating a detailed terrain, you’re most likely going to use ground assets, the low poly terrain will be hidden from sight.

Downsides

  • This will probably no longer support quad faces as I think it only works (or works best) with triangles.

Current work arounds

  • None that I’m aware off, except for using a 3rd party application (in which you will have to work with a high poly mesh which is often a nightmare).

I agree… if you’re exporting a poly, you probably want to have the irregularly triangulated version instead of a regular grid – as for a grid format heightfields are easier all around.

This is mostly the way it is because there are many other pieces of software that can reduce a complex mesh into a simpler one. All things being equal, I’d rather implement features that can’t be done elsewhere than duplicate functionality – but with that said, the convenience of removing additional steps can be compelling and lead to using or not using a feature.

That’s a long way of saying that poly reduction has been on the list for a long time and I’d definitely like to implement it :slight_smile: There’s a small set of mesh-related features that I might try to do a release for in the next year - for example, I have a proof of concept for a mesh -> heightfield -> mesh workflow that is pretty neat, as you can basically apply WM algorithms to your already irregularily triangulated mesh.

2 Likes

:o That sounds really interesting and convenient.

It is indeed true there is third party software with good polygon reduction algorithms and that’s the workaround for now, but then you end up with a “raw” mesh and a “optimised” mesh file, which is ugly to work with and workflow wise inefficient, as every time you update something to your terrain, you need that 3rd party application again to reduce the poly count.

Glad to hear it has been put on the roadmap, look forward to using it in the future and hope more people will start using the mesh output.

1 Like