Hi ShadowIce,
Okay, sure. What you want is already automatically supported by L3DT, but are you really sure that's what you want? The numbers are a somewhat challenging. If you want the same level of detail as a rendertime detail map, but with the detail map baked into the texture, please consider the detail map in Sapphire:
[left without rendertime detail map, right with rendertime detail map]
In Sapphire, there are 64x64 detail map pixels for every heightfield pixel, whereas typically there might only be 4x4 texture pixels per heightmap pixel, which means the detail map is 16x more detailed than the texture map (the numbers change with texture resolution, of course). To have the same quality with the detail map actually baked onto the texture, the size of the texture pixel would have to be the same as a pixel in the rendertime detail map. This means the texture resolution would need to be 64x also. Thus, for a typical 2048x2048 pixel heightfield,
the texture map would need to be 131072x131072 pixels. Is your engine/renderer set up for that much texture data?
If so, then it's pretty easy to bake the detail map onto the texture in L3DT. In fact, a detail map is automatically baked onto the texture when it is generated at a sufficiently high resolution (at least 8x for most materials, but this is configurable in the material editor). The baking is done in the texture generator, not the exporter, but the operations are exactly equivalent and the results are exactly the same, except that it's faster to do it all in the texture generator. Here's an example, using a 32x texture with the detail map baked in, and
no rendertime detail map in Sapphire:
[FYI the heightfield was 256x256px, and the texture was 8192x8192px]
Just in case you're wondering whether you can get equivalent quality by baking a detail map onto a lower resolution textures; you can’t. The maximum possible detail of the texture is determined by the resolution of the texture; low-res textures can only ever give low detail, unless you use rendertime detail maps over the top. When it comes to detail, there is no substitute for pixel density.
So, your option for Skyrim-quality terrain are basically two. Either you:
- Apply the detail map at rendertime. This keeps the texture size manageable, but you have to work out how to set up your rendering environment to do rendertime blending of the detail map, or;
- You bake the detail map onto the texture. This saves you from having to blend in a detail map at rendertime, but also means you've now got to work out how you're going to render multi-gigabyte megatextures in your game engine/renderer, which may be much harder. You'll have to think about implementing level of detail paging for the texture data, because it probably won't all fit on the GPU at once, and certainly not as a single texture plane.
In OpenGL/DirectX (and presumably most game engines), the first option is really easy, which is why we all use rendertime detail maps. The latter option is the more courageous choice, which is occasionally, but very rarely, used in games. If your chosen renderer/engine doesn't support megatextures out of the box (few, if any, do), you may be up for some moderately clever programming. It's not impossible, but it is non-trivial. Sapphire does it, after all.
Best of luck either way.
Best regards,
Aaron.