Game Development Community

Terrain texture creation

by Jared Swets · in Torque 3D Beginner · 09/30/2012 (1:47 pm) · 8 replies

Does anyone have a tutorial on how to create Terrain Textures? I have started with a 512x512 jpg generic rock texture, created a detail map (by desaturation, have no idea if that is how you are supposed to do it), and attempted to use that as a terrain brush, but the lines between brushes are EXTREMELY noticable, and it isn't like my texture is varied much at all....
See them here...

https://picasaweb.google.com/103426577954914113203/Terrain_Pics?authuser=0&authkey=Gv1sRgCK6a9PSDisyylAE&feat=directlink

You can also see in game that the textures have a very distinct line.... do I just have to literally copy and paste all four sides of the texture to make sure there is no line?

Thanks....

About the author


#1
09/30/2012 (2:13 pm)
Detail textures are typically just a topical with roughness.

www.chadvernon.com/blog/wp-content/uploads/2007/07/terrain_detail_texture.jpg
Anything much more complex than this and you'll get tiling.

How they work is, pixel range is from 0 to 255 brightness. Anything 128 or higher lightens the image (255 is the brightest). Anything 127 and lower darkens the image (0 is the darkest).

Avoiding tiling is rough. As a general guide, I'd suggest applying your base texture to the terrain first and paint. This way you'll know that your base texture looks okay and doesn't tile. Don't worry that it looks excessively soft, it's supposed to. Adjust with the size parameter as needed.

Then find and test detail textures that work well with the base. In general perfect application would be the scale is low enough that it looks good with player looking straight down, but not so low that it tiles like crazy (a good texture won't) and makes the terrain look like a giant checkerboard.

#2
09/30/2012 (3:04 pm)
The documentation does cover this, there's a couple of example textures to download there too.

docs.garagegames.com/torque-3d/official/content/documentation/World%20Editor/Tut...

Also detail textures don't have to be totally neutral grey, I found my grass came out better with a bit of colour left in.
#3
10/01/2012 (12:52 am)
If you can find a program that will generate tileable perlin noise then it will help. Perlin noise functions tend to be tileable without a noticeable pattern. I think Gimp may have some functions for this, but you will have to experiment. I know Gimp has functions to make a picture tileable so the edges match up. Combine that with its noise functions and you should be able to reduce repeating artifacts on your terrain textures.
#4
10/01/2012 (10:24 am)
Another method is via photoshop. Use the offset filter to offset the image by 50% of its size in both dimensions and get an get to work patching up the seams. In the case of the image you have there, it'll take some work because of the large dark area. Even if you remove the seam well enough, it'll show through in tiling. You'll have to work to remove that and if you have more sample data available, could use that for a sort of data bandage to the area, patch it up with something a bit more even.

Bit of work to make that image good, so may take some time. But not awful. With detail textures, don't go with total grey unless it fits the scene. A bit of color livliness never hurts, make a nice subtle change in the saturation as you move. Just enough to keep things moving and not too flat. Also, don't just use a desaturated texture as your detail. Adjust the detail texture to help bring out the parts you want to really show through. For example a snow texture, add some bright tiny specs in your detail. Not TOO bright, but brighter than normal; it'll give a sort of "sparkly" look like snow should have.
#5
10/01/2012 (6:56 pm)
here is a tiled image based on your original

dl.dropbox.com/u/38119855/StoneTexture1_512%28seamless%29.jpg

as the others have said the seams are because the edges dont match, there are large blemishes in the texture that are card to trim out, and as such if you zoom out a lot you will see obvious tiling patterns, tho thankfully not horrible lines.

Getting textures that tile across a large set of distances is quite a task, but if you worry more about scaling the detail maps it becomes less of a problem, and in game, some/most of this issue is hudden form the players via other in game features, trees, grass, bigass badass tossing grenades... that kind of thing :)
#6
10/01/2012 (8:27 pm)
Awesome, thanks for the advice guys. I use gimp, so I will take a look to see if they have functions for this. I was getting frustrated trying to clone stamp my way out of the tiling problem. Some good information here.
#7
10/01/2012 (8:47 pm)
Yeah, sometimes there's only so much you can do with one section and a clone stamp. Usually I like to try to get twice the source area that I'll be using and instead use the excess as stamp data, rather than just repeating what's already present in the image. You can see from the image Bloodknight posted that, while it works, there's some clear repetition. Without using extra source data, you'll never escape that.
#8
10/02/2012 (8:10 am)
GIMP has a stock "make seamless" filter which works but is kind of basic. However there are several other great alternatives on the plugin registry... offhand I just don't remember their names.