Game Development Community

dev|Pro Game Development Curriculum

Terrain editor increased brush size

by Bloodknight · 07/27/2013 (12:13 pm) · 12 comments

I did a search for this and couldn't find anything so i hope my first resource isn't just a duplicate of somebody elses work.

The edits themselves are actually very simple one line edits, they did take a lot more hunting down than I expected however. But here we have it, brush sizes up to 256.

I dont recommend you use brushes much bigger than 100-120 though, some sizes/actions do make the engine lag somewhat, like adding noise with a size 200 brush.


source/gui/worldEditor/terrainEditor.cpp around line 673
TerrainEditor::TerrainEditor() :
...
   mMaxBrushSize(256,256), // was 40, 40

source/gui/worldEditor/terrainEditor.cpp around line 115
public:
...
   enum { MaxBrushDim = 256 }; //was 40


game/tools/worldeditor/gui/TerrainEditToolbar.ed.gui around line 520
AltCommand = "TerrainBrushSizeTextEditContainer-->textEdit.setValue(mCeil($ThisControl.getValue())); ETerrainEditor.setBrushSize( $ThisControl.value );";
range = "1, 256"; // was 1, 40


game/tools/worldeditor/gui/EditorGui.ed.gui around line 534
processUsesBrush = "0";
maxBrushSize = "256 256"; // was 40, 40

#1
07/27/2013 (1:05 pm)
I think this was here before ;)

But you should make a pull request of this, to add it to the main version of Torque, to get rid of this issue once and for all, because I don't see a reason to limit the brush to such a small amount.
#2
07/27/2013 (2:46 pm)
Would there be any way to do the opposite of this, make the brush size smaller? The smallest size is a little too big to shape foxholes and trenches.
#3
07/27/2013 (3:42 pm)
You cannot go smaller than 1, that is the smallest, maybe you can hack it to make it 0, but this will not make sense.
#4
07/27/2013 (4:22 pm)
Willbkool the smallest brush size is 1, that "1" is dependent on your terrains resolution, if 1 unit of terrain is say 4 or 8 meters, then thats the size of the area the brush size will effect, if you want more detail for say trenches etc, either lower the meter per unit ratio, or delete the terrain poly's where you want the trenches to be, and create dts shapes to drop into the holes, and to be honest thats probably the best way to do it if your looking for something that looks quite detailed
#5
07/27/2013 (4:47 pm)
Sadly everything is pretty much constrained to single squares which is a problem in many areas especially since some nutjob decided to stop the replicators working, but thats another story.

You have to balance the terrain size with the details you need a 1m squaresize gives you the flexibility for detail but at the same time limits the overall size of your area. I guess if you were really desperate for smaller terrain holes you could scale up everything else in the game to 2x or bigger.
#6
07/29/2013 (2:25 pm)
For trenches and so on you cut rough holes in the terrain and cover them with objects, that is the common way it is done, you need objects to cover the seams anyway, not matter how big they are, so it is not that much important how big the holes are.
#7
08/07/2013 (9:16 pm)
Thanks for the responses. I cut holes in the terrain back in the old Torque engine, But I could never get the textures on the .dts shapes to match the terrain textures, even if I used the same textures. I was hoping I could go down to like .5, but oh well, back to the drawing board.
#9
08/09/2013 (10:48 am)
oh well, shows that either i cant search well or the search function returns junk, since i spent over an hour looking
#10
08/09/2013 (2:08 pm)
It's all good. . . I've had the same thing happen. =)
#11
01/13/2014 (2:49 am)
what i was needing for a brush size was to make the smallest size have more smaller triangles in it. For instance, when i try to make a very narrow section for a small bridge with water under it, i have to stretch the bridge and make it wider and taller to fit. If the brush size was very small on size one and had 4 triangles in it i could scale my models down to have a larger land mass and still paint smaller paths and trails and make tighter dips for bridges.

Making the brush size bigger has the opposite effect. I have to use no less than a size 3 brush or have triangle all along the inside of the dip in the terrain. even on a size 2 brush it will pull out triangles on small hills.If you can let me know how to change that , it would be very much appreciated.

If you need me to make a video and post it to show ya what i am talking about, let me know and i will.

to give ya a better idea, make a grass area and paint a sand texture in a straight line, now drop the player in the middle of that sand path, back off a bit and look at it. if the player had his hands straight out to each side, the path would be just past his arms reach on each side, on a scale of 1 for the brush size its huge.
#12
01/13/2014 (3:08 am)
Think i will back up the engine now, as i am going to play for awhile after i see where you posted the area to make it bigger.If i figure it out i will post the way i did it here for others.At least you saved me searching the engine files for the right one to change,