Forums Index >> Modding >> TGE Question
Page : <1> :
Green = Where the terrain is noramlly. After the green border the terrain just repeats itself. Editing anything beyond the border edits the main terrain too, so watch out!
Not that I have a load of experience with this, but I was making a really big mod and ran into this. I tried a lot of things but couldn't expand it. Then again, I could very well be overlooking the obvious.
@Dazzle
Quick question with a not-so-quick answer.
****Be warned***** All of your elements may move if you change the block size as outlined below.
I suggest making a copy of the mod before attempting this!
Modifying squaresize
A less robust method of modifying the terrain size is to change the terrain’s
squaresize parameter. This parameter can be edited in the inspector. It can be found in
the terrain’s ’Misc’ simgroup.
But, what does changing the value do? If you will recall, the terrain heightmap is
really nothing more than a two dimensional array of values. Furthermore, we normally
represent heightmaps as a bitmap which (in Torque) is 256 pixels on a side. Squaresize is
a multiplier which specifies how many meters apart the pixels are in the heightmap.
Sounds pretty simple right? In a sense it is. Legal values for squaresize are between 2
and 64 and are not ‘strictly’ limited to multiples of two, meaning you can have the
following map sizes:
Squaresize
Map (Home Block) Dimensions
2
512 meters squared
4
1024 meters squared
8
(default) 2048 meters squared
9
2304 meters squared
… …
64
16 kilometers squared
(this is 256 million square meters!)
This seems pretty good at first, but once we start playing around with it we start to see
problem. The one most folks notice right away is ‘water holes’ At non-standard square
sizes, water blocks will sometimes exhibit holes. That is square regions where there
should be water, but no water is rendered. This is very annoying. Another problem is
collision. Terrain collision is affected negatively by larger squaresizes. This can be so
serious, that the player may actually fall through the terrain in some places. Finally, we
run into the more subtle issues of memory usage and texture bandwidth. Varying
squaresize modifies both memory usage and texture bandwidth associated with terrain
rendering. I have personally noticed that a squaresize of 2 severely reduces FPS. So,
given all these bad things, should you use this method? Sure, but only if you want to go
up or down by a factor. Then, this is a good partial solution. I say partial because there
are ways of solving the problems noted above. However, I’m going to leave this as an
exercise for the reader, because generally I don’t think folks really need big terrains, and
you can just limit the size of your mission area if you want a small terrain.
In closing, there are two more things to mention. One, although you can use
squaresize values that are not powers of 2, I don’t suggest it. You will not be able to fix the waterholes problem if you are using non-power-of-two squaresize. Two, if you do adjust squaresize, you need to adjust the position of the terrain block so it is centered.
Please read the next section and then, if you are not convinced that modifying
your terrain size is a waste of time, feel free to follow up by reading these threads
(The links provided are dead)
which discuss squaresize and waterholes.
You can get more technical information about TGE from these PDF's entitled
You can download the guide by sections or all at once:
Entire Guide - 13.3
Introduction - 0.4 MB
Basic Training - 6.7 MB
Tech School (Mission Objects) - 5.6 MB
Tech School (Torque Script) - 0.3 MB
Last edited: Wednesday, December 07, 2005 at 7:33:38 AM
Page : <1> :
Hi all a quick question.
The image below show a view from TGE with a green and red border. The red is the mission area no problem with changing that. Its the green border that I have a question about, what does this represent and is it possible to expand this green area and if so how? I am aware the map duplicates around the original so is there a relationship between the green border and the mirrored maps and again is there a way to change this green area?
As usual big thanks in advance for any help.
Daz