Backing displacements: Tips/Program?

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
So I've got some tunnels and cliffsides, and they all work OK for the purposes of checking paths and map effects... but but now I want to add displacement goodness, but it turns my "tunnels" and "walls" into the VIS-equivalent of swiss-cheese.

So here's my question to the forums: Any tips for this? And if I made a program that would auto-magically "back" a displacement brush with another nodraw brush, would it be useful?

I've already got a small Python script that parses the VMF. I figure it might be an interesting project to have a script that goes and...
  • Identify all displacement brushes.
  • Identify the non-displacement faces of those brushes (let's call them "emtpy sides" for lack of a better term.)
  • Find empty sides which are not entirely flush with a VIS-blocking brush.
  • Add a nodraw "cap" in a custom visgroup.

Or am I trying to go after a mostly-solved/unimportant problem?
 

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
Personally I wouldn't trust a program/script to map for me. Adding the nodraw is not difficult nor very time consuming so I prefer it manually.

If I wanted to make it "quick and sloppy", I would just take all the displaced walls, copy, destroy displacement, apply nodraw, move into position.
 

Vigilante212

L420: High Member
Dec 21, 2008
481
33
Yea I usually just make the nodraw the exact same dimensions as the disp original block. Unless its a wierd angle then I make a block lower. I always try to keep my nodraws square not sure if it matters, but it looks nicer :)
 

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
Note that even when a nodraw goes through a displacement that the displacement remains fully shown. So you can make the nodraws just 16 units behind the displacement (and not the full brush). Another advantage of that is that you dont have to clip some deeper parts in the walls to make walking smoother there. Only in the corners you will have to watch out that the edge remains smooth.

Its how valve did the optimizing on badlands. Check the roofs there and youll see its all displacements and the skybox passes through them.
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Most of my displacements (especially ones on the ground) z-fight with the nodraw backface below them. It's probably the very reason why Valve added an option to turn off nodraw faces in Hammer.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Note that even when a nodraw goes through a displacement that the displacement remains fully shown. So you can make the nodraws just 16 units behind the displacement (and not the full brush).
So you mean it's OK to have a 32-high displacement brush (top face displaced only) and a 16-high nodraw block which both share their bottom surface... As long as the displaced points don't get pushed down by more than 16?

I've been treating most of my displacement work so far as doing two layers on everything before making the first displaced, which gives clean results bit is sort of tedious.

__________

Interestingly, what Alias said suggests an incredibly easier (computationally and programming-wise) approach: Find all the displacements, make a nodraw brush of the exact same shape, and shrink each face of that brush backwards just enough that it stays below the lowest bit on the displacement surface. Depending on a cohesive strategy for laying out displacements and mitering them, it could do a good job auto-sealing.
 
Last edited:

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Doesn't matter. Only the displaced face will be put through the compile process.