Well,
when I started with UE4, I also used brushes for prototyping. But then I soon found out the limitations and performance hits (if you have 500+ of them in ysour level.)
Also the Geometry editing tools are too limited to make brush usage attractive.
I use a blueprint to set the dimensions of the meshes.
I made a simple set of basic shapes and use these instead of brushes.
I call them “SmartBrushes”
The advantagees:
- better performance than brushes
- More options, like several materials
- easily extensible (SmartStairs)
I have abandoned using brushes completely. And I wouldnt miss them if they were gone
They BPs are set up like this:
First, I defined two structures, for the brush and for an alternate material.
Then, I created a blueprint, based on “Actor”.
The blueprint itself has a variable of the brush definition and material override.
It also has a function “MakeSimple”, which will just create the mesh that is set in the variable:
The function “ScaleMesh” that is used, does the actual scaling, according to the dimension specified.#
And it does that independently from the native mesh size:
(For reusability, the function is implemented as part of a BP function library)
This parent BP is now used to create two child BP classes. A brush that can be spawned as series and a special stairs brush.
First lets define some structs for the brush series.
The brush can now be rotated and moved relative to the BP origin.
And if we wrap that in another structure that provides an overall offset, rotation and scale, then we can create a whole series of them, thus the “instances” field.
The “SmartBrush” child class now looks like this:
In case of the “Use simple” is true, then the brush is just created. See function above in the parent class.
If a series is used, then the “MakeSeries” function does the following:
In the editor, it looks like this:
This entire map is created by only using a box mesh with native dimensions 100x100x100 and a cylinder of same dimensions.
Series can be used for anything like fences. And because you have an array of series, you can have one for the posts and one for the fence elements (of which you need one less).
The offset and rotation fields let you create all kind of nice stuff.
For example, this is just one BP actor creating this balcony with just that one box and cylinder mesh:
Now, this could already be used to create stairs, but stairs have so much more options, thus I created the “SmartStairs” BP. Also a child of our parent from above:
First, a little definition of stairtypes:
The construction script is rather trivial again. We build the stair type that we select…
Also a variable for the number of steps is included.
The step dimensions itself are defined by the “Brush property” that was implemented in the parent.
Now its just a matter of building the stairs:
The “free stairs” :
and the solid stairs:
And thats how they look:
So, I hope that gives you guys some inspiration.
By now, I consider BSP brushes a bad habbit
Cheers,
Klaus