Page 1 of 3

Brush Work/BSP Best Practices

Posted: Thu May 14, 2020 5:20 pm
by truije15
Could anyone give me any details on proper brush work?

Some of the questions I have right now are:
1. What does transform permanently do?
2. What is the benefit?
3. When does transform permanently need to be done?
4. Should brush scaling and rotation be avoided at all cost?
5. What is the effect of vertexes that have large positional errors? If I go and look at some of the brushes (select brush -> edit -> copy -> paste in notepad) in my map almost all of the vertex's are not on the grid. Just as an example a vertex might look like this: "Vertex -00128.000000,+00016.003296,-00144.000000". There's an error of 0.003296 units. Does this cause disappearing faces (my current issue).
6. Should a new red builder brush be used for every new brush?
7. Is vertex editing safe to use because the vertexes snap perfectly to the grid? (I started checking the resulting brushes from vertex editing and the vertexes seem to be perfectly on the grid afterwards.
8. Should brush clipping be avoided?
9. Should intersect and deintersect be avoided?

Typically in the past I almost never made brand new red brushes, I would either duplicate or polygon-to-brush and then vertex edit or brush clip. I would use intersect and deintersect to combine brushes if I couldn't rotate them together.

Re: Brush Work/BSP Best Practices

Posted: Thu May 14, 2020 5:40 pm
by fudgonaut
I'm going to add to question #1, as it is somewhat related:

1a. I have encountered an issue where I will transform permanently, and it will cause textures on other brushes to revert. That is, I have aligned textures on an exisisting brush. Later, I will work on a different brush and transform it permanently. I'll go back to the original brush, and find that all my texture alignment is undone. Has anyone encountered this? This is why I stopped using the 'transform permanently' feature while building my CTF-Panamax map.

Re: Brush Work/BSP Best Practices

Posted: Thu May 14, 2020 6:12 pm
by Red_Fist
Before you scale or rotate (each time) I would transform permanently AND for making a mover.

I always use intersect and de-intersect, but the brush you start with has to be a good one, not some conglomerated complex thing.

Oh yes, Swanky said reset -all, the brush, I always do this and for movers and in-between making a different brush. Then click on the stock cube or sheet icon, THEN make your new brush. Also once you have some strange brush and want to use it over and over, leave one out and duplicate it (or polys to brush) after the map-brush was built. Don't duplicate it after you intersected or polys to brush after you intersected. Keep a clean copy.

As for semi-slolid brushes, I hate them LoL, I only use those for signs or simple low poly brushes. The problem is they cut into the subtract brush if you intersect, if you delete it it leaves the impression in the subtract. So if you intersect that same spot after deleting it and after rebuild you will see the old shape. So what I do is make them a "solid" blue brush, rebuild map, then delete the blue brush and rebuild the map again. Those things are nothing but trouble and cause collision problems way on the other side of the map. And even a small 32 by 32 non solid green brush placed as a light panal will cause a BSP hole waaay on the other side of the map as well.

Re: Brush Work/BSP Best Practices

Posted: Thu May 14, 2020 6:25 pm
by Swanky
Unreal Wiki - Transform Permamently

1-3) It's a tool for fixing misbehaving brushes.
4) Try to avoid scaling, vertex editing and rotating your builder brush. While it may not initially be wrong it may lead to weird rotational scenarios of (built) brushes and misbehavior. Rotating / scaling other brushes should be save.
5) Vertices should ALWAYS be on grid, ideally somewhere from 2 upwards. If not all vertices of the brush are planar, you will get a HOM (hall of mirror) effect on the brush, and possibly geometry errors.
6) It is not if you have to use the same form a few times. I usually punch in the numbers and reset the brush (if that's what you mean) since most of the numbers get fairly imprinted into your brain after a few dozen times and it's just faster that way.
7) Vertex editing is safe unless you either have two vertices of the same brushes on the same spot or have your geometry cut itself. It will either look VERY wrong or crash your editor. Working on grid is always prefered to minimize chances of the BSP tree acting weird and for easier manual editing.
8 ) Not necessarily. Large planar surfaces may negatively impact the BSP structure of the map, and usually cuts are not that bad. If there is one (usually noticeable as the surface is weirdly cut with a void or missing surfaces alltogether) check your BSP Cuts viewport (Alt+4) and make necessary rearrangements to the BSP tree (change order of brushes, change how the brushes cut each other). If you are worried about cuts, you can also use semisolid brushes as they don't cut the tree, but can act weird when multiple semisolids (or nonsolids) are stacked on top of each other with varying sizes (for example, a lamp post with a pole brush and a lampbrush will most likely have missing bottom lamp surface if the top one is a semisolid brush).
9) Intersect and Deintersect are valuable tools and necessary for creating complex forms / movers.

