How to gen a flat terrain at 100m
by Tim Hutcheson · in Torque Game Engine · 08/11/2005 (2:49 pm) · 17 replies
I need a flat terrain generated at exactly 100m altitude. I tried doing this in the terrain editor but the results are way less than satisfactory. Perhaps I missed some simple combination of brush and action that gives this. Is there a simple way to do this, so that the flat terrain fills the map?
About the author
#2
08/11/2005 (3:32 pm)
Yes, I tried using the brush, with "Set Height", to flatten an existing terrain but couldn't find a way to get a uniform flat terrain over the whole map. Seems that by the time i finish the brush operations and save, there is always some lareg discrepancies.
#3
08/11/2005 (6:10 pm)
Make a png file solid grey, and import bitmap heightfield. Thats what I did to make flat terrain.
#4
08/11/2005 (7:15 pm)
@Vernon: Tnx, I sorta did the same thing already by grabbing one of the cubes from the tutorial.base folder and inserting it into the mission while streching its scale to cover the area needed. Then I deleted the old terrain and tweaked it so the top sits where the terrain ground would be. Works well!
#5
08/12/2005 (2:47 am)
Using the set height does work, but you should keep in mind that the terrain repeats itself, and it might seem as if you're dragging it endlessly. Of you set the view distance and fog distance high however, and you "zoom out" a lot, you will see that when you change something on the right side, the same thing will heapen on the left side.
#6
> Select terrain Terraform Editor from the menu options
> Select "Sinus" from the available methods of terraform.
> Pull all hieght points in the Sinus window to the bottom.
> Click "Apply"
I've tried this method and it works great
08/12/2005 (3:31 am)
> Press F11 to enter the editor.> Select terrain Terraform Editor from the menu options
> Select "Sinus" from the available methods of terraform.
> Pull all hieght points in the Sinus window to the bottom.
> Click "Apply"
I've tried this method and it works great
#7
08/12/2005 (6:14 am)
@Stephane, that works great, producing a flat terrain as far as the eye can see. But it's not at the 100m set in SetHeight. But good to know. I have a whole scenario oj objects at 100m that I have preplaced and some are on top and inside others, so I'm stuck for the moment at 100m. But real flat textured ground sure looks better than the top of a cube. tnx
#8
08/12/2005 (6:43 am)
You can set the height for setheight by hitting F11 and going to edit -> Terrain Settings or something like htat.... One of those options lets you change the height.
#9
08/12/2005 (7:14 am)
@Chris, I just rechecked it and even though the Terrain Editor SetHeight is set to 100m, Sinus operation still produces the terrain at what looks like 100m below my buildings, apx 0 meters I think.
#10
08/12/2005 (7:18 am)
Tim.... Yes, but the setHeight terrain editor won't (F6)... It will set the height to 100
#11
08/12/2005 (7:21 am)
Yeah, hit F6, choose the biggest brush and you can set the height to 100
#12
08/17/2005 (7:08 am)
Might be a good idea to script in a bigger brush first :M When I first tried to set height that way I spent about an hour and a half and still didn't get the whole map.
#13
thats the hardcoded limit in the engine
08/17/2005 (8:17 am)
You could type this in the cnsoleETerrainEditor.setBrushSize(40,40);
thats the hardcoded limit in the engine
#14
you can change it to
(or whatever)... and now you can have a bigger brush :) just tested it and it set a huge area of terrain though havent tested it extensively or saving it out yet.
then run this in the console
08/17/2005 (8:38 am)
If you go to terrainEditor.h and at about line 80 you can findenum {
MaxBrushDim = 40
};you can change it to
enum {
MaxBrushDim = 256
};(or whatever)... and now you can have a bigger brush :) just tested it and it set a huge area of terrain though havent tested it extensively or saving it out yet.
then run this in the console
ETerrainEditor.setBrushSize(256,256);
#16
08/17/2005 (9:39 am)
Very useful approach, thanks all.
#17
This is my way todo this
I set a part on the map to the desire height like you do above and export Terraform Bitmap.
Load the bitmap in my favorite graphics program (PSP) , grabbing the color from the part of the map with the desire height , and making a new one with that color all over.
Saving it in common/editor/heightscripts/bla.png , and after that load it in the Terrain Terraform Editor.
And now i can use it evertime i need a map with that specific height.
Edit.
Hmm you must have 2 ref spots on the bitmap to get this to work.
One at height 0 and the other one with a height of 10000 or so.
Maybe not so easy after all :)
08/17/2005 (12:54 pm)
Easiest way is to use a bitmap then you get a 100 meter height map in a instance.This is my way todo this
I set a part on the map to the desire height like you do above and export Terraform Bitmap.
Load the bitmap in my favorite graphics program (PSP) , grabbing the color from the part of the map with the desire height , and making a new one with that color all over.
Saving it in common/editor/heightscripts/bla.png , and after that load it in the Terrain Terraform Editor.
And now i can use it evertime i need a map with that specific height.
Edit.
Hmm you must have 2 ref spots on the bitmap to get this to work.
One at height 0 and the other one with a height of 10000 or so.
Maybe not so easy after all :)
Torque Owner kc_0045
Default Studio Name