Displacement Troubles
Stuka
10-25-2005, 06:16 PM
Alright well what I'm doing is making this park-like area not flat..pretty obvious..
I used many brushes to make the path and the grass around it, then I selected them all together, created a Power 3 displacement, put the Geometry distance on 1, and the radius on pretty high so I don't get those giant cones..
It looks fine in the editor, but when you get in game you have light shining through between every brush, how do you stop this?
http://img471.imageshack.us/img471/2111/dodschwarzunga100174cn.jpg
Is the method I'm using for displacements a bad way..if so is there another way?
Thanks again in advance, you guys have been a big help so far
CoolHand
10-25-2005, 06:39 PM
Did you use the SEW command to tie them all together?
Stuka
10-25-2005, 06:58 PM
doh
Stuka
10-25-2005, 07:17 PM
http://img476.imageshack.us/img476/219/error5ux.jpg
:(
Furyo
10-25-2005, 07:28 PM
Make one big terrain for the grass, and do the pathway over it.
Stuka
10-25-2005, 09:29 PM
Still does it..I'm just going to get rid of the pathway..
josh_u[RR]
10-25-2005, 10:03 PM
Originally posted by Stuka
Still does it..I'm just going to get rid of the pathway..
I think what he means is make the path an overlay. if the whole thing is one big brush, then no light from underneath.
meelo
10-27-2005, 02:35 AM
displacements are a finiky bunch. You cannot sew them unless they fall into some specific criteria. I could attempt to explain it, but I'd confuse the lot of you, so instead I'll just link you to some wiki documents you should check out. It oughta help you sort out your lighting problem.
basic displacement info:
http://developer.valvesoftware.com/wiki/Displacement
more info on all the commands in paint geometry:
http://developer.valvesoftware.com/wiki/Hammer_Face_Edit_Disps#Paint_Geometry
Even if you think you know everything you can learn about displacements by reading, I suggest you just skim these docs. It gives you important info about how to size your displacements (in world units, not Power) so that they will smooth together properly, sew and work well.
FuzzDad
10-27-2005, 12:06 PM
The best way to avoid this was mentioned...make the entire area one texture and then cover parts of it w/a road overlay. Decompile flash and look how they did it there.
Stuka
10-27-2005, 03:17 PM
What should I use to decompile?
I remember WinBSP from a long time ago..though it did a very bad job..and I don't know if itll work for source
Furyo
10-27-2005, 04:54 PM
vmex 097, do a search on google
Fingers
10-27-2005, 05:06 PM
Since I made the road in Flash port I feel like I should intervene here :) The way it's done in Flash isn't quite optimal, especially the rounded corners use too many overlays. I've since found a better method.
What you should do is make a continuous mesh of quadrilateral brushes so that you have the rough shape of the road in the brush form (The brushes should share vertices in the corners rather than meet in T-junctions). Try to keep the brushes squarish in shape so the displacement will be regular.
Put a road overlay (dirttrack01a) on each brush that you're using for the road, and move the vertices of the overlay to the corners of the brush. This allows you to make non-orthogonal brushes with the road texture stretched so that the overlays mesh perfectly. Use shift-drag to weld the corners. Set the V coordinates of the overlays to 0...N in order to tile the texture N times.
Finally, once you're done with the overlays select all the faces and turn them into displacements. I use power 2 most of the time because it's easier to deal with. Then just move the displacement vertices in X and Y directions to make graceful curving road shapes. I do vertical displacement as the last step. If you use a grass/dirt blend texture, paint the surface below the road with dirt...
Note that once you turn the brushes into displacements there's no going back, as the overlays will be affected by the displacement (that's what we're taking advantage of).
Fingers
10-27-2005, 05:16 PM
It's even possible to make compact 90 degree turns (within a square brush) with this method. The overlay in this case is slightly narrower than the brush, and stretched from (say) the left edge of the brush to the top edge, and then the displacement vertices are moved to make it into a round shape. There's some distortion but it's not hideously offensive ingame.
Furyo
10-27-2005, 05:33 PM
great post Fingers :)
Stuka
10-27-2005, 05:39 PM
i didnt understand that the first time through, but once I read it again and start trying to do it, itll come to me
you should repost that in tutorials lol
Fingers
10-27-2005, 06:36 PM
Btw, in the map with the light leaking did you select the *brushes* or just the top faces of the brushes when you turned them into displacements? Your screenshot looks like what you get when you turn the whole brush into a displacement (the sides are being lit as well, and that causes the light to blend around the corner). Only the visible top surface should be a displacement. This may be the cause of your compile warnings as well.
TheSurgeon
10-27-2005, 06:52 PM
how do you edit the verts of an overlay? the vertex manipulation tool doesn't work and i don't know any other way you could do it.
ultranew_b
10-27-2005, 09:12 PM
You can't edit the verts of an overlay (I don't think). You can however scale, rotate and skew the overlay. Applying this to the simple road shapes (ie. brush surfaces before converting to displacement). Then when you edit the verts of the displacement map the overlay will conform to the displacement.
Great tip, Fingers. I tried it and it works great.
Edit: I had an epiphany. Why not just convert the dirttrack01 overlay to a normal texture (via a new .vmt file). Then apply it to a displacement and manipulate it directly, without having to even bother with this overlay stuff.
I just experimented with this method and it works great as well.
Fingers
10-28-2005, 01:58 PM
You edit the displacement vertices by going to the Face Edit mode (shift-A), select the displacement face, go to displacement->paint geometry. You can select the axis (x,y,z) and move the vertices around. (At least I think that's what you mean)
ultranew_b: The problem with that is that when you have a non-orthogonal shape you need to rotate and scale the texture to fit the face which is time-consuming. You also can't get the texture to mesh seamlessly between two brushes that are in different angles (like the road in my example).
The overlays let you match the "top" edge of one overlay to the "bottom" edge of the other one perfectly so there's no seam. Meanwhile the grass/dirt texture below it will also seamlessly mesh with the surrounding brushes. (This is obviously less important if you indeed want a hard transition to, say, pavement rather than a dirt path)
Propaganda
10-28-2005, 01:58 PM
Can all vertices on a displacement be moved? When I select a displacement with the vertice tool all I see is the corners as though it were a brush.
ultranew_b
10-28-2005, 03:23 PM
You need to go into texture mode, then edit verts.(as in pic below) :)
Here is a road I made without overlays. I just made a new .vmt file for dirttrack01a.vtf. The grass sprites from the ground below the displacement appear through the road as well, giving a nice effect without having to create any new material blends.
Propaganda
10-28-2005, 06:54 PM
Ahhh yes I understand that principle, I thought there was a point vertex system I didn't know about.
Day of Defeat Forum Archive created by
Neil Jedrzejewski.
This in an partial archive of the old Day of Defeat forums orignally hosted by
Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.