Jump to content
The Dark Mod Forums

Tips for constructing underground environments


Dragofer

Recommended Posts

In the spirit of the thread that was recently here about constructing outdoor environments, I'd like to make one asking about advice for creating cavernous ones as well. Perhaps we could even make a new series in the wiki.

 

I've more or less finished a large section of the map I'm working on and am now working on an underground area. I took a look at The Rift, Mad's Mountain and glimpses of NHAT (just the entities alone completely kill my current computer) and saw that patches played a big role, but it is a bit like looking at a painting: one can see what works well quite easily, but trying to create one like it can be a different matter. I was wondering if there is any general advice that applies here, i.e. how to properly bend patches to one's will. I think I'd be particularly interested in how to build larger caverns sized 1000 x 1000 x 200/300 units, if possible with streams of water, as well as how one could make the places where the patches intersect look more seamless.

Edited by Dragofer
Link to comment
Share on other sites

First, you should pay attention to performance. It's good to see your map, so I can say that there are over details on patches that players won't realize but slow down the fps. I'm low end-user, so that I know how much they impact on fps. Anyway, if you want to keep details and better performance, then use patch inspector and make it horizontal: 4, and vertical: 4. It may be less, depending where you use, but tunnels are good on 4-4.

 

Second, use enviromental objects to hide intersections. For instance you can use rocks or timbers depending on what kind of cave you are building.

 

Third, seamless texture aligning on patches is easy, I have few tricks. Most critical thing is aligning their vertices where they unite. After you aligned vertices of two patches, you can use brush's shader on them. Simply create a brush, copy-paste its shader (sometimes it requires paste natural) to two patches. Another method is using top function at the surface inspector. First create a patch, modify it to natural at surface inspector. Then copy-paste it, and add to end of first patch. Now you can use top on any of them in order to align their textures.

And final method is creating patches according to texture sizes. For instance create a cylinder and make it x,z:64 y:128, then copy-paste it. Add it to end of the first patch, and you got seamless tunnel at length of x,z:64 y:256. Then curve it as you wish :)

Link to comment
Share on other sites

There are so many options.

 

brushes are great for hard angular rocks, you can chop them up all crazy with the clipper. Just stay at a fairly large grid size, then cntrl-G to snap them when you are done.

major issue is sometimes weird shaped brushes will change shape on compile (they always have to be convex and the compile will force it while the editor doesn't neccesarily.). Make them func_statics and seal the world with just big caulk 'rooms' behind the rocks. Monster clip real good.

 

Patches are great for rounder shapes.

-------

Most of the stuff in the rift was done by making one patch 'mesh', basically 3 - 4 sides of a cube. Then hitting V and stretching verts around for some shape. Then I'd copy/paste that and stretch it out taller, shorter, wider... edit verts a little to change shapes.

Most of the entire system is evolved from one 'patch mesh' and tons of copy/paste and just sinking edges into other patches.

Very sloppy but it works.

 

For the mines I made a tunnel (four patches with edges aligned - left wall, right wall, floor, ceiling) and I copy pasted a bunch together to make hallways.

Then select them all (if segments) and edit verts, making sure I did touching edges all together. Then shaping them more for more natural shapes.

I actually did most of the planks first, and built the tunnels around them.

 

Then I built caulk walls around them and made 'doorways' for smaller visportals. Go in the map in editor and hide patches in the mines.

 

I didn't worry too much about tex alignments, etc.. alot of them were stretched to mimic grinding against each other in earthquakes.

Plus that whole area was done really fast.

 

Have to monster clip really good under patches too, I think the ai can walk 48 units or so above the clip (on patches or func_statics).

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I was really surprised by the performance of Jesps' map given that it's all LWO models. I see that this also appears to be what Arx End of Sun uses (but they appear to have modular mini rock formation models over their basic geometry). Given how well it worked I think you could even extend the technique by using Rich_is_Bored's Bent Vertex Normal trick and perhaps even a huge Normal Map (not sure if there is some sort of Normal Map size limit)?

 

I was under the impression that using a Model for world geometry would cause AI path-finding issues so I presume that you put some Brushes over the paths? Or maybe the AI were walking on the Caulk Brushes?

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

Thanks for the swift replies, this stuff is both useful and reassuring smile.gif. I was sure I had fixed subdivisions on that one, but it probably got lost. Ah well, a difference of perhaps 200, 300 polys or so.

 

I also found a fourth way of aligning the textures: to select a good texture for it in the first place (dark, coalish - as in Badcogg's mine).

 

The only thing I'm not >90% sure about now though is the best approach to integrating cylinders into patch walls. In the sample I tried making a ring for the cylinder's mouth, then sinking the adjacent walls through the ring. Imo this looks a bit rough. So I tried to make the adjacent walls directly surround the tunnel's mouth. But this stretches the texture to provide excessive amounts of what I call "texture coagulation", the texture moving when looked at in the editor preview.

 

Aside from that, I'd appreciate if someone (just one) could take a look at and provide some feedback on the development of what I have done now (keep in mind that the demo earlier was just an investigation into a construction style). One could consider it a kind of alpha testing :)

Link to comment
Share on other sites

Select one of those now warped texture patches and hit ctrl-alt-t

 

That'll bering up the texture editor and you can move the verts around on the texture to reposition it. Works great with patches, is somewhat limited for brushes.

 

----

@nbohr1more

 

Still no reason to use bent normals. As you make shaped objects in 3d the normals ARE bent according to smoothing groups. That's what they do. The bent normals trick really ONLY works for flat planes (like old tree models) have for leafs. Even my newer trees have bent planes, thus the normals are bent, thus no need for that trick.

 

I suppose those caves were smoothed, I thought they were patches.

 

There's no reason at all an entire huge city couldn't be built out of 3d objects and have great performance. When it comes down to it the engine is just rendering Tris.

But you HAVE to back up all the objects with terrain brushes to seal the void/visportals.

And you also need to export in pieces so they don't cross over portals, other-wise you waste performance withunseen areas of the map.

Which is why building stuff in the editor is as useful as it is. Drag a wall out, easy to texture quick in editor/easy to resize. Seals the void. Builds paths. Takes alot more time to model insides of buildings, change sizes, load textures, build caulk walls AGAIN in editor...

 

As far as AI, they ARE walking on the objects, but their brains are walking on caulk or monster clip below the objects.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Thanks for the answers Baddcog.

 

Smoothing groups are a manipulation of the Vertex Normals then.

 

Same trick different terms.

 

I am not certain whether Jesps setup smoothing groups for his cave models then because there didn't appear to be any light tricks with the vertex boundaries.

 

His caves were stunning nonetheless. :)

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

Smoothing groups work 2 way in Doom.

 

All welded verts on a model will be smoothed automatically by the vertex normals. Vert normals ALWAYS point out straight from their vert, unless you manually bend them. But if you wrap them around a cylinder then they are 'bent' away from each other but still point out straight. The light shades from one vert to the next.

 

 

A sharp edge is made when you seperate polys because the light no longer shades between the verts. Now you have 2 smoothing groups. So the light evens out over your poly in 2 shapes, not just one. With those 2 methods you can have models with sharp edges and round edge and the lighting will hit them properly. It works the same way with patches.

 

 

Brushes however can't be 'bent' so the light can't bend smoothly over them. You can cut angles on them but that makes them look sharp.

 

So there aren't any light 'tricks' on most models, they don't need them. The trick works on flat plane trees and improves their look, but most new trees just have rounder canopies to begin with, thus not needing 'tricked'

 

 

Dark is the sway that mows like a harvest

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...