I'm creating a set of train tracks for a game known as "Garry's Mod". It runs on Valve's Source Engine, and for being an old game engine, it has it's quirks.

Namely, the inability to create smooth curves from within the engine's map editor, "Hammer World Editor".

I can create curves using the editor's built-in arch feature, but the curves aren't smooth, since they are just a bunch of straight blocks put together.

...just a bunch of blocks...

While I can increase the amount of pieces on a curve to make it look smoother, for some reason the editor deforms some of those pieces and makes the tracks look bad.

A friend recommended me to take the "blocky" curve, so to speak, and run it through Blender, to smooth it out. But that's where my problem resides.

How can I do that? I already have the prop loaded in Blender, but I'm a complete novice to it.

  • $\begingroup$ Even in blender you have to increase resolution ie pieces to smooth out. Better increase number of pieces making the curve Or you can add subd modifier it smooths curve but also smooths square track to cylindrical to avoid, you have to add bevel modifier, it further increase vertices count. If you have no boundary for vertices count you can try above method. $\endgroup$ – Feenix Dec 29 '18 at 14:03

You can create brand new curves in blender, and then convert them to those tubes with needed resolution. How to do it, there is a lot of tutorials on youtube. Try to search something like "create pipes with curves in blender".
As for your existing meshes, you can convert them to curves. But segments you would have to handle anyway.
If you want to go this way, you have to get the single edge loop from your tube: Select your tube; go to Edit mode (Tab); switch to edge select mode (Ctrl+Tab, 2). Then select one entire longitudal edge (Alt + RMB on that longitudinal edge); and kill all others (Ctr+I - invert selection; X - delete Edges).
It will give you the wire-like mesh one vertex wide. Here it's good to switch to vertex selection mode (Ctrl+Tab, 1). You can use proportional editing (O) to edit it, use Smooth (Ctrl+V, Smooth), (W, Loop tools / Space), (W, Subdivide smooth) and any other tools you find useful. When you done with the mesh, return to the Object mode (Tab), and convert the mesh to curve (Alt + C, mesh to curve). And how to deal with curves you already know from the tutorials about pipes, that I suggested before :-)

  • $\begingroup$ Since they are train tracks, they are rectangles, and not pipes :p I just need a way to turn all these rectangles into a smooth curve using an already existing model, and not make a whole new model for them (as the existing model is a perfect fit for the other track pieces.) $\endgroup$ – PolarDog Dec 29 '18 at 22:57
  • $\begingroup$ As for curves, it doesn't matter what the shape the bevel object is. Rectangle, or even real rail profile. It's just much easier to work with wire than with shape - you will have not to keep things parallel. And when the general shape is OK, it's time to add the profile to it (rectangle, in your case). For perfect fit you can even use one of the source loops as a bevel object. I don't know the simplest way to get what you want. So, let's wait for other suggestions. $\endgroup$ – Mechanic Dec 29 '18 at 23:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.