|
Author Topic:   Texturing Terrain
Effin Goose
Member
posted February 02, 2000 07:46 PM            
Hey,

I've been playing around with terrains for a little while now(done a simple quadtree terrain and a simple frame incoherant version of Roam), and i was wondering how people go about texturing their terrain. Now by this i dont mean for example, using a colour texture and a detail texture, this question is more of a how do you generate a texture to go on your terrain. (if indeed that is what you do). I'm pretty much in the dark at this point and was wondering if any body out there could help me.

Thanks

Ryan

------------------

I dont like it, and Im sorry I ever had anything to do with it
- Schrodinger

IP:

Cthulhu
Member
posted February 03, 2000 12:48 PM            
Automated texture generation is usually fractal based. You should easily find *lots* of information on this subject. I use terrains and textures externally created with Bryce.

IP:

Effin Goose
Member
posted February 03, 2000 07:30 PM            
I'm not really wondering about the generation of textures like grass and rock and stuff, but more about how you go about applying those textures to the terrain. For example, in Treadmarks, the terrain consists of grassy textures and dirt textures and in the art directory, theres seperate texture files for the grass, dirt and sand. My question pertains to how does he generate a texture that covers his 64x64 patch of terrain from those seperate textures.

Ryan

------------------

I dont like it, and Im sorry I ever had anything to do with it
- Schrodinger

IP:

Cthulhu
Member
posted February 04, 2000 05:30 AM            
TreadMarks uses one big texture for each map, which covers terrain with 1 pixel per each square in height sample grid. You can see this texture if you turn off detail texturing. Detail texture is then blended with that texture so that it tiles over and over, each texture covering 4 pixel (am I right?) square of main texture. Only one detail texture is used for each map.

BTW. What is a good way to blend detail texture onto map? Subtraction? My voodoo2 doesn't support AddSigned blend that would be useful.

IP:

Bryan T
Member
posted February 04, 2000 05:38 PM            
Effin,

I know what you're asking for and I don't know the exact answer, but here's what I've learned so far:

In the Tread Marks maps, there is a section HMAP containing the height data. Then there is another section after it which contains enough information to tell it where to apply grass and where to apply sand. I believe this is a list of simple primitives (squares, triangles, etc) which are added together to get the full effect.

Thus when Tread Marks prepares to create the texture, it first creates a 1024x1024 pixel buffer and reads in this list of drawing primitives. It lays out a bunch of triangles and squares of sand, then a bunch of triangles and squares of grass (these completely fill the 1024x1024 buffer).

After this the color at each point is modified by the normal of the terrain which covers it (steep slopes are darker, flat land is lighter, or perhaps a more direction-oriented approach). This gives some realistic shading to the texture.

Then this texture is chopped up into 64x64 pieces and given to each patch. Or perhaps it is actually created in 64x64 pieces, I don't know for sure.

Again, these are just guesses. When Seumas releases the map-creation tool, it will become clearer.
--Bryan

IP:

Effin Goose
Member
posted February 05, 2000 10:31 PM            
G'day

Bryan, Thanks for your answer. Just what i was looking for. But how would the original texture description have been made in the first place? Would an artist have done it, or some sort of algorithm. Just thinking about the algorithm, I dont think it would be hard to come up with one, somthing like using the normal of the terrain to choose which texture, ie flat terrain, grass. steep terrain, sandy rock.

Anyhow thanks again

Ryan

------------------

I dont like it, and Im sorry I ever had anything to do with it
- Schrodinger

IP:

Bryan T
Member
posted February 07, 2000 01:24 AM            
Ryan,

Yes, I would guess that one of the excellent LDA artists had a hand in it. I'm not one for artistic endeavors though, and would probably implement something like what you suggest.

If the normal is from straight up to 40 degrees, use grass. From 40-60 randomly intersperse (getting more dense grass at the low end, less at the high end), > 60 degrees all sand. Something like that.

Doesn't do much for special tracks like Armageddon or the crater map (I love that map, very well done).

Cheers,
--Bryan

IP:

Effin Goose
Member
posted February 07, 2000 07:06 PM            
Bryan,

Yup, my artistic ability is slightly less than ordinary as well ;^) I think i'll just have a go at texture generation..

Ryan

------------------
I dont like it, and Im sorry I ever had anything to do with it
- Schrodinger

IP: