PDA

View Full Version : Thumper's Dromed Magic #5 - Snapping with set_grid



Komag
29th Jun 2002, 07:03
Dromed Magic #5 - Snapping magic with set_grid
Dromed Magic #5. set_grid

This is basically a regurgitation of a previous post of mine, but it belongs in this series since few people know of it. If you've seen it before feel free to pass on by unless you'd like to contribute some new info or usage.

The set_grid command (DromEd shortcut: shift-S) modifies the current brush so that all of its vertices snap to the nearest grid intersection. The grid intersections used are those defined by the grid size at the time of the set_grid. Once set, the brush's vertices from that point on will always snap to those particular grid intersections whenever you move, rotate, or resize the brush. Changing the grid size later or issuing set_grid on other brushes won’t effect previously set_grid’d brushes.

The only restriction is that after the snap, for every face on the brush all of the vertices of that face must be on the same plane. If they are not, DromEd will crash when you portalize. The easiest way to guarantee coplanar vertices is to use a brush whose faces are all triangles (e.g. a 3 sided pyramid). No matter how you shift the vertices around, they will always be on the same plane.

You can undo a set_grid by turning off grid snapping and reapplying set_grid to the brush.

Some practical uses for this are aligning rotated cube brushes. If you've noticed, it is basically impossible to align two rotated cube brushes so that they are side-by-side with no gaps - unless you use set_grid. As long as the cube brush is only rotated along a single axis it should snap fine.

Another use is joining two tunnels that don't meet up at right angles. The tunnels have to be made of cube brushes though. It won't work with 6-sided cylinders since the faces at the ends of the cylinders won't stay in the same plane (unless the cylinder is at a 90 degree angle).

Datoyminaytah also found that you can align textures properly on rotated brushes such as buildings at non-right angles if you set_grid the brushes first.

You can use it with almost any brush except dodecahedrons (their faces are impossible to keep in the same plane). You just have to be careful to keep the brush faces with more that three vertices in the same plane.

It's really best to try it out. Just remember, it will crash DromEd if you get it wrong and it is very easy to get wrong.

Thanks to Larson and Datoyminaytah for their input.

-Thumper