Jump to content
The Dark Mod Forums

Newbie Mapper Tip: Making uneven ground


Springheel

Recommended Posts

Here's a simple little tip for making your maps look a little more realistic and less flat.

 

When making outdoor streets, yards or tunnels, it's common to just make a regular, flat brush for the floor. This tends to look artificial. In reality, dirt tends to accumulate along the edges of buildings/walls, and the center areas sink a bit due to traffic and/or run-off.

 

While modelling a completely uneven floor might be too time-consuming, there's quite an easy way to break up the flatness of the ground.

 

Instructions:

 

Create a simple patch mesh. Patch --> Create Simple Patch Mesh. I'd recommend 5x5.

 

Go into vert mode (select the patch and hit ctrl-V)

 

Pull the verts up in the middle (click on them, then drag upwards) to create a bit of a hump. The patch is now a small hill.

 

patch1.jpg

 

 

Move the patch into a corner or next to a wall. You can rotate it so that the edge facing the wall is higher, or just pull those verts up. Move around to suit your taste. Make sure none of the edges are floating above the ground.

 

 

patch2.jpg

 

 

You can leave the patch as a dirt texture, or you can match the texture of the floor/ground (select the floor surface, then edit --> copy shader, then click on your patch and edit --> paste shader). This will make the patch blend seamlessly into the ground. Presto. You've now broken up the flat area.

 

Clone that patch (select it and hit Space) and you can move the new one somewhere else, rotating, resizing and pulling around verts as needed. Once you've got the first one, it's very easy to make more. Placing a few of these around go a long way towards breaking up the "flat and boxy" look that comes from using only brushes.

 

patch3.jpg

 

Additional Notes:

 

AI will walk over these patches without problem as long as they're not really high. The footstep sound might not fit, however. You might need to put a small brush underneath with a tdm_collision_[appropriate material] texture.

 

The same method can be used for creating small hills in the middle of a grassy ground, a pile of debris from a turned over wheelbarrow, or a coal pile in a basement.

Link to comment
Share on other sites

Is it such a great idea to let the unseen patch stretch outside the playarea? Isn't that unnecessary computing? When I create small cornerpiles I usually use the dimensions 3x3 and push it into the corner...

 

Another good tip is to caulc the underside and perhaps make the patch into a func_static and add noshadows 1 if appropriate.

Edited by Fieldmedic
Link to comment
Share on other sites

Just be sure the patch does not rise the AI so high that his head hits the ceiling. AI will path according to the worldspawn below the patch. It does not take the patch into account. There will be trouble if the AI thinks he can pass between the floor and the ceiling worldspawn brush, but the patch rises him so high he does not fit through: the AI gets stuck or complains about unreachable destinations.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Is it such a great idea to let the unseen patch stretch outside the playarea?

 

I do it all the time. But I'm not one of those mappers who have the patience to line up every single vert or caulk every unseen surface in the hope it might save someone a frame per second.

Link to comment
Share on other sites

No, I revisited the Caulc entry in the wiki and saw that Sotha had done testing and it seems to be fairly useless to caulc when playing on rather new equipment, but may be beneficial to do on the first of a func_staticified brush model that's going to be copied lots of times...

Link to comment
Share on other sites

You could also take this further and make the entire floor of a room with a single patch like this, with just a caulk brush underneath. This might be suitable for the dirt floor of a stable, or other areas where the ground is expected to have some gentle unevenness.

Link to comment
Share on other sites

you need to keep patch on the ground brush (not under and not above) to align texture

otherwise you get ugly visible seam between textures

 

I got some ugly "Z-Fighting" when keeping it on the ground that could only be solved by placing the ends a bit under the ground. How do you do this the right way?

 

Btw should I make the Patches noshadows 1 ?

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

I got some ugly "Z-Fighting" when keeping it on the ground that could only be solved by placing the ends a bit under the ground. How do you do this the right way?

 

Btw should I make the Patches noshadows 1 ?

you need to set grid size to minimum and place your patch 0.025 point higher than ground (just like with decals)

Edited by Shadowhide

Proceed with caution!

Link to comment
Share on other sites

