jump.tf Forums
Welcome B)

Smooth Corners Using Displacements

pants · 8 · 1386

pants

  • Proficient
  • ****
    • Posts: 458
    • Frags: +0/-0
    • View Profile
Want curvy maps but hate wandering vertices and compile hell due to wacky geometry? Displacements can replicate this using very little.

Ok, so say you wanted to turn a boring normal corner like so:

Spoiler (click to show/hide)

Into a rounded area to make it more interesting. Usually you could use the arch tool or use brush rotation as per  jurf ramp creation to create a smooth rounded surface. However, the more smooth you make the curve the higher brush count required. Additionally the geometry will usually end up being a func_detail or _brush to avoid expensive vis calculations.

Instead we can turn the visible faces into displacements.

Spoiler (click to show/hide)

Then if we hit the magical subdivide button we end up with a curved corner!

Spoiler (click to show/hide)

But! The top and bottom of the wall has awful curves which are a result of the way subdivision works. However, you can 'fool' hammer into not doing this by making 'templates' of the brush faces you are subdividing. Simply copy/paste the same faces you are subdiving above and below the original faces:

Spoiler (click to show/hide)

Now hit subdivide and you will end up with a much smoother curve, and crucially, the ugly distortions are still only at the extreme top and bottom of the new 'template' brushes:

Spoiler (click to show/hide)

You can then simply delete the template brushes leaving you with a smooth curve

Spoiler (click to show/hide)

Critically this only takes 2 displacement faces to replicate what might take upwards of 16 brushes. This can also be used to create curved pathways and much more. Additionally, its very trivial to make smooth cylinders using subdivision without even the need for templating, such that the cylinder tool is pretty much worthless unless you need to have an opening in one.

The main downside is that displacements are not the best for collision physics so if you require a super smooth wall which the player will move against the surf ramp method or careful use of the arch tool may be better.





John

  • video games
  • Novice
  • **
    • Posts: 88
    • Frags: +421/-69
    • View Profile
📝👀 this is exactly what i needed when making jurf2


Adestix

  • Novice
  • **
    • Posts: 66
    • Frags: +0/-0
    • View Profile
    • Steam Profile

scotch

  • Administrator
  • Proficient
  • *****
    • Posts: 336
    • Frags: +0/-0
    • View Profile
me, this is very useful information. thank you panties.


pants

  • Proficient
  • ****
    • Posts: 458
    • Frags: +0/-0
    • View Profile

plep

  • Advanced
  • *****
    • Posts: 639
    • Frags: +0/-0
  • hi
    • View Profile
Interesting method.

But only useful for time-saving stuff cause you don't have as much control over it as you would with manually created brushes or even arches.


pants

  • Proficient
  • ****
    • Posts: 458
    • Frags: +0/-0
    • View Profile
If you adjust the relative size of the brushes you can influence the shape of the subdivided curve, but yes not as precise. The key is that this method uses just 2 displacement faces to achieve what takes significantly more if you want a smooth looking corner made from brushes.


Adestix

  • Novice
  • **
    • Posts: 66
    • Frags: +0/-0
    • View Profile
    • Steam Profile