Jump to content
The Dark Mod Forums

elementary design question regarding the void


ithel

Recommended Posts

Undoubtedly this is a question covered in one of the many tutorials, but I haven't spotted it so far. I am completely new to TDM and I'm trying to wrap my head around this thing:

 

If worldspawn brushes (or any other thing, I guess) intersect those which seal off the void, does that create a leak? If I am understanding correctly, it does. Is that so? Thank you.

Link to comment
Share on other sites

If the "origin" of a worldspawn brush is "in the void" then that constitutes a leak.

 

See:

 

http://wiki.thedarkmod.com/index.php?title=Performance:_Essential_Must-Knows#Build_Airtight._Seal_out_the_Void._Avoid_Leaks

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

If the "origin" of a worldspawn brush is "in the void" then that constitutes a leak.

 

Not exactly. If the origin of a func_static or any other entity is in the void, then that is a leak. Worldspawn brushes don't really have an origin.

 

Worldspawn brushes are the walls that you build to separate the "inside" of your map from the "outside" (void). You also use them to build the architecture in your map. They can combine or intersect any way you want.

 

A leak is when there's a path from any "inside" point to any "outside" point.

 

(There is a way to put entities out in the void, but that's something you can learn down the road.)

Link to comment
Share on other sites

this from id's doom 3 help pages about leaks

 

  • There is an entity outside the map. All entities must be completely inside the map. There cannot be any entities poking through a brush or hanging out in the void (unless they are marked as noflood).
  • There is a gap between two brushes. This is simple enough to imagine.
  • A "hull" brush has a non-solid texture applied to it. This is probably the hardest situation to figure out because it will look like there is no leak. The problem is even though there is a brush there, it may have a texture indicating that it is not solid (for example a trigger texture)

some of tdm window textures count as a non-solid texture, as some can cause leaks.

Edited by stumpy
Link to comment
Share on other sites

In the beginning the way I thought of the void is to think of it as being like outer space, and your map is like a spaceship and you have to make sure there are no leaks for the air to escape through.

 

:laugh:

 

Can some one post an image of what an origin looks like for ithel, so he/she know what to look for etc.

Link to comment
Share on other sites

The origin is just an center axis. three small lines (red blu and green) that form the 'corner of a cube'. Select any item and you will see it.

 

Typically it will be centered on a func_static. But if you combine 2 or more func_statics into one it will still be centered on the first func_static selected. To recenter revert func_static to worldspawn, and while all brushes are still selected make it a func_static again. it will now be centered.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I really appreciate the help and the links. Sometimes things don't behave quite the way I expect, so I guess this is really a matter of getting experience with the editor. My knowledge of dromed is ten years old, but I still have that carving-in-solid orientation to put to rest. In recent years, the modelling/construction I've done has been entirely in Second Life, which is all real-time, in-world construction using highly manipulable "prims" (that can be cut, hollowed, twisted, tortured) and I find my fingers want to constantly hit those shortcuts, heh.

 

I experimented with making a ramp last night by moving the vertices of a solid block. I discovered that if I moved a vertice along more than one axis (ie not just moving the vertice down but also inward to form a ramp with two ascent angles), then when I go in-world via darkmod, that brush seems to lose its solid qualities, and the player entity runs through the resulting ramp shape rather than running up the slope.

Link to comment
Share on other sites

Brushes have to stay convex. What happens when you move a vert in 2 dimensions like that is that a face become concave.

It's hard to see too. But basically every square is made from two triangle. In a model program you can 'turn' the edge. If it crosses a brush one way it will be concave, if you turn it the face will be convex.

 

unfortunately you can't do this in DR. So you have 2 options.

1, cut the brush from top view into 2 triangles. Just one diagonal slice from corner to corner. Now instead of a square concave you have 2 triangle convex brushes and they will compile correctly.

 

I've had issues with aligning textures on brushes like that though.

 

The best option is just to make the first cube brush. Then turn it into a patch. A patch is an editable mesh, you can drag the verts around and make all kinds of crazy shapes. Or leave it as a square. They render smooth so you can make nice smooth flowing shapes and not get jagged/sharp edges like brushes.

Doesn't matter how you tweak them, they will always look the same in game as in editor. You can make arches, columns, etc..

 

The one thing they don't do is seal the void. So you can use them for ground, but you have to seal the void under them with caulk brushes (caulk seals, but doesn't render). (or monster clip)

Ai don't pathfind on them, so there needs to be caulk no further than about 48 units under any patches they will walk on. (their legs will 'walk' on the patch, but their brain walks on the caulk)

 

