Creating Modular Curved Structures with Zero Floating Point Precision Loss (x-post from TF2Maps.net)

HEADS UP: This tutorial was originally written and posted on TF2maps.net. You can find the original publishing here.

NOTE: This tutorial assumes you have knowledge of instances, if you don’t know what instances are, please read this article first.

Before I begin, I’d like to give a shout-out to Andrew Weldon who not only created this method, but also KOTH Roundhouse, a rather interesting KOTH map whose mid is completely comprised of curved sections made using this method.

http://i.imgur.com/HgXdkIY.jpg[/t]

Anyway, I suppose I should get on with the tutorial now…

Creating Modular Curved Structures with Zero Floating Point Precision Loss

So first of all, if you’re not familiar with it, you may be asking, “what *is *floating point precision loss?” - to answer your question, the way brushes work is that all of their vertices refer to a point on the grid.

When these vertices start going off grid and then get transformed (moved, resized, rotated etc) in some way, they tend to start losing precision.

[t]http://i.imgur.com/YvqsrYw.png[/t]
how floating point precision loss can look on the 3D and 2D view

The two biggest reasons this is bad are that this may cause issues with VSBP during your compile, and brushes with floating point loss probably won’t be able to seal your map.

If you’d like to know more, ask around the community.

Anyway, now that we’ve covered what floating point loss actually is, let’s move onto the method we’re going to use.

First, select the texture tools/toolsskip and draw two 2048x512 brushes opposite each other around the origin, like so, and then select them.

[t]http://i.imgur.com/SZgPP9W.png[/t]

While your brushes are selected, press CTRL+M to open the transform dialogue, rotate them -7.5 degrees on the Z axis. Copy your rotated brushes, and then go to Edit > Paste Special and use these settings.

[t]http://i.imgur.com/J7hlduo.png[/t]

With your rotated brushes duplicated, select the duplicated brushes and press CTRL+L, this will flip them horizontally.

[t]http://i.imgur.com/vZm9TSW.png[/t]

Now select the two brushes on the right, delete them, and then clip off the excess of the other two along the origin. If you’ve followed all of these instructions, you should end up with something like this.

[t]http://i.imgur.com/YAfFpmQ.png[/t]

Congratulations, you’ve successfully created brushes to clip your geometry with.

Now, within the space between these two brushes, create your geometry, do whatever you like. As an example I’m going to try and create a structure in a similar style to the ones on KOTH Roundhouse.

[t]http://i.imgur.com/WOvjVCH.png[/t]

Once your structure is created, make sure it’s lined up between the skip brushes to your liking. Once you’re happy with the results, select one of the skip brushes and Carve (CTRL+SHIFT+C). Do this step again with the other skip brush.

(Note: This is one of the few instances that carving is okay!)

The sides of your creation will be chopped off and you should be left with a wedge like this.

[t]http://i.imgur.com/4fpTLJM.png[/t]

Now save this wherever you keep your instances relative to your main map and close it.

Open your main map and with the entity tool, create a func_instance. Set the VMF filename to whatever you just created and it should appear. Rotate it 15 degrees around the origin of the func_instance and you should see your pieces line up perfectly!

[t]http://i.imgur.com/gUfK9y7.png

That’s all for this tutorial, however there’s a few things to note:

  • All the numbers in this tutorial are interchangeable, for example, rotating the skip brushes 7.5 degrees, we do this because our intent is to rotate our pieces by 15 degrees. If you want to rotate your pieces by 10 degrees, you would rotate your skip brushes 5 degrees instead.
  • You should keep a copy of your unclipped instance geometry in-case you wish to make any changes.
  • Don’t change any of your geometry after clipping as this could lead to floating point precision loss.
  • If you have any questions, feel free to ask.

I look forward to seeing what you create with this method!

Thank you for bringing this post over it is super nice to have this info.

Here is another thread where we practice the same technique.
https://www.facepunch.com/showthread.php?t=1243839

I “invented” this method a loong time ago. Some of you might remember me posting images of this in the map pimpage thread a long time ago:

http://images.akamai.steamusercontent.com/ugc/275094869245107817/997653EA06C4A6463F44CC310C3E38E3EFAC0432/[/t][t]http://images.akamai.steamusercontent.com/ugc/275094869245108072/23371FEB5E203E39FC620E3B70EC347694FCE9BF/[/t]
[t]http://images.akamai.steamusercontent.com/ugc/275094869245108264/EE94AD3C88DE7501428355975A78F9F6D20C8AA7/[/t][t]http://images.akamai.steamusercontent.com/ugc/275094869245108467/EE3827D604D46B0880EC2D9C176D63C0C4C8CE7B/

I never did anywthing with it, unfortunately and also this method is not as “loss free” as its author believes.