Author Topic: Quick Tutorial: Fixing Misaligned Brushes  (Read 2382 times)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Quick Tutorial: Fixing Misaligned Brushes
« on: September 27, 2005, 12:56:46 AM »
This is a quick little tutorial for fixing misaligned brushes in your map.  If you map properly with a reasonable grid size and don't use crappy editors like WorldCraft or Qoole, this shouldn't be an issue, but it's not a perfect world, so every once in a while you might get a slightly misaligned brush like the following screenshot.

Not only can these brushes look bad, but they can cause leaks, increase r_speeds, and make vis take forever.  This tutorial demonstrates one method I use to fix these brushes.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Quick Tutorial: Fixing Misaligned Brushes
« Reply #1 on: September 27, 2005, 01:00:21 AM »
First of all, find the brush that's causing the problem.  Sometimes it's a group of brushes.  Select the brush, and place a clipping plane (shift+right click) parallel to the plane it should fit flush against.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Quick Tutorial: Fixing Misaligned Brushes
« Reply #2 on: September 27, 2005, 01:08:07 AM »
Carve it, and drag the face flush up to the wall again.

Since this brush was really screwed up (on more than one plane) I had to carve it before dragging the face.  Usually I drag the face, then carve it to line up.  Of course what you need to do varies depending on the brush that's misaligned, but this should give you some basic ideas.

And remember: it's always easier to do it right the first time than it is to go back and fix all of these little misalignments.  When dealing with large rock-type structures, use large grid sizes, like 64, 32, and at the smallest, 16 (for finer details).

Also, in a case like this, it's OK to have the ground overlap the wall (but never have 2 brushes on the same plane overlapping, as that will cause all kinds of messes).  When you have lots of angled walls that don't have edges along the grid, it's actually better to overlap in order to keep the brushes neat, clean and on large grid points.

Dirty_Taco

  • Map Committee
  • Autococker
  • Posts: 1630
_
« Reply #3 on: September 27, 2005, 10:57:47 AM »
Post removed
« Last Edit: July 26, 2010, 01:12:12 AM by Dirty_Taco »

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Quick Tutorial: Fixing Misaligned Brushes
« Reply #4 on: September 27, 2005, 12:06:36 PM »
Worldcraft uses its own internal format with floating point values.  When it's exported to .map, it rounds those values off, and sometimes rounds them the wrong way, so you get various brushes that are 1 unit off.  Qoole has the same problem, but worse.

Aside from using floating point values for vertex positions, worldcraft also uses the wrong methodology behind brushes, I think.  Instead of making brushes that are plane-based, it tries to do it vertex-based.  This is bad because not all vertexes fall on the grid.

For example, say I have a wedge-shaped brush that's 1 unit tall and 2 unites wide:
Code: [Select]
one unit tall
v
.
| \
|_____\

     ^ two units wide

If I split it, I'll end up with a vertex that's halfway between gridpoints:
Code: [Select]
     half a unit
   v
| \.
|__|__\

If these brushes were done in worldcraft, when you exported the map, it would round the vertexes to the nearest unit, and you'd end up with something like:
Code: [Select]
.__.
|  |\
|__|_\

Or:
Code: [Select]
|\
|_\

I haven't tested this theory yet, but I'm pretty sure worldcraft would screw it up.  I've been noticing more and more misaligned brushes in your maps, DT, as they've become more elaborate.  I think it's time for you to take off the training wheels and use a big boy map editor. ;)

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: Quick Tutorial: Fixing Misaligned Brushes
« Reply #5 on: September 27, 2005, 12:51:27 PM »
This is why all mappers should adhere to perpendicular edges at all times.

Dirty_Taco

  • Map Committee
  • Autococker
  • Posts: 1630
_
« Reply #6 on: September 27, 2005, 01:18:41 PM »
Post removed
« Last Edit: July 26, 2010, 01:12:09 AM by Dirty_Taco »

Cobo

  • Autococker
  • Posts: 1362
Re: Quick Tutorial: Fixing Misaligned Brushes
« Reply #7 on: September 27, 2005, 02:27:45 PM »
well once you get used to bsp it is very easy.
i tried using worldcraft once, and i could barely understand what i was doing.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Quick Tutorial: Fixing Misaligned Brushes
« Reply #8 on: September 27, 2005, 03:39:10 PM »
But like I mentioned, worldcraft doesn't work the way quake2 works, so you don't understand exactly what you're doing.

Besides, hours of manipulating little wedges into terrain and whatnot can't possibly be easier than what I do.  I think what I need to do is make a detailed tutorial of how to make a map start to finish in BSP.  But since that's a pretty big undertaking, does anybody have any requests for some more mini-tutorials?

Eiii

  • Autococker
  • Posts: 4595
Re: Quick Tutorial: Fixing Misaligned Brushes
« Reply #9 on: September 27, 2005, 04:40:31 PM »
Compilcated entity actions? Some people might want that...

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Quick Tutorial: Fixing Misaligned Brushes
« Reply #10 on: September 27, 2005, 04:55:38 PM »
Such as?

Dirty_Taco

  • Map Committee
  • Autococker
  • Posts: 1630
_
« Reply #11 on: September 27, 2005, 05:01:47 PM »
Post removed
« Last Edit: July 26, 2010, 01:12:06 AM by Dirty_Taco »

Eiii

  • Autococker
  • Posts: 4595
Re: Quick Tutorial: Fixing Misaligned Brushes
« Reply #12 on: September 27, 2005, 07:00:57 PM »
I don't understand this whole "using wedges" idea.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Quick Tutorial: Fixing Misaligned Brushes
« Reply #13 on: September 27, 2005, 08:40:48 PM »
Basically, instead of making one complex brush he makes complex shapes out of lots of little wedge-shaped brushes (consequently making VIS crap its pants, hehe).