[Guide]Displacements - Basic Construction (Part 1)

Discussion in 'Tutorials & Resources' started by Freyja, Jul 21, 2015.

  1. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,851
    Positive Ratings:
    4,851
    Lots of people have asked about displacements recently, and with YM's tutorial being half-broken, and IMO a inferior method of constructing displacements, I've been requested a few times to write this tutorial on how I do my displacements.

    Disclaimer: This tutorial is more about the method of constructing the base brushes. I will write another tutorial soon on the theory of how to actually sculpt and texture and design the displacements.

    This method is a lot faster than the others, and a lot easier on your sanity.

    I will be using a similar cliff structure to YM's original tutorial in order to highlight the differences.

    This is the product we will end up with:

    [​IMG]




    The basic foundation of this method is that displacements sew by the alignment of their faces, not the base brush underneath. This means that ALL these configurations below will sew together (faces that turn into displacements are shown selected):

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    So what does this mean? This means that instead of complicatedly constructing your displacements with miltered corners and thick brushes, which gets almost nightmarish on complex structures, we can build our displacements out of basic blocks and still have it all sew nicely together. So let's get started!

    Here we have the two basic components that will make up this entire cliff structure. A 256x256x256 cube, and a 512x512 ground block.

    [​IMG]

    Next, we will shift-drag these cubes and start to build the base brush structure of our cliff. Make sure they stay together - it's just like large lego! As long as they sit nicely together on the grid like this your final product will sew. You can also see hehre I've moved them to align with the ground brush like one of the examples above.

    [​IMG]

    When it comes to inner corners, you don't actually need this brush that I have selected. It won't be seen, and you should delete it when you're done. The top block we'll need though - as the top of it will serve as ground on top of the cliff.

    [​IMG]

    Continuing to build the structure, I've deleted one of the blocks to make the tunnel that will feature at the end of the build.

    [​IMG]

    Next, I copied the ground tiles around to that they fill up the ret of the space. You'll notice that they're twice the size of the cliff blocks - this is fine, they'll still sew as long as they're exactly twice the length, or half the length of the touching face. I do this because the ground usually needs a bit less resolution in displacements.

    [​IMG]

    The one inside the tunnel you can downsize to fit nicely.

    [​IMG]

    Next, I go ahead and select all the faces that will turn into displacements, at least on the cliff to start with. You can do this is sections, which I reccomend because it's crazy trying to select an entire map's worth of displacements at once.

    [​IMG]
    [​IMG]

    Then turn them into displacements as you'd normally would. I used power 2 here.

    [​IMG]
    [​IMG]

    As you can see, the block from earlier was untouched because it has no outward facing faces. This is usually when I delete it.

    [​IMG]

    And this is our final structure - all turned into displacements and it should sew perfectly together.

    [​IMG]

    Next, we'll start actually turning it into a nice looking cliff. The way I do this is by using smooth with the face normal tool in displacements. To get started, I usually make a bunch of cubes and rotate them like this - this gives me 45 degree faces in the main directions.

    [​IMG]

    You'll notice that by default, your displacement paint geometry tool is set to 'face normal'. This means that you can sample the angle of another face somewhere in the map and use that as the push/pull direction. If you alt-right click on the face pictured here...

    [​IMG]

    Your displacement tool will rotate it's axis to match that face, and you can now push, pull and smooth in that direction!

    [​IMG]

    So then I go through and smooth out the right angled corners. You can see here, I sampled the face correspinding to the inner corner and selected smooth in the paint geometry window. You'll also notice that I only have the direct two displacement faces selected here - this is because otherwise, smooth will reek havok with the top and bottom of your cliff structure. We'll go into that shortly.

    [​IMG]

    Smoothing with light, gentle clicks (don't hold it down!!) we can get a nice curved shape out of these displacemnets in this way.

    [​IMG]

    Now to fix up the parts of the cliff we left behind - select the face of the ground in the corner. Using the same face normal angle - just with raise/lower selected, we pull this corner out from under the new smoothed corner. This makes it sew a lot nicer and requires less fixing up when we get to that stage. You can do this with the top too, but it doesn't matter as much on inner corners like this.

    [​IMG]

    And as you can see, once we hit sew the displacement comes and meets your new smooth corner nicely.

    [​IMG]

    Going through and doing the rest of the corners in this way - I noticed that I missed some of the floor tiles! So I just shift-dragged and fit these on the edge here. You can also see that I've "pushed back" the corner on the top of the cliff here, similar to what I did in the last part.

    [​IMG]

    From here, I went through and just roughed up the displacements a bit. Using the face normal, you can smooth the corners between the top of the cliff and the walls - or the walls and floor if you want. You can round the roof of the cave too. I also suggest pulling and pushing the walls around a bit just to get an interesting shape for the cliffs - usually I pull the bottoms and tops out a bit, vary the height a bit too, and roughen up the ground. I also did some alpha painting to fix up the textures.

    [​IMG]

    And here's our result - it could do with a lot of polishing but you get the idea of how to construct displacements in this manner.

    [​IMG]
     
    • Thanks Thanks x 55
    • Like Like x 3
    • Useful Useful x 1
    • Creative Creative x 1
    Last edited: Jul 21, 2015
  2. Turbo Lover

    aa Turbo Lover Fight me under Glasgow Central Station

    Messages:
    333
    Positive Ratings:
    317
    What's the significance of making the cliff out of identical cubes, why not just make a displacement from one brush?
     
  3. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,851
    Positive Ratings:
    4,851
    You could very easily make them from larger brushes.

    However, splitting them up gives a larger resolution to work with, and it also allows for finer construction of the displacements - like the tunnel above. I just prefer to work with a standardized cube size to begin with and them edit from there when the situation desires.
     
    • Thanks Thanks x 1
  4. Muddy

    Server Staff Muddy Muddy

    Messages:
    2,387
    Positive Ratings:
    4,219
    Fuck me that's clever.
     
    • Agree Agree x 1
  5. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,219
    OK, show of hands, who here besides Freyja had ever heard of the alt-right-click trick before now?

    We keep finding these new undocumented techniques for doing crazy stuff and it's making my head hurt. :psyduck:
     
  6. Bloodhound

    Bloodhound L6: Sharp Member

    Messages:
    316
    Positive Ratings:
    239
    Me. :p

    Quite well documented. I would say. ;)
    https://developer.valvesoftware.com/wiki/Hammer_Face_Edit_Disps#Axis (See Face Normal).
    Probably even too well documented to catch it all.
     
  7. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,033
    Positive Ratings:
    3,980
    I've known forever. Actually I told her about that a few weeks ago. I am surprised people don't know about it.
     
  8. DonutVikingChap

    DonutVikingChap L5: Dapper Member

    Messages:
    228
    Positive Ratings:
    142
    I don't remember who it was but someone taught me that method when I was working on the huge displacement quarry in pl_invasion, except using a block like this, which then ended up on one of the buildings in the map when I was done with it:
    [​IMG]
    But I ended up mostly using the shiny new "Screen XY" thing in the Sculpt menu instead.
     
  9. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,851
    Positive Ratings:
    4,851
    I've been using face normal for years...you can go back and watch the keikoku 72h steam from last year and watch me use it there!... I learned about it from Booj when he made that fancy cube so many years ago. (And I don't remember you telling me this either, sure it wasn't someone else?)
     
    Last edited: Jul 21, 2015
  10. nightwatch

    aa nightwatch

    Messages:
    640
    Positive Ratings:
    446
    I swear that trick was featured in YM's tutorial on badlands-style displacements because he used it a lot for hoodoo.
     
  11. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,033
    Positive Ratings:
    3,980
    Oh, I think I'm thinking of telling you about scaling the orb thing. Was that it?
     
  12. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,851
    Positive Ratings:
    4,851
    Yes I remember you telling me that now and being amazed at learning a new trick, but I have already forgotten how to do it. It would be much appreciated if you could post it here for the thread and I'll cover it in my next part...
    It was, I was looking at that tutorial earlier today.
     
    Last edited: Jul 21, 2015
  13. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,033
    Positive Ratings:
    3,980
    If you hold down alt and M1 and then move the mouse up or down, it will scale the displacement tool accordingly so you don't need to stop painting geometry to change the size of the orb.
     
    • Thanks Thanks x 6
  14. Anreol

    Anreol L6: Sharp Member

    Messages:
    262
    Positive Ratings:
    273
    Now update this and explain how to avoid leaks meanwhile using this.
    No really, my map its full of them with just a cliff.
     
  15. iiboharz

    aa iiboharz Meme Queen

    Messages:
    711
    Positive Ratings:
    1,034
    Displacements don't seal the map. Put nodraw behind it.
     
  16. Crash

    aa Crash func_nerd

    Messages:
    3,160
    Positive Ratings:
    4,791
    I've been using face normal for a long time but hadn't thought of the cube trick. Noice.
     
  17. ZeSpice

    ZeSpice L2: Junior Member

    Messages:
    94
    Positive Ratings:
    33
    *Waiting for part 2* :O

    You are not alone.
     
    • Thanks Thanks x 1
  18. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    944
    Positive Ratings:
    922
    Already knew about the alt+M2 thing, I even made my own helper brush for it:

    [​IMG]

    http://puu.sh/j7yE4/7c0bc2c359.vmf
    Just use 'Save As' and then put it in Team Fortress 2/bin/Prefabs.
     
    • Thanks Thanks x 5
    • Useful Useful x 2
    • Like Like x 1
  19. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    735
    Positive Ratings:
    72
    I am gonna go ahead and assume it works, all I get are link action commands (open, open in new tab, open in new window, inspect element), if there is another place I could download this prefab, it would be helpful.
     
  20. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    944
    Positive Ratings:
    922
    (I'm german so I gues I will have to translate the button I have myself)
    I can do the following 2 things:
    • Right clicking the link and then clicking "Save Target As..."
    • Opening the link in a tab and then right clicking the text and clicking "Save Page As..."