Hi guys,
I think I need your help, as I am a bit stuck...
I have implemented a terrain engine based on CDLOD, which is basically a chunk-LOD variant. Chunks are made of a 512x512 diffuse map (25cm or 50cm/texel), a height map and a normal map.
So far so good.
Now, I am trying to get roads being rendered on top of this terrain with a higher resolution, but I have already tried two options, each of them having severe drawbacks.
I would like to avoid any geometry-modification-base solution if possible...
The first option was requiring a pre-process step, where I was rendering the roads layer in a 4k x 4k texture for each chunk intersecting the road objects. This texture was then used in the pixel shader for a traditional multi-texturing approach. This gave pretty nice results on screen, however, the memory requirements was a bit of a problem (27 MB per 4k textures - DXT5 + mipmaps), as several chunks are kept in memory of course !
Then, I decided to try to render the roads dynamically, i.e. each time a chunk is being rendered, render the roads into a 4k x 4k render target, and use it while rendering the chunk (same multi-texturing approach). While memory usage has been reduced drastically (only 1 4k texture), this approach is slower (although completely un-optimized for now, so not a real problem really), but the main issue comes from the fact that no mip-maps are used, leading to horrible aliasing issue (see screenshot). I guess generating the mips maps dynamically is too expensive (remember there are more or less 20-30 chunks with such a road).
So basically, I would be happy if anybody had an idea, how I could solve this nicely...
Thanks guys
I think I need your help, as I am a bit stuck...
I have implemented a terrain engine based on CDLOD, which is basically a chunk-LOD variant. Chunks are made of a 512x512 diffuse map (25cm or 50cm/texel), a height map and a normal map.
So far so good.
Now, I am trying to get roads being rendered on top of this terrain with a higher resolution, but I have already tried two options, each of them having severe drawbacks.
I would like to avoid any geometry-modification-base solution if possible...
The first option was requiring a pre-process step, where I was rendering the roads layer in a 4k x 4k texture for each chunk intersecting the road objects. This texture was then used in the pixel shader for a traditional multi-texturing approach. This gave pretty nice results on screen, however, the memory requirements was a bit of a problem (27 MB per 4k textures - DXT5 + mipmaps), as several chunks are kept in memory of course !
Then, I decided to try to render the roads dynamically, i.e. each time a chunk is being rendered, render the roads into a 4k x 4k render target, and use it while rendering the chunk (same multi-texturing approach). While memory usage has been reduced drastically (only 1 4k texture), this approach is slower (although completely un-optimized for now, so not a real problem really), but the main issue comes from the fact that no mip-maps are used, leading to horrible aliasing issue (see screenshot). I guess generating the mips maps dynamically is too expensive (remember there are more or less 20-30 chunks with such a road).
So basically, I would be happy if anybody had an idea, how I could solve this nicely...
Thanks guys