Game Development Community

T3D: 4096x4096 Resolution Terrain Basetex

by Andy Wright · 02/16/2011 (4:16 am) · 25 comments

This is a one line code change we did a while back that allows you to use a 4096x4096 base texture for your terrains which improves the detail and makes any pixellation less noticable then with the default maximum of 2048x2048. This does ofcourse use more resources then a 2048 size image, and possibly stop older cards from being able to generate the 4096 resolution texture.

In TerrData.cpp around line 254 You should find the following:

S32 texSize = mClamp( dAtoi( data ), 0, 2048 );

Change this to:

S32 texSize = mClamp( dAtoi( data ), 0, 4096 );


This will now allow you to set the terrain diffuse resolution to 4096 in the editor without it defaulting to the previous cap of 2048.

Simples ;)


Just done two quick screenies from the same scene to show the difference. This is a map that has a single 4096 diffuse map over the whole terrain

2048 base resolution
www.mediafire.com/imgbnc.php/c9a6ca355405f7643498a15f6ad407dfc7c90932d731c72dcf8e298c2e12b5056g.jpg

4096 base resolution
www.mediafire.com/imgbnc.php/b49f31333e24a3ae537feba08072307044b1716e8e9403429b54773e6523bcea6g.jpg
Page«First 1 2 Next»
#21
01/23/2012 (12:55 am)
Hi Andy,

Thanks for the answers. I am running the correct exe. I run with AFX+T3D1.2 'mega terrains' if that would make a difference?

Here are some images:

4096 base resolution
img804.imageshack.us/img804/5462/clipboard01o.png

4096 before terrain paint
img703.imageshack.us/img703/5048/clipboard02z.png

4096 after terrain paint
img197.imageshack.us/img197/3199/clipboard03ec.png

As you can see as soon as I paint a terrain block the block flips to lower resolution.

Any ideas?

Cheers,

Andy
#22
01/29/2012 (7:45 am)
Heya Andy,

I'm having trouble recreating this, are you using a resource for the terrains that I've missed somewhere or just tiling multiple terrains yourself ?

I've tested this myself with a grid of 9 terrains manually placed, but its not reverting to a lower resolution in stock 1.2
#23
01/29/2012 (8:32 pm)
Andy@ What is this T3D "mega terrains" you mention ? All I can find is TGEA resources which used mega terrains ... was it ported over to T3D?
#24
01/29/2012 (11:38 pm)
Hi both,

I export from L3DT Pro Torque 11.11 as a 16 x 16 mosaic (tiled).
I then add the terrains to T3D in the TGEA "mega terrain" fashion - i.e. add the tile and align it with a neighbour tile. T3D supports this and seems to allow for a lot of tiles.

I may be getting close to the issue, I need to test it later. The DDS files are exported by L3DT as a 4096 x 4096, each DDS file matched to its terrain file tile. The terrain looks great when loaded as you can see above.
What I have noticed is that the texture diffuse files that are exported to the T3D terrain texture folder are low resolution (256x256), and when they are painted to the terrain they use this low resolution? I think I need to make these diffuse files better resolution and change the diffuse size! Duh !

I'll test and reply, but so far thanks for helping me think this through :)

Edit:
It does look like the terrain material diffuse size needs the tweak to make them all 4096 and adjusting the diffuse size. RTFM! Thanks, great resource ;)


#25
01/30/2012 (1:03 pm)
yeah each individual terrain block from a L3DT map will need to be set to 4096 in the world editor.

The term mega terrain was one widely used with TGEA for higher resolution larger maps, I think L3DT carried that term over, although its not what's widely used for it with T3D, its just multiple terrain blocks next to eachother basically, although thats prettymuch what the "mega terrains" were in TGEA lol, anyways... Is it working for you now ?

The only issue that you might have with that is the size of the terrain blocks, are they 512/1024's from L3DT's mosaics? The amount of textures going into your graphics memory is going to start getting huge once the maps populated with objects and players etc, it does however look sharp on the detail :P
I often have trouble myself with sacrificing eye candy for performance lol
Page«First 1 2 Next»