Need help with displacements

Numerous

L4: Comfortable Member
Oct 14, 2009
150
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:

Numerous

L4: Comfortable Member
Oct 14, 2009
150
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:

Blue552

L3: Member
Sep 16, 2009
137
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.
 

Schinken

L1: Registered
Aug 6, 2009
33
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 ^_^)
 

Gadget

aa
Mar 10, 2008
531
527
here's an image that hopefully explains how sewing works:

displacementsewing.jpg


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:
displacementnoise.jpg
 
Last edited:

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
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:

Numerous

L4: Comfortable Member
Oct 14, 2009
150
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?
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
You can't have triangular displacements. You'll have to make do with a square displacement that intersects with anything outside your triangle.
 

Dr. ROCKZO

L8: Fancy Shmancy Member
Jul 25, 2009
580
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?
 

Numerous

L4: Comfortable Member
Oct 14, 2009
150
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?
 

Schinken

L1: Registered
Aug 6, 2009
33
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 :)
 

Gadget

aa
Mar 10, 2008
531
527
...get 2 points [...] and get them to both go to 1 spot (not sewing, Im trying to get the 2 points together so I can sew em)...

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:

Numerous

L4: Comfortable Member
Oct 14, 2009
150
72
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).
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:

Gadget

aa
Mar 10, 2008
531
527
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.

...I HAVENT GOT ANY OF THEM TOUCHING so I CANNOT SEW...
...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".

...TELLS ME THE COORDINATES OF A POINT in the displacement, which tells me the coordinates are X = xcoordshere, Y = ycoordshere, Z = zcoordshere....
...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.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
I WANT to SEW THEM, but I can't UNTIL THEY OCCUPY THE SAME COORDINATES (ie theyre touching).

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.

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.

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: