Sign in to follow this  
sirSolarius

Hi-res terrain textures?

Recommended Posts

sirSolarius    138
This may seem dumb, but the only way to improve the percieved quality of my terrain textures is just to map more pixels per vert. If I have a 1024x1024 vert map, the textures only seem nice when I apply a 4096x4096 image to it... in jpg form, this takes up about 19 megs. Am I going about this the best way? When I look at a game like farcry, it seems to have tons of levels with really hi-res details, but I can't imagine it coming with so many texture maps.

Share this post


Link to post
Share on other sites
Wyrframe    2426
4 levels of progression in difficulty and quality...

Tiling: re-use parts of the texture to reduce memory consumption.

Layering: use tiling as a basis, then let multiple "tiles" blend themselves over a single area.

Dynamic Texturing: create a purely 2D geometry and texture set, and render this onto an intermediate texture as though you're looking orthogonally down at your terrain. Then, apply this texture to your terrain.

Dynamic Patching: as above, but add a dynamic level-of-detail patching scheme, just like you'd add something like ROAM to the actual terrain vertices; re-render texture patches at a higher resolution when you get closer, mipmap-downscale them when you move further away.

Share this post


Link to post
Share on other sites
Dtag    210
Farcry renders, as you said, a 4096 base tex over a 1024 array.
This base texture is rather low res compared to the terrain size. The texture merely defines the approximate appearance of the terrain.
Now they have different layers:
A layer is defined by a layermask ( which defines where this layer is to be applied ), and a Detailtexture which is blended over the terrain where the layermasks reports !=0 values.

A typical map has about 13 of these layers. Farcrys heightmap is divided into chunks ( 33x33 ). A maximum of 4 can be used in a single chunk. The intensities for the 4 layers are then stored in the color attribute of the vertices of this chunks. Additionally, the whole detail texturing process is only applied in a certain area around the camera ( faded out smoothly ).

So what it finally needs is 4 fragment programs. One for 1Layer/Chunk, 2Layer/Chunk etc. ( since there can be chunks that dont use up the maximum of 4 Layers/Chunk ). So even tough it seems a very expensive technique at first sight, it can be quite cheap if optimized this way, because only few chunks are actually rendered with the "expensive" detail texturing shader turned on.

Share this post


Link to post
Share on other sites
jollyjeffers    1570
Quote:
the only way to improve the percieved quality of my terrain textures is just to map more pixels per vert.

Have you looked into detail mapping?

Stick with your relatively low-res texture map... in truth the basic colouration of a terrain probably doesn't change that dramatically.

Instead, gain your detail by blending (using conventional alpha-blending, or a more clever per-pixel weighted approach) a so called "detail" texture. This detail texture is often grey-scale and can be anything from light noise to a sort of fake bump map. The beauty of this is that the detail map can be tiled a lot lot easier and especially when combined with the slow(er) changing colour map make it difficult to spot.

Black-and-white used them to good effect, and I've used it in my engines to good effect. I like it - easy, cheap and doesn't look bad.

hth
Jack

Share this post


Link to post
Share on other sites
sirSolarius    138
Wow, this all seems pretty intense. I'm not sure that I really understand texture splatting, can anyone forward me to a fairly digestable article about it?

Detail texturing seems to be a bit simplier, though. Basically, this is just blending some high-res noise onto the nearest chunks of terrain, right?

Share this post


Link to post
Share on other sites
jollyjeffers    1570
Quote:
Original post by sirSolarius
Detail texturing seems to be a bit simplier, though. Basically, this is just blending some high-res noise onto the nearest chunks of terrain, right?

Pretty much, yes.

Theres a bit of subtlety involved - making it so that there is some detail involved, yet it isn't noticeable as a key component to the final image. If that makes sense.

You could also make it better by weighting different detail maps - a different one for stone/mud/rock/grass/ice etc... but thats strictly optional and if you can be bothered. Simple detail mapping is still a great way to improve your basic diffuse colour mapping.

Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this