€ Note that singular or smaller rotated brushes may not pose a problem. Say you wanted to model a radio that's not 90° rotated on a table, which is entirely possible, you still might want to do it as a semisolid because of BSP cuts, though.

@ fudgonaut - Can't answer that, sorry. Not using too many transform permamently to have experience with that.


For further insight into the topic, Hourences' original tutorials on the matter (along with a few others) can still be found on his homepage.
BSP
Semi solids

Re: Brush Work/BSP Best Practices

Posted: Thu May 14, 2020 8:47 pm
by truije15
Wasn't expecting feedback so quickly! :)

@fudgonaut I have noticed transform permanently resets texturing for me as well.

@Red_Fist wouldn't you want to get the brush in it's final position THEN transform permanently?

I'm struggling with semi solid's and am hesitant to bother unless I get a BSP error from solids at this point. I can visibly see cleaner BSP when used but I end up with BSP holes, missing collisions, and disappearing faces. Is there a difference between a BSP hole and a disappearing face? I have faces/BSP cuts(?) that are completely fine in the editor but in game when the edge of the face/BSP cut touches the edge of the screen at specific angles it vanishes. That's what triggered me to start looking into brush work, I spent like 7 hours trying to fix it and couldn't. I initially thought it was semi solids but think my brush work might be the problem.

@Swanky I've never really had issues with rotating brushes and I never use scaling, is there any reason for me to need to use transform permanently? I never use brush scaling and clipping as is but I heavily vertex edit to shape brushes. Visually when I'm manipulating and going about my editing I'm on the grid but only when I starting looking at the internal brush information I started to see small rounding errors. The brushes were visually fine and render with no HOM's but can those cumulative errors lead to the disappearing faces I described above? That's my biggest issue I keep running into.



What might be more interesting to know is how do you guys go about trimming a floor or walkway for example? I would usually do something like this:

1. Create fresh 32x32xX red brush or duplicate/poly-to-brush to start from. I NEVER used to use reset-all so it had tons of previous rotations applied from the start.
2. Vertex edit the brush to get the correct length and 45 degree angle at the ends (as if trimming a 90 degree corner for this example)
3. Make the addition brush (sunken into a subtraction typically)
4. Using the same previously vertex edited brush I would typically rotate and vertex edit again for the next piece.
5. Make the addition brush
6. Repeat process using same brush over and over again, never starting from a fresh brush, until whatever I'm trimming is done and never transforming permanently.

Re: Brush Work/BSP Best Practices

Posted: Thu May 14, 2020 9:44 pm
by Swanky
You don't necessarily need to transform permanently. As said, it's a tool to fix things IF they go haywire. I usually don't use it if I don't need to fix a brush.

Trimming stuff. Make the base layout. Add a brush, vertex edit, depending on flow / layout, either make new brush or copy existing brush -> transform x/y if needed -> vertex edit, next brush. Sometimes in between a BSP render, and then texture alignment. Tends to go quicker if you do it all in one go.

A disappearing surface might just be cosmetic, often the case when a semisolid gets placed in an awkward way that one of its surfaces gets (badly) cut by another brush (usually additive, semisolid or nonsolids). A BSP hole often lets you glimpse into the "void" and as often has no collision. That is the bad one and it's often due to either bad cuts or non planar vertices on the brush. If it's just a vanishing surfaces, the surrounding BSP tree might be too complex. Can often be mitigated with a full rebuild where you can change the way the logic handels cuts vs optimized build trees and such, or changing the brush order (order to first, order to last).
Semisolids can be a great help in this setup, but they may also be a liability. Haven't found a perfect solution on this, but basically semisolids make your BSP tree less complex as they aren't factored into the BSP Cuts complexity equation but are affected by it.

To what Red_Fist said:
Don't use Semisolids in conjunction with De/Intersect. It causes all kinds of weird. Never used De/Intersect much myself. Used 2D Shapebuilder for that most of the time.

Re: Brush Work/BSP Best Practices

Posted: Thu May 14, 2020 10:50 pm
by Red_Fist
Well the idea is, once you mess with scaling or rotation or vertex of the builder brush, DON'T use that as a builder brush again unless you reset all, and transform permanently.

Because what happens the rotating and pivot or scaling that you previously did sticks with the brush as you make the next new cube brush.

I hit transform permanent every time I change the scaling, side, top, front, because if you don't the brush will be slightly off the grid on another axis. Also rotation will stick, it doesn't need to be transformed from rotation before you use it, so long as you don't use it as a new brush without reset then transform, start fresh.

I pretty much transform every step , each time I change it, rotate 45 degrees, transform, mess with vertex, transform, mess with another vertex, ,,,repeat,,, Rotation sort of depends because you don't need to do multiple rotations like you would for scaling or vertex editing.

And making movers ALWAYS start with a fresh brush, because any imperfection will be exaggerated since it moves a distance, a very small imperfection will increase the farther it moves, so you always want to start clean on every brush that makes up the mover, or just a one brush rectangle. Like a flickering face surface, all because it "moves" but you would never have a problem if it's a stationary brush.

Now that I think about it, what I do for semisolids is never let them touch a subtract brush. So a platform would be a solid add,blue, then for the next thing pillar (a semisolid) I put that on top of the solid add brush. I also have always used intersect and deintersect every brush I place. My theory is the program will manufacture numbers that are within the correct mathematics of the editors parameters self calculation and faces nullified, so long as you are not sticking weird bad shapes in the first place. I NEVER just plop brushes, never, every map I fixed always has things sticking out of it, just sloppy.

Re: Brush Work/BSP Best Practices

Posted: Thu May 14, 2020 10:59 pm
by Swanky
That's why you work on your built brushes and NOT the builder brush. ;)

Re: Brush Work/BSP Best Practices

Posted: Thu May 14, 2020 11:10 pm
by Red_Fist
Swanky wrote: Thu May 14, 2020 10:59 pm That's why you work on your built brushes and NOT the builder brush. ;)
That's why it takes me so long to make a map. :oops:

Re: Brush Work/BSP Best Practices

Posted: Fri May 15, 2020 1:32 am
by Hellkeeper
I have a few issues with some things said in this thread, but nothing too major. I'll summarize what you should know about what you saked:
truije15 wrote: Thu May 14, 2020 5:20 pm Some of the questions I have right now are:
1. What does transform permanently do?
2. What is the benefit?
3. When does transform permanently need to be done?
In short, whenever you use these tools: :ModeRotate: :ModeScale: :ModeStretch: :ModeSheer: :OldModeScale:, instead of modifying the brush you are working on, the editor stores the original brush you used and makes a modifier. So if you scale your brush so it's twice as big, it will store its original size and then make a note *also, multiply every vertex coordinate by 2. This is fine, except when you modify the resulting brush or a clone of that brush, things get wonky. When you have a brush that fits what you want, it's nice to transform it permanently so if you need to come back to it later, it doesn't behave in a funny way. The benefit is that 3 days later, when you decide to rotate your brush slightly, you're not surprised by the way it suddenly deforms in every direction because you forgot it was scaled 1.75 on X, 0.875 on Y and 2.145 on Z.
It should be done whenever you're satisfied with your brush and want to "solidify" what you made into a definite brush. Either on the red builder brush, or on the brush you added/subtracted from it just after it was subtracted/added.
Also reset your red builder brush and transform it permantenly if you're doing something ambitious or it behaves weird, it fixes a lot of issues.

