[TUTORIAL] Displacements

A forum dedicated to chat about maps and the Source SDK for any Mod including tips and tutorials.
Post Reply
Archon
Retired Admin
Retired Admin
User avatar
Posts: 1011
Joined: Wed Dec 19, 2007 7:46 pm
Location: Canada

Games Played

Ville Awards

Archon’s avatar
Loading…

[TUTORIAL] Displacements

Post by Archon » Sat May 02, 2009 6:19 pm

In this tut I will show you the basics of using the displacement tool in order to create more realistic terrain.

Note: Displacements don't seal the map from leaks, must always be 4 sided and can't be tied to an entity

First off, create 3 basic brushes with the block tool, using texture concretefloor007b for the middle brush, and blendgroundtoconcrete002 for the 2 others.
Image

Next, i will replace all surfaces of the brushes, except the ones i will be using, with nodraw texture.
Note, you dont have to do this, this faces will be disregarded when the displacement is created, and source wont even render those sides no matter what texture is on it. i do it to show what faces i will be using.
Image

Now open the texture application tool and select the 3 faces (ctrl + click). Then select the Displacement tab, and click the Create button. Leave the Power at 3 for now (bigger number, more triangles, smaller number, less).
Image

With the 3 displacements selected, click Paint Geometry button. Feel free to play around with this a little. i would start by increasing the radius a little.
Image

Now for a little added randomess, exit the paint geometry tool, select the 2 side displacements and click the noise button. this will create a slight gap between the displacements. so next, select them all and click Sew button.
Image

If you havent already done so when playing the the Paint Geometry tool, select the smooth option in it to smooth out some of those sharp points you created when using raise/lower.
Image

Now we will paint the surface for a more natural look. this is where using the blend texture comes in. Select the Paint Alpha tool, and click along the edges of the side displancements where they meet the concrete
Image

thats about it. have fun.
Last edited by Archon on Wed May 20, 2009 7:24 pm, edited 1 time in total.
Image
USER, n.: The word computer professionals use when they mean 'idiot.'

Mad-Hammer
Retired Admin
Retired Admin
User avatar
Posts: 2064
Joined: Sun Oct 22, 2006 5:26 pm
Location: Point Pleasant, WV

Games Played

Ville Awards

=SG=Mad-Hammer’s avatar
Loading…

Re: [TUTORIAL] Displacements

Post by Mad-Hammer » Sat May 02, 2009 6:27 pm

Make sure and tell them to make sure "NoDraw" is not on any of the faces or your map won't compile.
Image[/center]

Masakari
Retired Admin
Retired Admin
Posts: 4341
Joined: Tue Dec 18, 2007 2:58 am
Location: Saskatchewan, Canada
Contact:

Games Played

Ville Awards

Masakari’s avatar
Loading…

Post by Masakari » Sat May 02, 2009 6:30 pm

Thanks for this Archon. This will be one of the next things I add to my map.

(Interesting note: this tutorial was inspired by my flat map. First thing he told me after playing it was basically telling me I need displacements) :)
I am the 1%!

Ian_Suffix
Villun
Villun
User avatar
Posts: 742
Joined: Wed Aug 20, 2008 12:14 am
Location: Washington State

Games Played

Ville Awards

Re: [TUTORIAL] Displacements

Post by Ian_Suffix » Sun May 03, 2009 2:37 pm

[quote="Mad-Hammer";p="169946"]Make sure and tell them to make sure "NoDraw" is not on any of the faces or your map won't compile.[/quote]Why would you use nodraw on a surface when you could just destroy it? 'tis the same function, I'm sure. Except only one of them works, evidently.

Speaking of which, that should be added to the tutorial. In many cases, you can only see one or two surfaces of a displacement, so you should destroy the rest of them by using Select -> Destroy.
Image

Mad-Hammer
Retired Admin
Retired Admin
User avatar
Posts: 2064
Joined: Sun Oct 22, 2006 5:26 pm
Location: Point Pleasant, WV

Games Played

Ville Awards

=SG=Mad-Hammer’s avatar
Loading…

Re: [TUTORIAL] Displacements

Post by Mad-Hammer » Sun May 03, 2009 2:48 pm

Two reasons I would say that. During my optimization process of putting "NoDraw" on everything in site, I have accidently put the texture on a displacement causing a fatal compile error. Secondly, the conversion of a brush to displacement with "NoDraw" on one of it's faces can cause a compile error. Found that out the hard way when I had to destroy one hundred or so displacements is search of a "NoDraw" texture on a brush.

Didn't mean anything smart by it, just one of many things to be careful about when creating displacements.
:D
Image[/center]

Ian_Suffix
Villun
Villun
User avatar
Posts: 742
Joined: Wed Aug 20, 2008 12:14 am
Location: Washington State

Games Played

Ville Awards

Post by Ian_Suffix » Sun May 03, 2009 2:53 pm

Ah, yes, I didn't suspect your intentions at all, honestly. While I'm on the subject, here's a trick I like using during the conversion to displacement process: Select the brush, press Shift+A, convert to displacement, deselect the face that will be seen, and then press Destroy. The most efficient method I know to date!

EDIT: One more thing I thought of: if you want the road to be seriously flat, or not altered in height by the dirt around it, use the Raise To function in Paint Geometry to bring the road to a single height. If the dirt is also selected when you're painting, it too will go down to the road's level at the edges.

l3eeron
Retired Admin
Retired Admin
Posts: 9995
Joined: Mon Oct 23, 2006 10:51 am
Location: The surface of last scattering

Games Played

Ville Awards

<eVa>l3eeron’s avatar
Loading…

Post by l3eeron » Tue May 05, 2009 4:22 pm

There's no need to destroy...

Instead of selecting the entire brush with the select tool:


- Deselect anything selected
- open your face edit sheet
- go into select mode
- in the 3d window select (click on) the one face (multiple faces work too) you want to create the disp on
- create
- All other unselected face on that brush will be destroyed automatically.



That'll avoid having to destroy the other 5 unwanted displacements. There's no need to even start out with a nodraw brush. I make a brush textured with a "blend" texture, select one face and create, that's it.


But, ya, It's just like Archon says in the tut.

And thank you Hammer, I have not run into that problem of a disp with nodraw (on the working face). Sounds like a typical pitfall though.


edit, also wanted to point out that there are many many tricks to manipulating the displacements. There's the subdivision tool, clever ways to use the smoother tool and tricky ways to get things to sew add in some good ol' fashioned imagination and you got a winning combo :)

Archon
Retired Admin
Retired Admin
User avatar
Posts: 1011
Joined: Wed Dec 19, 2007 7:46 pm
Location: Canada

Games Played

Ville Awards

Archon’s avatar
Loading…

Post by Archon » Tue May 05, 2009 4:38 pm

i purposely left out the subdivide tool, wanted to keep it simple.
Image
USER, n.: The word computer professionals use when they mean 'idiot.'

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests