Need help with displacements

Discussion in 'Mapping Questions & Discussion' started by Numerous, Oct 15, 2009.

  1. Numerous

    Numerous L4: Comfortable Member

    Messages:
    150
    Positive Ratings:
    72
    Yea, displacements. My problem is, everything.
    I've gotten sewing down ok, I think I have the basics on it, but sometimes it doesn't sew at all. It says that the displacements must touch somewhere, but does that mean the crosses in the mesh/vertexes/whatever theyre called have to touch, or just the "string" themesh is made of?
    What does noise, and pretty much every other button except 'select' 'paint geometry' 'create' and 'destroy' do? Valve developer wiki doesn't go into much detail at all.
    Is there an easier way to learn apart from teaching yourself? because I can't find any good tutorials that explain the basics about displacements.
    EDIT: How do you smooth? I know it can do that in Maya, (modelling/animation program) I worked that out in the <5mins I spent on it.
     
    Last edited: Oct 15, 2009
  2. The Political Gamer

    aa The Political Gamer

    Messages:
    4,468
    Positive Ratings:
    1,682
    [ame="http://forums.tf2maps.net/showthread.php?t=798"][GUIDE] Youme's guide to displacement cliffs - TF2Maps.net[/ame]
     
  3. Numerous

    Numerous L4: Comfortable Member

    Messages:
    150
    Positive Ratings:
    72
    That assumes I know what I just asked about. I read it before anyways, and it doesn't have the information. The information on sewing is : 'Step X. Sew these 2 displacements together'
    Any chance of an answer?

    Also, is there a way to make the lines of mesh match up on the different displacements? Should I just copy one of them, and clip it into position in the first place, to save me a bunch of effort fiddling around?
     
    Last edited: Oct 15, 2009
  4. Blue552

    Blue552 L3: Member

    Messages:
    137
    Positive Ratings:
    18
    to sew 2 or more displacments, go to the toggle texture tool, select the faces you want to sew together and press "sew".

    NOTE: The faces will not sew together if the side you are sewing ARE NOT THE SAME DIMENSIONS

    So If the two sides of the displacments which are touching ARE NOT EQUAL IN LENGTH then it won't sew. If they are not to the same subdivision then they will not sew.

    Go to youtube and type Source SDK and search for videos by 3kilkphilip - thats how I got started.
     
  5. Schinken

    Schinken L1: Registered

    Messages:
    33
    Positive Ratings:
    15
    Just sew them before you start modifying them, select all faces, go to "paint geometry" and at the bottom "auto sew" so they won't even "un-sew" (so they will be somewhot glued together ^_^)
     
    • Thanks Thanks x 1
  6. Gadget

    aa Gadget

    Messages:
    495
    Positive Ratings:
    411
    here's an image that hopefully explains how sewing works:

    [​IMG]

    Brush 1 + 2 can be sewn because their edges match.
    Brush 3 + 4 can be sewn because one edge is exactly half of the other edge (that's a fact most people don't know!).
    Brush 5 + 6 CAN'T be sewn because the edges don't match (subdivision won't work for those too).

    For smoothing you can use subdivision but it's not the same as smoothing in Maya. Also note that you can sew displacements with different powers as long as the edges match.

    ...and here's an example of the noise button that adds noise to your displacements (it randomly modifies the surface depending on the Min and Max values you enter). Just open Hammer, create a displacement, hit the noise button, enter some values and see what happens:
    [​IMG]
     
    • Thanks Thanks x 5
    Last edited: Oct 17, 2009
  7. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Here's how to think of displacements.

    Displacements are surfaces "hosted" by the flat surface of a normal brush which is sacrificed during compiling to let the displacement live. That "real" brush is a baseline-placeholder for one-or-more displacements. You could displace each of the six sides on a cube if you wanted, or the three rectangular sides of a three-sided column.

    In fact, you should start designing with :disp3d: turned off, and :dispmask: (I think) turned on. The one which makes the "host" brush show all sides, displacement-or-not.

    Use that view to make all the displacements faces touch. When you have two displacements that seem like they should be able to sew but don't.... Then in those cases the 3D displacement mesh view (as in Gadget's post) is no longer your friend. It is misleading. It is the location of the host brush faces (flat faces that never show up in-game) that matter for sewing, and those faces have to touch exactly or touch exactly where the smaller one matches half-the-length of the larger one.

    Lastly:
    (A) "Touching" includes just about any angle. That's why you can displace and sew the surfaces of all six sides of a cube.
    (B) Remember all displacements must be four-sided, even if you use vertex editing to make it look almost like a triangle.
     
    Last edited: Oct 15, 2009
  8. Numerous

    Numerous L4: Comfortable Member

    Messages:
    150
    Positive Ratings:
    72
    Question: I have a right angle triangle, 100% triangle. Like a square cut through the corners. Is there a quick way to make that a displacement? Failing that, will I have to just vertex edit a square so 2 corners of the 'square' occupy the same coordinates?
    In the tunnel I'm making, I'm gonna have to do this at least 4 times, so I should have some basic understanding by the end of it. (you don't have an 'awesome face' smiley, help).

    Also, your 'explanation' of noise needs work, I don't get it with the picture alone. Can I have a text description too please?
     
  9. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    You can't have triangular displacements. You'll have to make do with a square displacement that intersects with anything outside your triangle.
     
  10. Sgt Frag

    Sgt Frag L14: Epic Member

    Messages:
    1,443
    Positive Ratings:
    294
    Yeah, tris don't work but you can vertex edit and drag one corner in towards the other so it's almost a tri but you have to have at least 1 unit between those two points.
     
  11. Numerous

    Numerous L4: Comfortable Member

    Messages:
    150
    Positive Ratings:
    72
    Ok, but why can't displacements be triangles?
    I think it'll be possible anyways, but it'd be a lot easier if I could have an actual triangle.
     
  12. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,841
    Positive Ratings:
    4,765
    They're made of triangles in squares, it just wouldn't work I guess.
     
  13. Dr. ROCKZO

    Dr. ROCKZO L8: Fancy Shmancy Member

    Messages:
    580
    Positive Ratings:
    159
    I'm not sure of the exact reason, but it is something along the lines of what Aly said.

    Lol, how much more vague could I be?
     
  14. Numerous

    Numerous L4: Comfortable Member

    Messages:
    150
    Positive Ratings:
    72
    I guess if you said "because", rockzo.
    By the way, is there a way to get the exact coordinates of a (whatever its called where the lines meet in the mesh), or to get 2 points (or whatever its called where the lines meet in the mesh) and get them to both go to 1 spot (not sewing, Im trying to get the 2 points together so I can sew em), or something that does something that gets the same effect?
     
  15. Schinken

    Schinken L1: Registered

    Messages:
    33
    Positive Ratings:
    15
    If i understand correctly, you want to put 2 displacement to the same coordinates (or some points of them :))
    Try using the "Raise to" thingy (you can find it under Build Geometry) of you Displacement.

    Now just add a number under Distance e.g. 5 to have an offset of 5 Hammer Units from the Default Position of the Displacement. On Radius i would use 1 (to only select one point of the displacement). Now just do this on some points on the first displacement, and on some of the other one to bring them to the same level :)
     
  16. Gadget

    aa Gadget

    Messages:
    495
    Positive Ratings:
    411
    huh? That makes no sense ;)

    Just sew them and then use paint geometry to bring the point to where you want it. As Schinken said you can also try "Raise to". I guess another possibility would be to open the .vmf in a text editor and manually change the values of the displacement (just a guess, I haven't actually tried that).
     
    Last edited: Oct 17, 2009
  17. Numerous

    Numerous L4: Comfortable Member

    Messages:
    150
    Positive Ratings:
    72
    HOW F**KING HARD CAN IT BE?????
    I HAVENT GOT ANY OF THEM TOUCHING so I CANNOT SEW. I WANT to SEW THEM, but I can't UNTIL THEY OCCUPY THE SAME COORDINATES (ie theyre touching). I want something that WILL SET 1 TO X SPECIFIC COORDINATE, not just relative coordinates like "where it is +5" (because I don't know "where it is". FAILING THAT, I want something that TELLS ME THE COORDINATES OF A POINT in the displacement, which tells me the coordinates are X = xcoordshere, Y = ycoordshere, Z = zcoordshere.
    How F**KING COMPLICATED IS IT???

    FYI I'm not going to sleep until I've gotten this and i can compile. It's 1AM so could someone hurry up and answer.

    By the way, opening the vmf in a text editor will be like chucking a rock in the ocean, and coming back and trying to find it a year later. It'd take less time to manually test each and every function that hammer, in its entirety, or just screwing around until I actually get it (note: takes hours) than to actually search through the text file and change them (assuming I can understand the text file in the first place, and assuming I can open it in a text editor).
    EDIT: I found the problem. The solution is to make sure it doesn't somehow stretch itself and de-proportion the angle (creative terminology is allowed at 2AM). That explains why no matter how close I got the points, they wouldnt touch.
    I'm outta here.
     
    Last edited: Oct 17, 2009
  18. Gadget

    aa Gadget

    Messages:
    495
    Positive Ratings:
    411
    Hey, there's no reason to start yelling. I totally understood what you wanted to do but you're making it way to complicated for yourself. If your brushes don't align it makes no sense trying to manually sew all the faces of two displacements.

    ...well exactly...so why are you trying? Either use the vertex tool to align your brushes or you'll have to modifiy the displacement totally by hand - that's what I said ("...use paint geometry to bring the point to where you want it"). If you want to do that manually you'll have to make sure you start with displacements that are on grid and DO THE MATH yourself for the transformation on all three axis; but that is not the "real" sewing, not recommended and in other words "a bad mapping technique".

    ...that's why I mentioned looking in the vmf file because it's the only way - there's no such feature in hammer. I didn't tell you to look at the vmf I just said it would be another possibility. And by the way all brushes have numbers so it shouldn't be too hard to find one within the text editor.
     
  19. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Chill. You're making it "effing complicated" because your entire approach is the wrong one. You're trying to hammer a nail with glue. Instead, read what I already posted for you. Changing the position of the individual displacement mesh points to try to make it sewable? That won't do shit.

    Again: Do not use the 3d displacement view because it doesn't show what you need to know. To get it sewable you move the blocky "host" brushes. This is usually easy, because it's the exact same kind of lining things up you do with walls and floors and ceilings and ramps! Hammer is not like Blender or Maya, and Hammer displacements are not the same thing as meshes in those programs.

    I explained how to toggle things off so you can see what you need to see, but if that doesn't work just destroy the displacements, and move the now-suddenly-flat brushes so that they touch, then create the displacements again.

    There are technical reasons triangles don't work. For starters, what is the "right way" to evenly "grid" a triangle so that any side can meet any other side? And once that's done, how does it work when you have a big library of square tiled textures? How can you re-use any of that tiled art?
     
    Last edited: Oct 18, 2009