Hi-res terrain textures?

Started by
5 comments, last by jollyjeffers 19 years, 2 months ago
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.
Advertisement
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.
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
Look up texture splatting, its what almost all games use for terrain texturing. This piece of software uses texture splatting for texturing terrains as well.

http://www.freeworld3d.org
Author Freeworld3Dhttp://www.freeworld3d.org
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.
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

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

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?
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

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

This topic is closed to new replies.

Advertisement