Automated brushes

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Here's my brush, a 256x256x256 cube centred on the origin of the grid. Hammer poops out that annoying invalid brush message
and deletes it, so obviously something is wrong, but what?

According to the wiki documentation here https://developer.valvesoftware.com/wiki/VMF_documentation what I've got is 100% legit, but fails.

Code:
versioninfo
{
	"editorversion" "400"
	"editorbuild" "5479"
	"mapversion" "1"
	"formatversion" "100"
	"prefab" "0"
}
visgroups
{
}
viewsettings
{
	"bSnapToGrid" "1"
	"bShowGrid" "1"
	"bShowLogicalGrid" "0"
	"nGridSpacing" "256"
	"bShow3DGrid" "0"
}
world
{
	"id" "1"
	"mapversion" "1"
	"classname" "worldspawn"
	"skyname" "sky_tf2_04"
	"maxpropscreenwidth" "-1"
	"detailvbsp" "detail_2fort.vbsp"
	"detailmaterial"
	"detail/detailsprites_2fort"
	solid
	{
		"id" "1"
		side
		{
			"id" "1"
			"plane" "(0 0 128) (-128 0 128) (0 -128 128)"
			"material" "DEV/DEV_SLIME"
			"uaxis" "[1 0 0 0] 0.25"
			"vaxis" "[1 0 0 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		side
		{
			"id" "2"
			"plane" "(0 0 -128) (128 0 -128) (0 -128 -128)"
			"material" "DEV/DEV_SLIME"
			"uaxis" "[1 0 0 0] 0.25"
			"vaxis" "[1 0 0 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		side
		{
			"id" "3"
			"plane" "(0 -128 0) (0 -128 128) (-128 -128 0)"
			"material" "DEV/DEV_SLIME"
			"uaxis" "[1 0 0 0] 0.25"
			"vaxis" "[1 0 0 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		side
		{
			"id" "4"
			"plane" "(0 128 0) (0 128 -128) (-128 128 0)"
			"material" "DEV/DEV_SLIME"
			"uaxis" "[1 0 0 0] 0.25"
			"vaxis" "[1 0 0 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		side
		{
			"id" "5"
			"plane" "(128 0 0) (128 0 128) (128 -128 0)"
			"material" "DEV/DEV_SLIME"
			"uaxis" "[1 0 0 0] 0.25"
			"vaxis" "[1 0 0 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		side
		{
			"id" "6"
			"plane" "(-128 0 0) (-128 0 -128) (-128 -128 0)"
			"material" "DEV/DEV_SLIME"
			"uaxis" "[1 0 0 0] 0.25"
			"vaxis" "[1 0 0 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		editor
		{
			"color" "0 210 187"
			"visgroupshown" "1"
			"visgroupautoshown" "1"
		}
	}
}
cameras
{
	"activecamera" "-1"
}
cordon
{
	"mins" "(-1024 -1024 -1024)"
	"maxs" "(1024 1024 1024)"
	"active" "0"
}

Here's a fully working brush from hammer:

Code:
versioninfo
{
	"editorversion" "400"
	"editorbuild" "5479"
	"mapversion" "1"
	"formatversion" "100"
	"prefab" "0"
}
visgroups
{
}
viewsettings
{
	"bSnapToGrid" "1"
	"bShowGrid" "1"
	"bShowLogicalGrid" "0"
	"nGridSpacing" "64"
	"bShow3DGrid" "0"
}
world
{
	"id" "1"
	"mapversion" "1"
	"classname" "worldspawn"
	"skyname" "sky_tf2_04"
	"maxpropscreenwidth" "-1"
	"detailvbsp" "detail_2fort.vbsp"
	"detailmaterial" "detail/detailsprites_2fort"
	solid
	{
		"id" "2"
		side
		{
			"id" "1"
			"plane" "(-128 128 128) (128 128 128) (128 -128 128)"
			"material" "DEV/DEV_STONEWALL001A"
			"uaxis" "[1 0 0 0] 0.25"
			"vaxis" "[0 -1 0 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		side
		{
			"id" "2"
			"plane" "(-128 -128 -128) (128 -128 -128) (128 128 -128)"
			"material" "DEV/DEV_STONEWALL001A"
			"uaxis" "[1 0 0 0] 0.25"
			"vaxis" "[0 -1 0 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		side
		{
			"id" "3"
			"plane" "(-128 128 128) (-128 -128 128) (-128 -128 -128)"
			"material" "DEV/DEV_STONEWALL001A"
			"uaxis" "[0 1 0 0] 0.25"
			"vaxis" "[0 0 -1 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		side
		{
			"id" "4"
			"plane" "(128 128 -128) (128 -128 -128) (128 -128 128)"
			"material" "DEV/DEV_STONEWALL001A"
			"uaxis" "[0 1 0 0] 0.25"
			"vaxis" "[0 0 -1 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		side
		{
			"id" "5"
			"plane" "(128 128 128) (-128 128 128) (-128 128 -128)"
			"material" "DEV/DEV_STONEWALL001A"
			"uaxis" "[1 0 0 0] 0.25"
			"vaxis" "[0 0 -1 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		side
		{
			"id" "6"
			"plane" "(128 -128 -128) (-128 -128 -128) (-128 -128 128)"
			"material" "DEV/DEV_STONEWALL001A"
			"uaxis" "[1 0 0 0] 0.25"
			"vaxis" "[0 0 -1 0] 0.25"
			"rotation" "0"
			"lightmapscale" "16"
			"smoothing_groups" "0"
		}
		editor
		{
			"color" "0 244 129"
			"visgroupshown" "1"
			"visgroupautoshown" "1"
		}
	}
}
cameras
{
	"activecamera" "-1"
}
cordon
{
	"mins" "(-1024 -1024 -1024)"
	"maxs" "(1024 1024 1024)"
	"active" "0"
}
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Alternatively brain has turned to mush in the last few months and has swapped my recollection of brushes from being right handed to left handed definitions.

You may continue with your lives.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Aaaaaannd we're back up to speed with a brand new program from scratch for my coding assignment.
This time it works a lot differently and is a totally better program in every way.

At current, it generates a base cube when it makes a new brush, this can then be modified by transforms, scales and rotations.

First planned use is Mangy's suggestion of automating wooden supports for interiors.

Anyhow, without further ado... a picture!

take_2_day_02.JPG


(yeah it's totally shit, but the program isn't!)
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
Looks just like the other 3-4 brush making programs we've had here over the years. I'm wondering how far you're going to go with this as all the others seeemd to get half way and then stop. Not sure whether it was the end of their school assignment or they just gave up and did something else.

I'll be realy impressed if you get as far as creating a full/enclosed structure.
 
Last edited:

MangyCarface

Mapper
aa
Feb 26, 2008
1,626
1,325
Looks just like the other 3-4 brush making programs we've had here over the years. I'm wondering how far you're going to go with this as all the others seeemd to get half way and then stop. Not sure whether it was the end of their school assignment or they just gave up and did something else.

I'll be realy impressed if you get as far as creating a full/enclosed structure.

What's with the negative attitude? Don't need drill-sergeant style encouragement around here...

Not sure what I'm looking at, YM, but it seems cool! Glad you got the recent bugs on twitter worked out
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
It's super easy once you have working brush creation just to make a loop that makes 50 random brushes. Then the next step actually requires some original creation because you have to work out a sensible way to use the program.. which is hard for newbie programmers.

This is the stage I'm at now.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Mega progress since the dev/slime blocks.
take_2_day_04_05.JPG

As you can see the new stuff is as follows:
  1. Creates corner supports of customisable width
  2. Creates top beams of customisable width and height
  3. Creates regular horizontal beams of customisable spacing, depth and height
  4. Creates randomly spaced supports along each side with customisable width, min and max spacing (set equal for regular spacing)
  5. Applies nodraw to all faces touching the outside of the template brush used to generate all of the above
  6. Applies a customisable texture to all other faces

Next up:
  1. Proper texture rotation
  2. Allowing each feature to be customised by the user not just me changing variables in code
  3. Reading in template brushes from a VMF
  4. Random diagonal and horizontal supports

Maybe if you're super lucky:
  • Support for diagonal walls floors and ceilings
  • Removing or preventing creation of supports along shared edges of template brushes
  • Preventing creation of supports colliding with additional 'doorway' template brushes.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Looking neat. If you get to doing roof trussing, a further idea would be an option to add light fixtures to the beams. With either a couple default options, or type in an instance name that you've made already and it will drop those in. Further option: wires between the lights. Further further option: terminate the string of wires on one wall at an electrical box.
 

henke37

aa
Sep 23, 2011
2,075
515
How about adding automatic clip brushes as well as making all the brushes detail brushes?
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
Further option: just make the entire building for me.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Looks just like the other 3-4 brush making programs we've had here over the years. I'm wondering how far you're going to go with this as all the others seeemd to get half way and then stop.

I think Mangy was saying this sounds incredibly pessimistic and quite abrasive. (Which it does)
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
I didn't realise, since we've had several of these projects come and go, all at this exact same stage of development, i was hoping you'd not fall into the same hole. What ever that hole might be. I know i have a habit of being cold and concise in my feedback to the point of being tactless. I thought i was just being honest and people would take it as that. I guess i should probably dish out my tea and coffee with a few more sugar cubes instead of serving it raw.

If i'm honest i've been working in the film production and advertising industry (BBC, Channel 4, Groundlings Theatre) for several weeks now and i'm growing a really thick skin to how fast and demanding it is, especially the feedback process. Not sure if it's rubbing off on me or it's just me being the worst of me. 9-5 for the past 9 days hasn't given me much time to retrospect. I'm just doing and saying things on auto-pilot. I'm not trying to rattle any cages.
 
Last edited:

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Final shot from today:
take_2_day_05_03.JPG

Creates, skews, clips and textures the new diagonals into place.

Can't quite handle flipping texture coordinates.

That heavy was thrown in for scale reference

If anyone wants to chime in with a consistent method of flipping arbitrary U and V axes in either X, Y or Z... feel free.
 

Belli

L69: Deviant Member
Jan 21, 2012
69
1
Creates, skews, clips and textures the new diagonals into place.

Can't quite handle flipping texture coordinates.

That heavy was thrown in for scale reference

If anyone wants to chime in with a consistent method of flipping arbitrary U and V axes in either X, Y or Z... feel free.

Err, maybe I'm completely missing the point, but why the beams? What advantage would they provide, besides having a resizable cube?
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Here's a real-world application (courtesy of Aly):
aly_autobrush_gif.gif

And one of my own, this whole scene took about 5 minutes total:
ym_autobrush_gif.gif

Now it'll ask the user if they want to use my default settings or enter all their own values, including texture. It'll also read in a file now.

I released a version to chat just now so if you desperately want a copy that doesn't handle bad user inputs then track down matt/aly/seba/stegarootbeer and pester them. Otherwise wait a day or so for me to clean up all the possible crap you guys can put into it to break it.

Taking name suggestions now too, threw some out on twitter earlier, thinking out loud:
Brush-O-Matic, Brushinator, Super Brush, Hammertron, Brush Master 6000, How about an acronym?
Suggested by others: Strokes, Autohammer, Brushtronic.

Get excited and throw ideas at me!
 

henke37

aa
Sep 23, 2011
2,075
515
Now make it create the full map for you.