• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# Terrain Texturing!

## Recommended Posts

dmounty    122

##### Share on other sites
Elixir    122
This is exactly how I calculate my terrain texturing. I use this method because it avoids texture stretching on slopes. =]

##### Share on other sites
Ysaneya    1383
Hum, i thought of it before, and here is something that bothers me. Given a texture scanline, the number of texels is no longer constant, but depends upon the length of this projected scanline on the 3d terrain.

What does that mean? Well, if you have a flat terrain, you might have 500 texels in a scanline; while if you have lots of mountains, you might end up with 5000 texels in the scanline..

What do you do to fix that?

Y.

##### Share on other sites
dmounty    122
My intention, is not that you change the number of texels per scanline... this remains constant, but you simply adjust percentage of the textures width, that is placed on each slope, so the final texture is still square, and all the distortion I describes, takes place within the same, square texture.

|----|----| |----\----|
|****|&&&&| |*****\&&/|
|----|----|==|------\/$| |%%%%|| |%%%%%%|$\$|
|----|----| |------|--|

or somethign similar... ie the internal and edge grid coordinates are changed, but the grid still stays within the same square region, ie, the same number of texels per scan line.
Sorry for the dodgy drawing, but ASCII art was never my strong point. Hope this clears it up for you.

PS: I just looked at my post, and the drawing has failed horribly, thanks to the font, so never mind about it

Edited by - dmounty on July 30, 2001 6:52:26 AM