Also, if used for columns, etc.. an ai will get stuck walking against them. You need to surround them with monster clip in that case so pathfinding will make them avoid that.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

That's very helpful, Baddcog. I did remember reading the statement about wordspawn brushes always needing to be convex, but since it didn't look concave I thought it was safe to try. What you said makes sense. I'm working with solid brushes laid atop the brushes which seal off the void. The area I'm working on will be a road and slight hillside outside a city gate, so my thought was to lay out the basic geometry and try to use these patches to detail-it-up after.

 

You mentioned (and I saw this in Fucal's tutorial as well, I think) that AI can/will get hung up on vertical patches, necessitating the placement of monsterclips to help them avoid these. How much leeway does a patch have vertically before it begins to make the AI stick? In other words, if I use a solid worldbrush ramp, at what point or height in patch-work undulations placed over the topside of that ramp could I expect AI to start getting stuck?

Link to comment
Share on other sites

... at what point or height in patch-work undulations placed over the topside of that ramp could I expect AI to start getting stuck?

 

This is defined by "aas_reachability_z_tolerance" in the *.def files.

 

For rats and spiders, it's 25.

 

For everything else, it's 75.

 

They won't actually get stuck, but if they're told to go to a spot that's > 75 above the underlying world or monster_clip or clip brush, they won't go.

 

Brushes painted with the common/tdm_nodrawsolid_* textures also provide an invisible walkable surface.

Link to comment
Share on other sites

My guess was 48 but that was just a guess... looks like it's 75 ;)

 

This is also a trick to limit where rats can go. You could have a few func_static stairs (ai don't patrol func_statics either so stairs usually need a monster clip ramp) until the point where it's over 25 units and rats won't try to climb them.

 

anyway...

 

I think Fidcal was talking more about columns when he said 'vertical' patches. And they don't really get stuck to them, they just think they can walk through them. So they end up stuck walking against them thinking they are still moving.

Typically I just make a square box around them as high as an ai, then they don't try to get on top of it either, they will clearly walk around it.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Thank you again. Yes, I understood he was talking about columns, I was just wondering at what point a horizontal patch begins to look rather like a column to the AI, hehe.

 

I've spent several hours just playing around and had two epiphanies: patch vertices can be moved in the camera view...very nice. And the clipping tool is freaking awesome. I made a gypsy wagon (very rough) out of brushes with two patches for the roof (one facing inside, one outside). I tried using the end cap tool and had nice ends that looked good from outside, but of course were invisible from inside. That led me to at least try out the clipping tool by plugging those holes with squares and cutting them down to fit. Much better results than I expected. I like that tool quite well. I'm wondering if too much use of it degrades the render, as I imagine would be the case.

Link to comment
Share on other sites

Thank you again. Yes, I understood he was talking about columns, I was just wondering at what point a horizontal patch begins to look rather like a column to the AI, hehe.

 

I've spent several hours just playing around and had two epiphanies: patch vertices can be moved in the camera view...very nice. And the clipping tool is freaking awesome. I made a gypsy wagon (very rough) out of brushes with two patches for the roof (one facing inside, one outside). I tried using the end cap tool and had nice ends that looked good from outside, but of course were invisible from inside. That led me to at least try out the clipping tool by plugging those holes with squares and cutting them down to fit. Much better results than I expected. I like that tool quite well. I'm wondering if too much use of it degrades the render, as I imagine would be the case.

 

Triangles is triangles. So, doesn't really matter how much you clip. When compiled it's all triangles.

 

In fact the engine can do quite well with tris. I know tests have been done with 100's of thousands no problem. The issue really comes down to lighting. Or rather shadowing. Cast shadows are very expensive, and the more lights that hit each tri, the more shadows you cast.

You get 5 or 6 lights per tri and you really lose FPS fast. Where as you can have quite an impressive scene if each tri only has 2-3 lights on it.

(a world ambient counts as one)

R_showlightcount 1

in console will light tris based on count. White =6 + and is bad. Light purple is 5, pretty bad...

 

------------

The wagon sounds cool, you should post shots.

 

Here's a trick you will love.

 

Make the top of the wagon out of patches. Select and copy paste them. They will be in same spot. Select each one and hit menu... patch>matrix>invert.

 

Now you have a matching inside of the top.

 

If you get tricky with the patch verts you could even fold over edges so they have thickness and look like folded cloth, etc...

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

post-8460-131662286977_thumb.jpgLike I said, very rough, as the point was more to see what the different tools actually do. I'm going to start it over afresh. The textures were just for the sake of having some. I should post some of the things I've done in SL if I want to look good. :D Obviously the wheels aren't my work. Edited by ithel
Link to comment
Share on other sites

Cant all the leak problems be solved via big brush covering all the mission, that hollowed out with room function? Only problem will be the area with leak (without this room all around) will render few more tris, without lights or so, which meant really nothing) and just if the visportal to this area will be opened, or with player inside of this area?

 

 

 

 

Also Ive got a question connected with patches:

 

Ive got this situation:

 

dotazu.jpg

 

 

The useless part of the patch is in the brush=>no  lights on that surfaces=>very low performance hit=>no problem, or will this cost a loth of fps? If so, is there any way to cut these sides off, without affecting the visible part of patch?

 

 

 

 

Ive tried to select row of verticles and delete them, but that deleted whole patch. Delete two columns is affecting whole shape of the patch.. Clipper not working on patches. Also CSG substract is not working as it affected just the brushes.

He was sneeking silently in the night, moonlight was his enemy.

(Im not a native speaker, sorry for all miscleanous caused by my english..)

Link to comment
Share on other sites

I wouldn't recommend putting a box around the map.

 

it's not as critical as in editors like Hammer. because Hammer makes leafs in all that extra space. Doom3 doesn't.

 

But, doing that makes it easy to have a leak elsewhere into that void, thus making the leak hard to track down so those columns would be everywhere in your map.

 

Best way to do it would just be to use a flat patch, then bend the edge verts so it makes a half U shape. You really don't need a full column there if you can only see it inside. It'll be fewer tris and cleaner at the same time. And no leak, worry about that stuff.

 

small pic but it looks pretty cool.

--------

 

and yeah, no cutting patches, just resizing, adding/removing rows, and bending them any which way.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

The second question wasnt connected with leaks at all.. Ill have part of the map even on the other side of the wall.. What I need to know: Is the performance hit from theese parts of columns that arent visible so big, that I need to redo that, or not? (So far, this part of map has about 35 fps, no visportals placed in the whole map, but also no AIs.)

 

This is my very first mapping experience with DR (or other editors..), if not counting following Fidcals tut, so thanks, glad to hear that you found it pretty ;) .

 

On the other side, starting with staircase shaped like this isnt the best idea for your first project, figuring how to make this shape was very hard for me, as ith seems like the rotating is not working 100% properly (like 30 degrees are in fact 30,00something..), or the six sided brush is not with all sides of the same lenght.. Or I did something wrong somewhere. For the new mappers: Start with rectangular shapes :rolleyes: ..

Edited by PPoe

He was sneeking silently in the night, moonlight was his enemy.

(Im not a native speaker, sorry for all miscleanous caused by my english..)

Link to comment
Share on other sites

Well, If you can figure out stuff like that then you should have no issues making a pretty nice map and figuring everything out with the editor.

 

Sure, simple shapes are easier, but you can do a lot with DR, so figuring out tougher stuff is good.

 

--------

With the stairs, just rotate them close, and hit ctrl-G. that'll snap them to the grid which is the most important thing. Especially if left as worldspawn.

Or hit V to use the vert tool to shape them. (same thing, you can select one vert and ctrl-G to snap it to grid, but not whole brush)

 

Players will never notice if the brush is off by a tiny few grid lines, but they will notice light bleeding through tiny gaps.

 

-----

 

If you are going to allow the player outside you can leave it. It shouldn't effect performance too much to have the entire pillars rendering on either side of the wall.

The benefit is it's a bit easier/quicker and also takes fewer brushes entities (func_staticed). There is a limit of entities you can use and right now around 4000 seems to be it.

 

The main bottle neck with the engine is shadow casting tris. Every light that hits a tri casts a shadow, so you'll see a bigger hit with 6 lights on one tri than 1 light on 6 tris. And not 6x as much but probably 12x the hit. So don't worry about number of tris seen as much as how many lights are hitting them.

 

That includes the full radius of the light. So if you have a world ambient (hits all tris oonce), 3 torches close to each other inside, and 3 street lamps right outside the wall most of the tris in that stairway will probably be hit 7 times. (OUCH!!!).

So just be careful of that. 3-4 isn't bad. 5 starts to hit pretty good, 6 + can tank FPS.

But you can have 60,000 + tris in view no problem otherwise.

 

You can type

r_showlightcount 1

 

in the console, all tris that are white are being hit by 6 or more lights. bright purple is 5. Those are the areas that need lighting work.

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

    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 2 replies
    • 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
×
×
  • Create New...