Changing Texture Tile Size?
by University of Gotland (#0025) · in Torque Game Engine · 04/24/2007 (3:44 am) · 20 replies
How to I do this? I've been looking all over the place and I cant find it anywhere. At the moment my texture tiling is 256x256, I think. How do I make it larger? Let's say 1024x1024?
About the author
#2
This limitation is in there by design. The fewer textures your terrain uses and the smaller in size they are will give you an incredible performance boost.
04/24/2007 (4:22 am)
Aye, it ain't going to happen. 256x256 is all you're going to get, it's incredibly more difficult to alter this than you might think.This limitation is in there by design. The fewer textures your terrain uses and the smaller in size they are will give you an incredible performance boost.
#3
So for my next tiling question: Im making a canyon, that is needed to be very long, so I've managed to make a heightmap for it and it more or less tiles into eternity, the thing is; I only want it to tile on length of the canyon. As of now, my canyon tiles both on the length and the width. So basically I get shitloads of canyons on the sides of my main canyon. I've tried to manage the Mission area editor without success.
Also Im using TGEA.
So my questions in short is;
How do I make my Mission area smaller?
How do I make the heightmap tile on one axis only, i.e Y-axis?
04/24/2007 (4:45 am)
Ok, thanks for the quick answers!So for my next tiling question: Im making a canyon, that is needed to be very long, so I've managed to make a heightmap for it and it more or less tiles into eternity, the thing is; I only want it to tile on length of the canyon. As of now, my canyon tiles both on the length and the width. So basically I get shitloads of canyons on the sides of my main canyon. I've tried to manage the Mission area editor without success.
Also Im using TGEA.
So my questions in short is;
How do I make my Mission area smaller?
How do I make the heightmap tile on one axis only, i.e Y-axis?
#4
Wouldn't it be easier to just create an appropriate heightmap (with the editor or you can import one in from any terrain editing program) and set it to not tile?
04/24/2007 (5:19 am)
If you're using TGEA why not use Atlas?Wouldn't it be easier to just create an appropriate heightmap (with the editor or you can import one in from any terrain editing program) and set it to not tile?
#5
04/24/2007 (7:11 am)
Thats how I made my canyon, I made a heightmap in Photoshop, then imported it from Terrain Terraform Editor -> Bitmap. I havent found an option for making it not tile from specific axis.
#6
When you say a very long canyon, exactly how long do mean? I take it that the largest sized terrain block isn't long enough? If you up the square size, you can obtain a 2km x 2km area, is this not long enough? I know that you don't want the canyon to repeat left to right, rather you'd like it to repeat front to back, but with the right heightmap (thus eliminating the need to disable tiling on a particular axis) you could achieve a reasonably long canyon.
04/24/2007 (8:22 am)
That option doesn't exist (per axis) but you can control tiling in general. When you say a very long canyon, exactly how long do mean? I take it that the largest sized terrain block isn't long enough? If you up the square size, you can obtain a 2km x 2km area, is this not long enough? I know that you don't want the canyon to repeat left to right, rather you'd like it to repeat front to back, but with the right heightmap (thus eliminating the need to disable tiling on a particular axis) you could achieve a reasonably long canyon.
#7
04/24/2007 (10:29 am)
The canyon is for a 3D spaceshooter, so think of a 5-10min level with a pretty high speed forward. Thats how long, if you know what I mean :)
#8
I think it might be quite easy to only tile legacy terrain in one direction.
I'm away from a copy of TGEA right or I'd try it myself.
But follow my thinking...
If you goto http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5553
you'll find a resource for adding a variable to control legacy terrain repeating in BOTH directions. If you scroll down to step #3.
"3) torque/engine/terrain/terrRender.cc"
You can see the old code and the new code to keep the terrain from repeating.
As a quick test you could just modify this code in TGEA to stop tiling in just one direction.
Something like this:
If it works OK, then you might just implement this resource WITH one small change.
Create two variables, one to control tiling in X, and one to control tiling in Y.
Let us know how it works.
04/25/2007 (8:16 pm)
#0025,I think it might be quite easy to only tile legacy terrain in one direction.
I'm away from a copy of TGEA right or I'd try it myself.
But follow my thinking...
If you goto http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5553
you'll find a resource for adding a variable to control legacy terrain repeating in BOTH directions. If you scroll down to step #3.
"3) torque/engine/terrain/terrRender.cc"
You can see the old code and the new code to keep the terrain from repeating.
As a quick test you could just modify this code in TGEA to stop tiling in just one direction.
Something like this:
S32 xStart = (S32)mFloor( (mCamPos.x - mFarDistance) / blockSize ); S32 xEnd = (S32)mCeil ( (mCamPos.x + mFarDistance) / blockSize ); S32 yStart = 0; S32 yEnd = 1; S32 xExt = (S32)(xEnd - xStart); S32 yExt = (S32)(yEnd - yStart);
If it works OK, then you might just implement this resource WITH one small change.
Create two variables, one to control tiling in X, and one to control tiling in Y.
Let us know how it works.
#9
04/25/2007 (8:25 pm)
Just a FYI, this resource was incorporated into head as of version 1.4 of TGE.
#10
(engine/terrain/terrRender.cpp starting at line 1212)
04/26/2007 (9:47 am)
It just has not made it into TGEA 1.01 yet.(engine/terrain/terrRender.cpp starting at line 1212)
#11
04/26/2007 (11:39 am)
This really isn't that difficult. make you terrain 256x256 in ps and limit the mission area to the max width you will need for your canyon. You can also specify max height in there so your player doesn't go to high off the map. It's under misson area in the world inspector. Atlas terrains will give you a much longer run if your looking to not repeat the map, but after 2km's it's kinda hard to notice the repeat depending how fast your letting your player fly through the terrain.
#12



These are all TGE 1.5
BTW, i really hate detail textures, thats why i wrote this.
07/07/2007 (1:11 am)
This was some prototype code i was working on, making TGE legacy terrain with more detail, but still keep a very large terrain size. never finsihed, but i do plan to soon someday.


These are all TGE 1.5
BTW, i really hate detail textures, thats why i wrote this.
#13
(A different detail for each texture)
07/07/2007 (1:52 am)
If there were a Terrain Texture Detail map, that'd be pretty cool.(A different detail for each texture)
#14
How good does it work at the moment? Judging from the screenshots it looks pretty good (Black & White good..). Maybe integrate it in the Modernization Kit? (hell, release it as a content pack and I'll buy :D )
BTW, even if it's not done. What exactly are the changes done so far?
07/14/2007 (11:28 pm)
Quote:This was some prototype code i was working on, making TGE legacy terrain with more detail, but still keep a very large terrain size. never finsihed, but i do plan to soon someday.
How good does it work at the moment? Judging from the screenshots it looks pretty good (Black & White good..). Maybe integrate it in the Modernization Kit? (hell, release it as a content pack and I'll buy :D )
BTW, even if it's not done. What exactly are the changes done so far?
#15
07/15/2007 (2:14 am)
First pic is stock. second pic uses CG DRL, and third pic uses MK.
#16
07/25/2007 (7:53 pm)
That third pic is amazing :) Seems that MK is really very powerful for TGE. Excellent terrain work!
#17
09/01/2007 (8:12 am)
Excuse me, but what is "MK"?
#18
www.garagegames.com/blogs/44752/12441
09/03/2007 (6:18 am)
It's the Torque Modernization Kit, which adds some shader support to TGE. www.garagegames.com/blogs/44752/12441
#19
09/03/2007 (6:40 am)
Thanks for the explanation. Half the battle for a noob is learning the lingo....
#20
06/19/2008 (9:52 pm)
T_Squared - Do you still plan on releasing anything related to your terrain manager revamp that you showed above?
Torque Owner Thak
EDIT: Thats TGE i'm talkin bout. Excuse me, wasn't sure what Engine you refered to.