Backing displacements: Tips/Program?

Discussion in 'Mapping Questions & Discussion' started by Terr, Sep 6, 2009.

  1. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    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?
     
  2. Ravidge

    aa Ravidge Grand Vizier

    Messages:
    1,544
    Positive Ratings:
    2,495
    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.
     
  3. Vigilante212

    Vigilante212 L7: Fancy Member

    Messages:
    481
    Positive Ratings:
    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 :)
     
  4. UKCS-Alias

    aa UKCS-Alias Mann vs Machine... or... Mapper vs Meta?

    Messages:
    1,264
    Positive Ratings:
    748
    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.
     
  5. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    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.
     
  6. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    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: Sep 6, 2009
  7. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    Doesn't matter. Only the displaced face will be put through the compile process.