Page 1 of 1

Heightmap export with baked in Albedo

Posted: Sat Aug 19, 2017 9:18 am
by Poodmund

First of all just want to say the software is very impressive. :D

I was just wondering if there is any way or possibility of exporting the final elevation data as a heightmap that includes all the noise functions, crater marks etc., basically the raw displacement map? Currently, I am having to manually composite the heightmap with the Ambient Occlusion map so get something similar which works to some extent.

If there is not the option to do this via some combination of options at the moment, would there be any scope for the addition of this in the future?

Thanks in advance for any response and consideration.

Re: Heightmap export with baked in Albedo

Posted: Sat Aug 19, 2017 4:52 pm
by Ignishot
Thank you :)

You can export the raw displacement by configuring your export options/channels in Edit->Options->Channels and add a channel with height ground. You have several options here, with or without the water, and also in 8bits, 16 bits and, since the last update, in 8+8 bits (8bits in red, 8bits in green) or 5+5+5 bits (5 bits in each channels). Be sure to uncheck sRGB for that channel, as sRGB is used only for colors, not other data.

The height ground is exactly what I use for the displacement and for the normal generation, so I don't see why you have to blend with the albedo, it's a bit weird ...
In the Unreal engine for instance, you can tesselate and use it as displacement and it's working just fine. It's also possible in unity, but you have to do your own shader.
You can check the Export to unity or export to unreal tutorials on my youtube channel for further details : ... 47W7auEAew

I hope this helps,


Re: Heightmap export with baked in Albedo

Posted: Sun Aug 20, 2017 3:33 pm
by Poodmund
Thank you for the quick reply. :D

Taking the default demo body, if I export the Height Ground channel I get the result below:


However that displacement map does not include all the surface details like the craters and any ridges, cracks etc. What I have to do to get a "Surface-detail-raw-displacement-map" is to export the Ambient Occlusion map and adjust the levels of it as shown below:


Then combine the Height Ground and the adjusted Ambient Occlusion map to give me the Height Ground map that includes all the surface detail:


Am I doing something wrong or is there an option to achieve this output within Grand Designer? I should have included these demonstrations in my original post to explain myself a little better. :P

Re: Heightmap export with baked in Albedo

Posted: Sun Aug 20, 2017 3:48 pm
by Ignishot
All the details are in the heightmap, I assure you, it's just that your mesh is probably not tesselated/dense enough to see them. To reproduce all the small details you have to tesellate A LOT, that's why it's better to combine displacement AND a normal map to keep all the details.
Also if you export only in 8bits, some smaller scale details may get lost in the export, 16bits is definitely better.
Another thing : if you export the mesh with displacement activated, the mesh will have all the low frequencies baked, so applying a displacement on top of it will not work as expected. If you want to use the displacement map, you have to apply it to a perfectly round sphere.
Btw, what is you final target? Unreal? Unity? Marmoset?

Re: Heightmap export with baked in Albedo

Posted: Sun Aug 20, 2017 4:44 pm
by Poodmund
Even if I up the Tessellation to 16 in the Displacement Settings and change the Mesh Decimation level to 5 in the output settings, it seems as though the Mid and High noise frequencies are not being baked into the Height Map, at 16bit.

Basically I am experimenting with different software like Grand Designer, Fractal Terrains 3 and Wilbur that can generate noise from -Pi to Pi and -1 to +1 to give spherical maps as baseline terrain textures to then work further with in Photoshop for usage within Kerbal Space Program as modded celestial bodies.

Kerbal Space Program takes an equirectangular greyscale heightmap (in my case 8192x4096) of which you can layer additional noise functions on afterwards over a procedural quad sphere. An equirectangular colour map is then applied over the mesh in the same manner.

However, Grand Designer and other such programs generate nice complex terrain and therefore it is nice in Kerbal Space Program to bake these medium and high frequency details into the heightmap and then apply a smoothing noise function to soften the 'pixellation' of the altitude on the PQS.

This is why the technique of taking the Height Ground export and combining it with an adjusted Ambient Occlusion map is the desired input within Kerbal Space Program in this case.

To give you an idea of how this look as a result, here is a screenshot of a couple of bodies I have been playing around with, over the weekend, within Kerbal Space Program itself:


You can get some really nice results this way.

EDIT: Note I keep saying above, the Albedo map, what I actually meant was the Ambient Occlusion map, I've edited the above posts to correct this.

Re: Heightmap export with baked in Albedo

Posted: Sun Aug 20, 2017 7:47 pm
by Ignishot
The exported heightmap is the one I'm using for the tesselated/displaced view in Grand designer, so it has all the details, all the frequencies. I've already exported heightmaps in unity/unreal and marmoset toolbag hundreds of time and used it with tesselation and displacement and it was working, I had the exact same result as GD (which is made with unity, so, no surprise here).

The AO and the normals are generated from that heightmap, you can try to convert the heightmap to a normalmap, by using photoshop of any other software which is able to do that and you'll see all the details and you'll have something very similar to the normalmap I'm exporting too.

I don't know kerbal space program and don't know what kind of shader it is using, if it tesselates, if it does displacement or not. If you're exporting the mesh with GD and no displacement are supported, then, yes, you'll have only low frequencies, as I told earlier.

Also, if you're softening the texture before applying to the PQS, then you're destroying mid/high frequencies.

The AO is the occlusion within the heightmap, so it represent the accessibility of the light on the terrain, so mixing that with the heightmaps is just mixing apple with bananas.

That's all I can tell, I'm unable to export something more accurate than the actual heightmap, everything is there.