Game Development Community

Terrain Texture Sizes?

by Shaun Reveal · in Torque Game Engine Advanced · 07/03/2008 (2:49 pm) · 9 replies

Trying to find information about terrain texture sizes without any luck on here. Not a lot of information on 1.7 yet. :P

Can TGEA support terrain textures larger then 256x256? Like 512x512 and 1024x1024.

About the author

Recent Threads


#1
07/03/2008 (4:34 pm)
Yes 1.7.x can. And there's a nifty variable on the terrain object that can be used to make your texture smaller or large on each individual terrain tile. (it's just that off the top of my head I can't remember what it is called).
#2
07/08/2008 (5:44 am)
Thanks, I wasn't sure. Because TGE messes up the texture when I tried a 512x512 one. If you can remember the nifty thing, then let me know. Hard to find stuff for TGEA 1.7. Not enough docs. :P
#3
07/08/2008 (6:17 am)
You can use any texture size you want, assuming your hardware supports it.
#4
07/08/2008 (6:43 am)
The Nifty Thing:

TexelsPerMeter - basically how many times the texture will tile over a terrain square. input as 8, 16, 32, 64, 128 - higher numbers gives more tiling which makes textures smaller/more detailed.

ClipMapSizeLog2 - seems to control sharpness/blur of terrain texture. 9 is blurry, 10 is sharp, 11 is fantastic and causes hideous lag. (11 seems to be editable only by editing/hacking the mission file directly)
#5
08/30/2008 (12:35 am)
I've toyed with those settings myself - the TexelsPerMeter, etc... And, at least with the Texels one, when I put it higher than 32 and update, it would tend to screw up the display - I'd get this grid filling up the entire view-port, and I'd have to restart the app.

Maybe that was a bug and they've fixed it?
#6
08/30/2008 (7:16 am)
Grid filling up viewport?
Are you sure that isn't the hotkeys functions on the numberpad?
#7
08/30/2008 (8:21 am)
Nope... Would change the number in the properties dialog, click on Update, click back in the 3D viewport and the entire thing would fill up with a grey grid.

It was on an earlier release, so it might have been some random glitch.
#8
08/30/2008 (9:13 am)
The terrain uses a ClipMap - that is, it dynamically builds a series of textures based on the textures that you assign to the terrain. The texture is centered around the player.

The "ClipmapSizeLog2" is the size of the largest texture - 9 is 512x512, 10 is 1024x1024, and 11 is 2048x2048. A clipmap is not just one texture, though - it's a whole stack of textures. So if you have 1 2048x2048 textures, then you have multiples of 1024x1024, even more 512x512, tons of 256x256 (etc) - this quickly eats up memory.

"TexelsPerMeter" defines how many texels are per world unit. Changing this value will change how big the clipmap textures are worldspace. at 8 texels per meter, the clipmap texture spreads out quite a bit, this means you need less clipmap textures. At 16 texels per meter, your clipmap still has the same resolution, but now it covers 1/4 the space in the world, so you need more textures.

If you bump the numbers up really high, it looks pretty, but you get to a point where you don't have enough memory.
#9
08/30/2008 (4:44 pm)
Thanks for the ClipMapSizeLog explanation, I'd be wondering about that.