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:
Change this to:
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

4096 base resolution

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

4096 base resolution

#2
02/16/2011 (5:00 am)
This is a nice change! I think most, gamers have a medium GC, so this will not be a big problem. Most games needs a bit grafic power :) And a nice, good GC, don't cost any much cash.
#3
Just added a couple of comparison pics showing the difference in how crisp the colour and detail is on the higher resolution basetex
02/16/2011 (5:09 am)
Thanks guys, I know its only a one liner but eh, had to lose my resource virginity somehow :P better safe then sorry :OJust added a couple of comparison pics showing the difference in how crisp the colour and detail is on the higher resolution basetex
#4
02/16/2011 (7:57 am)
Nice :)
#5
02/16/2011 (3:55 pm)
Thanks for this
#6
02/16/2011 (5:10 pm)
It really is the little things that mean the most ;) Looks great!
#7
02/16/2011 (6:18 pm)
master artist, you are
#8
02/16/2011 (10:22 pm)
Find a way to make a toggle between the two and hook it up in the graphics options menu. :)
#9
er nevermind, realised what you mean now. as a toggle option for game release graphics ssettings.
02/17/2011 (3:50 am)
er its in the terrain block's options already, this allows you to set it from 2-4096 instead of the default 2-2048er nevermind, realised what you mean now. as a toggle option for game release graphics ssettings.
#11
However, it then complained about a missing "platform/platform.h"
So I just edited it directly under Engine\source\terrain and re-compiled that way.
It was easy to enable after re-compiling ... just open the level in the editor and under properties /Misc change the BaseTexSize to 4096.
Then save the level. Super easy change and works great - good job Andy!
Might want to increase your visibleDistance from the stock 1000 (under theLevelInfo / Visibility) ... to see even more of your beautiful terrain.
02/18/2011 (7:47 pm)
I tried copying the new terData.cpp into My Project/test/source/ directory and rebuilding the solution using GenerateProject.bat file. (as a test of this new feature in t3d)However, it then complained about a missing "platform/platform.h"
So I just edited it directly under Engine\source\terrain and re-compiled that way.
It was easy to enable after re-compiling ... just open the level in the editor and under properties /Misc change the BaseTexSize to 4096.
Then save the level. Super easy change and works great - good job Andy!
Might want to increase your visibleDistance from the stock 1000 (under theLevelInfo / Visibility) ... to see even more of your beautiful terrain.
#12
02/23/2011 (12:27 am)
hmm i will have to test that out might not change much up close but it looks allot better far away.
#13
If you are using normal 512x512/1024x1024 diffuse maps for example, this also sharpens them a bit as it gives less blur to them.
02/23/2011 (6:39 am)
This was our 'fix' when trying to find a resolution to having great detail up close around the player from detail maps, at mid range from a mix of detail and diffuse, and at long distances from just the diffuse avoiding the shitsmudge that the standard 2048 diffuse map can create with normal diffuse maps for the zone. It definately works best when using a single diffuse for the zone from an external program such as geocontrol.If you are using normal 512x512/1024x1024 diffuse maps for example, this also sharpens them a bit as it gives less blur to them.
#15
Did I miss an edit somewhere ?
10/29/2011 (4:17 pm)
I can change the values to 4096 by editing the .mis file, however through the EDITOR ... it reverts the max to 2048.Did I miss an edit somewhere ?
#16
11/03/2011 (4:55 am)
Just out of curiosity, has anyone tried this for resolutions of 8192 or larger?
#17
When you go back into your mission, it will default back to 2048.
Steven, you can try it, but youll be looking at least a 120mb+ texture in most cases when using that resolution.
11/08/2011 (10:40 am)
Jeff,When you go back into your mission, it will default back to 2048.
Steven, you can try it, but youll be looking at least a 120mb+ texture in most cases when using that resolution.
#18
I made this change but as soon as I paint the terrain it flips back to the lower resolution. Is there somewhere else I need to change the code or scripts?
Cheers,
Andy
01/12/2012 (3:24 am)
Hi Andy,I made this change but as soon as I paint the terrain it flips back to the lower resolution. Is there somewhere else I need to change the code or scripts?
Cheers,
Andy
#19
It was just the one line that required changing, although I'll admit I havent put it into my 1.2 install yet, ill give it a check later and confirm if anything else changed.
01/22/2012 (10:24 am)
Hi Andy, It was just the one line that required changing, although I'll admit I havent put it into my 1.2 install yet, ill give it a check later and confirm if anything else changed.
#20
01/22/2012 (11:22 am)
ok I've put the change into a vanilla 1.2 installation, and it works fine for me, are you sure that you didnt compile it into a debug build but launch the release build exe ?
Torque Owner David (Robert) Pemberton
www.deadlyassets.com
Its always nice to see small improvements that can make big differences :-)
D.R. Pemberton
www.deadlyassets.com