#527: MapMagic 2 / Compatibility
Status: Completed
Tag: Feature

In order to support "Terrain Blending" in Microsplat, apparently you need to output the Terrain Descriptor Data?? This is from maker of MicroSplat: https://forum.unity.com/threads/free-microsplat-a-modular-terrain-shading-system-for-unity-terrains.487458/page-71#post-6423411

Created by akaWraith Oct 16, 2020, Edited Dec 15, 2020

Replaced with terrain normals.

Thats the letter from Jason: So I'm actually just refactoring all of this - pretty sure you have access to the github depot, so the latest is in there. The old system packed a height/normal map into a RGBHalf texture. With the new code, I'm attempting to use the height/normal maps used for terrain instancing instead- however, while the height map is always available, the normal map is only created when instancing is turned on, and if you grab a reference to it in the first frame, it will delete and reallocate it late in the frame, so that is not reliable.

So what the new system does is generate a normal map, and use the height map - this reduces memory to a single 8bit RGB texture. To keep things simpler, I use the same format Unity does, which is basically a world space texture (so not type normal).

So the right way to assign it is to assign it to the MicroSplatTerrain component and call sync on it- however, if you are going directly to the material, you can grab the material instance from the terrain and use SetTexture on it as described above. However, it's no longer called _TerrainDesc, but rather _PerPixelNormal, as it's also used for per pixel normal when instancing is not enabled.

akaWraith, Dec 15, 2020