truije15 wrote: Thu May 14, 2020 5:20 pm4. Should brush scaling and rotation be avoided at all cost?
Scaling is mostly useless and creates more problems than it solves. It should be avoided. Work on your measures and use vertex editing.
Rotating is definitely useful, but instead of using the specific tool ( :ModeRotate: ), just select your brush and use CTRL+RMB to rotate it. It doesn't cause the issues the rotating tool causes and doesn't need a transform permanently step. The only difference with the dedicated tool is that you are limited to one rotation axis per viewport, but sinc you get three of those, everything's covered anyway.
truije15 wrote: Thu May 14, 2020 5:20 pm5. What is the effect of vertexes that have large positional errors? If I go and look at some of the brushes (select brush -> edit -> copy -> paste in notepad) in my map almost all of the vertex's are not on the grid. Just as an example a vertex might look like this: "Vertex -00128.000000,+00016.003296,-00144.000000". There's an error of 0.003296 units. Does this cause disappearing faces (my current issue).
It has a small effect, not usually enough to break a map, but can cause a few disappearing faces. Fixing these in notepad (round to the nearest .000000 usually) definitely helps. After fixing these and rebuilding maps, I always get a different geometry build, which can fix holes.
truije15 wrote: Thu May 14, 2020 5:20 pm6. Should a new red builder brush be used for every new brush?
No.
truije15 wrote: Thu May 14, 2020 5:20 pm7. Is vertex editing safe to use because the vertexes snap perfectly to the grid? (I started checking the resulting brushes from vertex editing and the vertexes seem to be perfectly on the grid afterwards.
8. Should brush clipping be avoided?
Vertex editing and Brush clipping are flawless tools and should be your main method to create new geometry. They generate no error and have no associated bugs as long as you don't go against logic: in vertex editing mode, this means not putting several vertices from the same brush at the same position (it crashes) and not having edges of the brush cross each others (this makes a brush with no inside and no outside and everything bugs, but you can simply delete the brush and start again, it doesn't crash). With a creative use of the clipping tool, you can do away with the 2D shape most of the time, a tool which tends to generate many unneeded edges and cuts and should be reserved for concave shapes. The vertex editing tool is the single most important and stable tool you have at your disposition and should be your main input.
truije15 wrote: Thu May 14, 2020 5:20 pm9. Should intersect and deintersect be avoided?
It should be reserved for merging several brushes into a mover, as movers must be a single block. In all other cases, it's better to do without as it creates very complex brushes and you have no control over how the brushes is made when the intersect/deintersact makes cuts all over the place to keep every face convex.
truije15 wrote: Thu May 14, 2020 5:20 pmTypically in the past I almost never made brand new red brushes, I would either duplicate or polygon-to-brush and then vertex edit or brush clip.
Thisis fine. New brushes with the red builder brush are fine too, you can use it.
truije15 wrote: Thu May 14, 2020 5:20 pmI would use intersect and deintersect to combine brushes if I couldn't rotate them together.
This is suboptimal but depends on how careful you are and how complex the resulting intersected brushes are.

A few notes about what has stuff said in this present thread:

- When transforming a brush permanently, all texture scales and positions are reset on the brush. This is also the case if you select a vertex of the brush in vertex editing mode, even if you don't move anything. This is a pain in the ass.

- Semi-solids. Don't listen to what's been said here, semi-solids are absolutely fine and their use is paramount when making very complex stuff, what's been said here looks like empirically guestimated stuff. Here's what's the deal with semi-solids: they do not create errors, never, but they often are the subject of errors caused by other brushes.
They cannot be subtracted from, they act as blue solid brushes, but they do not create cuts, so they do not add any complication to your BSP tree. But they are sensitive to cuts created by other brushes. If you line a semi-solid brush's face with the a BSP cut made by something else, chances are, this face of the semi-solid will become invisible. They do not create holes as they are not filled with "THE VOID", as would happen if the face of a subtracted brush or a solid brush vanished. They simply let you see through this face of the semi-solid.
If you do not have very complex things or a increased density of small details in a specific place, you may not need them.
As they do not react with the BSP tree, they should not touche portals.
But unlike what's been said here, they can touch and penetrate (in an honourable way) solid and subtracted brushes without causing an issue. They will only have problems if they line up with BSP cuts or if two parts of the same semi-solid are in different zones separated by portals. Usually one half will disappear.

All these are limitations of non-solid brushes. Semi-solids are called this way simply because they are treated by the editor and the engine as non-solid brushes, yet have a collision like solid brushes. So they're half and half.