Other than tweaking the position, you could use the "polygon offset" material property to fight z-fighting but it requires

a custom material file.

 

Modwiki:

 

http://www.modwiki.n...obal_keyword%29

 

http://www.modwiki.net/wiki/PolygonOffset_%28Material_global_keyword%29

 

I think there might be an Entity argument that does the same though...

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

you need to keep patch on the ground brush (not under and not above) to align texture

otherwise you get ugly visible seam between textures

 

I've never noticed a problem.

Link to comment
Share on other sites

Other than tweaking the position, you could use the "polygon offset" material property to fight z-fighting but it requires

a custom material file.

 

polygonOffset actually destroys surfaces that are supposed to have light interaction - they end up being pitch black instead.

It works fine with simple decals that use blend-modes however.

 

Some other ways to get rid if z-fighting problems could be either making the whole grass surface with one or more aligned patches, or ( given the patch border vertices are flush with the underlying brush ) cut the underlying brush so that caulk can be assigned to the area that is covered by the patch - that way there is no polygon surface below it that can engage in a z-fight. Unfortunately this could be a bit cumbersome if the main patch borders are irregular which might need extra helper patches to get flush with brush edges. Sparklies may still occur tho.

Link to comment
Share on other sites

Ouch!

 

Do any of the "Sort" levels work without destrioying interactions?

 

Edit:

 

No... Apparently Sort doesn't work for lit surfaces either.

 

So many tools for decals and blends... nothing for real surfaces :(

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

So you think that seams between textures is ok ?

 

No, I mean I've never had a problem because there is no seam between the textures if you use copy/paste shader.

 

I got some ugly "Z-Fighting" when keeping it on the ground that could only be solved by placing the ends a bit under the ground. How do you do this the right way?

 

Don't worry, burying the patch is fine.

post-9-0-58536100-1325811886_thumb.jpg

Link to comment
Share on other sites

Like I said, it's a really easy and convenient way to make bumps and piles. :)

Link to comment
Share on other sites

I didn't remember it either. "Copy/Paste shader" should be one of those essential tips in the beginner's tutorial it's so useful.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Yeah, You HAVE to use copy/paste shader, it does perfect alignment like Spring said.

 

I have some patches like this that bend around corners too in the visportal map tut I made. Thing is you can do a ton with patches and pulling up the middle is just the start. You can pull them and stretch them in any plane and really add a lot of un-uniform ground. But the texture stretches all wonky with it, the copy paste trick then makes it perfect.

 

-------

The 'problem' with overlapping is that it creates overdraw which is extra calculations, but not enough that you'll really notice it. So yeah it's fine to do.

 

I usually try to keep no overlap when it can be accomplished just because it's 'cleaner' in the editor, but a lot of times it's easier to let it intersect terrain then to build clean patches around stuff.

 

You can also have the edge verts aligned with the flat brushes, but to fix the z fighting the next verts in the row need to be higher than the flat brush so you effectively have a wedge and none of the patch is exactly flat on the flat brush (Or make a flat caulk brush under it).

And having it float I imagine would leave visual artifacts, like being able too see a few extra pixels at angles which would completely break alignment.

 

-------

The reason to make it cast no shadows is just to save performance, since the shadows that would be cast wouldn't be seen anyway.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Hey, cool tutorial. I guess easy beginner tutorials like this should go into the wiki or otherwise they'll be lost in the depths of this forum eventually...

 

I agree, perhaps there is a case to create an wiki article "10 simple tricks to improve the look of your map" or something, which could include this technique as well as other relatively easy improvements to texturing, lighting etc.

Link to comment
Share on other sites

I'd like to see some lighting tips too as I find it hard sometimes to do decent light scenes (Do I have to increase lightradius or maybe better the light value? etc.)

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

I wouldn't let any patch stick out into the void as well because it will be rendered. About the z-fighting: there is z-fighting if the surfaces overlap but you won't see it because the textures of both surfaces match completely, if you transform the texture of your patch or brush you'll see z-fighting again. Because of all this extra rendering I would just use a patch all the way, Make a caulk hole where the streets are and uses patches to make the street and don't forget the mosterclip.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...