- If you have disappearing faces, it can be caused by no less than sixty thousand million different things and you cannot pinpoint a cause (unless half your map disappears when a specific brush is added; then you can). The best way to fix disappearing faces is making sure brushes are as simple as possible (no unnecessary edges, which means intersect/deintersect should be limited in number and complexity), vertices are on grid (the rounding error in brushes is most of the time not enough to cause trouble but if your geometry is perfect, you may fix a few), you have at least some zoning (keeping the local geometry mostly separate from the rest of the map, it helps keeping things manageable for the engine) and if you have a simple-ish solid brush that touches only subtracted and/or solid brushes, no portals, without hitting things at odd angles, try making it a semi-solid and rebuilding. If it doesn't fix the issue and creates more, you can always set it back to solid.

Re: Brush Work/BSP Best Practices

Posted: Fri May 15, 2020 2:26 am
by papercoffee
fudgonaut wrote: Thu May 14, 2020 5:40 pm I'm going to add to question #1, as it is somewhat related:

1a. I have encountered an issue where I will transform permanently, and it will cause textures on other brushes to revert. That is, I have aligned textures on an exisisting brush. Later, I will work on a different brush and transform it permanently. I'll go back to the original brush, and find that all my texture alignment is undone. Has anyone encountered this? This is why I stopped using the 'transform permanently' feature while building my CTF-Panamax map.
Have you TextureLock enabled in your UnrealTournament.ini ?

Code: Select all

[Editor.EditorEngine]
UseSound=True
CacheSizeMegs=6
GridEnabled=True
SnapVertices=True
SnapDistance=4.000000
GridSize=(X=32.000000,Y=32.000000,Z=32.000000)
RotGridEnabled=True
RotGridSize=(Pitch=1024,Yaw=1024,Roll=1024)
GameCommandLine=-log
FovAngleDegrees=90.000000
GodMode=True
AutoSave=True
AutoSaveTimeMinutes=5
AutoSaveIndex=1
TextureLock=True
SelectionLock=True
I also recommend to enable AutoSave.

Re: Brush Work/BSP Best Practices

Posted: Fri May 15, 2020 3:35 am
by Red_Fist
"semi-solids are absolutely fine and their use is paramount when making very complex stuff"

Well you know a little more technical than me on this stuff.
But when you work on already messed up pre-made maps I can only speak to what I know works from experience, even though I don't know technically why. As opposed to starting maps from scratch. In most existing bad maps I have fixed there are either brushes that have not been intersected, or use semi-solids. And they always manage to shove them through portals, so I switch things to solid before I work on it, order all non solids to last, and separate all brush polys. Then I can see what is wrong before I have to rebuild it 1000 times.

Re: Brush Work/BSP Best Practices

Posted: Fri May 15, 2020 8:38 am
by Hellkeeper
Red_Fist wrote: Fri May 15, 2020 3:35 am But when you work on already messed up pre-made maps I can only speak to what I know works from experience, even though I don't know technically why. As opposed to starting maps from scratch. In most existing bad maps I have fixed there are either brushes that have not been intersected, or use semi-solids. And they always manage to shove them through portals, so I switch things to solid before I work on it, order all non solids to last, and separate all brush polys. Then I can see what is wrong before I have to rebuild it 1000 times.
If you're dealing with a map which is already messed up beyond any easy repair, of course, you can only do suboptimal fixes to keep it all together. Good practices don't magically make things right.

Re: Brush Work/BSP Best Practices

Posted: Fri May 15, 2020 2:44 pm
by FraGnBraG
wow, really late to this party :P

Thank you Swanky for such concise information (and the others that added additional commentary).

Looking through the posts this is one of those "golden" threads especially for new mappers.

I have nothing to add really, other than (in _my_ experience) best to ALWAYS transform permanently - as this commits the XYZ values so UE does not have to do what hellkeeper mentioned. And do the positional transformation before prior to aligning textures. The exception will be when using prefabs.
Don't transform prefab decorations since it will result in a horrible mess that you can't fix.

If you are working with "high polys" or complex "intersected" brushes, perform "polygon merge" where ever possible to reduce polygons in the render (perhaps merging and brush surface/texture practices should be another topic). This practice really does reduce polygons/nodes (it's magic!)

OP item #5 yes a "best practice" but _not_ an mandatory practice. Grid placement is a convention/guideline for humans. Whether a vertex point is on a "visible" or defined grid is arbitrary, because in the end it is all math (doubles or floating point values, don't remember which, and the rounding factors). If surfaces are all parallel and perpendicular in XYZ then there is obviously no rounding of values required (so nice "flat" polygons in the end). Any values with decimals could potentially result in a non-planer surfaces in the render (invisible surface, hole, shimmery or slurry texture, other). In fact, this is one of the things that gave UE1 users the power to create unreal looking shapes and structures, decorations, etc. (although sometimes at a cost!)

I have found that brush ordering can have a lot to do with success of a build. Sometimes can clear up bsp holes as well. The only real point that should be "snapped onto on a grid" should be the ORIGIN point of a intersected prefab the or of a rotated brush. Think of a sphere or the 2d shape edited arches, or other things decorative like a car or truck, that are placed randomly in a map. Build the prefab aligned to the grid, texture it etc. The intersect and place within the map in several places, rotating the cars randomly for desired effect. This is trial and error of course, but tons of vertices will not be on the grid - which is absolutely allowable - and the map/collision "usually" works okay (you do have to test).

Such is the way of Unreal Engine 1.

My 0.02 cents
Cheers

Re: Brush Work/BSP Best Practices

Posted: Sat May 16, 2020 3:05 am
by truije15
I'm really pleased with the amount of feedback I'm getting from all you mappers out there!

@Hellkeeper...I don't even have most of those buttons in my UED lol no wonder I never use them. My preferred method of creating complex shapes or decorations is vertex editing and clipping by a landslide, I hate screwing with the 2D shape editor when I can drop in a few rectangle and adjust some vertexes/clip it in a second. But the thing that got me is when I check out some of the maps that really impress me I usually see 2D shapes used when a few edited brushes could have done the trick, but I guess that's my preference anyways. And the unnecessary tessellation, I wish there was an option to turn that off.

I also never usually use the dedicated rotation tool, 99% of the time I use CTRL and just switch view until it gets the axis I need.



I have a few more questions now:
10. When does UED write the transformation data? Every rebuild I'd guess?
11. Does UED keep stacking the transformation data? Say you rotated 90 degrees clockwise 2 times then counterclockwise 2 times back to the original position without rebuilding, did it just store that or is it safe to use the brush still?
12. Does vertex editing count/get added as a transformation? Or is vertex editing separate from the transformation data? If I only vertex edited without rotating, scaling, etc. is there any reason to transform permanently?
13. Is there any other brush order view or can you only use To Last and To First?
14. I usually reserve intersect/deintersect for where there's too many vertical surfaces I can't align the textures on and it's a brush I want to reuse several times (is that what a prefab is?), I'll combine together, align textures, then merge polys. I actually attached an example of one of the decorations that's an issue for me right now. It's a bent "I" beam consisting of 5 brushes total, everything is vertical so I have no nice tool like align to floor to use (unless that's a thing these days). Normally it's only a few surfaces and I'll bite the bullet and manually align the textures with the brush in place. I want to use intersect and turn this into 1 brush that I can easily rotate around a couple times, align all the surfaces, and merge the polys. I can then later vertex edit the length to fit it wherever I want and keep the polys merged together for quick texture realignment. What is the consensus on the proper use of intersect in this kind of situation? How would you guys clean up the textures? Hourence's tutorial on BSP literally says to avoid using intersect/deintersect. This particular set of brushes won't rotate together, is that what transformation permanently can fix? I'll test that last comment right now but I might as well have it here for visibility.



@FraGnBraG I agree this is a really informative thread. There's a good amount of tutorials out there on things like BSP holes/HOM's and semi-solids (BSP related) but I don't think I've ever seen one about proper brush work best practices, vertex positional errors from manipulating the brush, and this whole usage of transform permanently. Take that comment about Hourence mentioning to avoid using intersect/deintersect, I want to know why though so I can use it properly and when I can use it. Does it cause massive positional vertex errors? Are the added vertices not worth it? How do I use it correctly?

I will definitely have more question after finding out how everyone else mapping!