Q3A - Noob-ish map questions

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
NjR_Shrapnel
Posts: 18
Joined: Fri Sep 23, 2005 6:36 pm

Q3A - Noob-ish map questions

Post by NjR_Shrapnel »

Hey, all!

OK, so I'm getting into Q3 mapping a little late. I've wanted to try it for a while but I use a Mac and I just found out about the Radiant on Mac tools. :D

Havin' a blast with my first map, but I got a million questions. I've read a lot on the web and a lot here in the archives but am still confused about a few things. Specifically...


A) I don't grok the caulk. :icon31:
B) I got to get my tri count down.

So, here 'goes...

1) Making non-structural brushes "detail" will make the .bsp file smaller but has no effect on number of tris drawn or fps. Is that correct??

2) I've seen suggestions to make all your structures out of caulk then make all the textures detail. If I understand this right, you're doubling the effort to make the map. Why is this better than just defining structural vs. detail brushes.

3) I've also read to caulk behind patches. What does this mean?? Is it because a patch seems to be a set of one-sided tris? Specifically, if I make an Invert Endcap (for, say the path up a brush with a bounce pad in front), where, exactly do I make a caulk brush?

4) Will caulk texture lower my triangles? For example, if I need a wall and make brush for it, I get a 6-sided (12 tri) brush. If I caulk the unseen 5 of those 6 walls, does my 12 tri wall now drop down to 2? If so, I got a lot of caulking to do :D

5) What is an acceptible number of tris these days? And what should the geometry setting be when you check r_speeds? I'd say comps have gotten a little faster since Q3 came out. Do I still need to hover around 6000 tris or less? I saw one site said keep it below 20,000. But that seems high to me. I got a section that's topping 17,000 (see photo, if you're curious - over 25,000 if I turn geometry to high). Do I have to make my ceilings and beams flat to get rid of tris? (r_nocurves in the same spot gets me about 1/3 fewer tris). Or will a little caulk go a long way here? And, that pool of green ooze seems to be taking up a lot more tris than I thought.... Not sure what to do about that.

Of course, my new quad G5 has no problem at all keeping a solid 125fps on it, but my very old G4 slows a bit - but no more than a couple other maps (ctf1+ comes to mind, but its around 10,000 tris - 17,000 with geometry set to high).

Here's a couple photos... I think I've done some fun, different things with the gameplay. Would hate to end up with a map no one can play....

http://www.teamnachtjager.net/screensho ... map001.jpg
http://www.teamnachtjager.net/screensho ... map003.jpg

Thanks for looking at my long-winded post...

- Shrapnel
Johnny Law
Posts: 179
Joined: Tue Nov 16, 1999 8:00 am

Post by Johnny Law »

There's a lot of tutorials about these things. Unfortunately, I haven't been keeping up-to-date on where they are. :) Someone else will probably be along to post links. I will make a few comments:

The faces of structural (non-detail) brushes will determine planes where your map is "split" into nodes for visibility calculations. Generally, if a player is standing inside the volume of node A, and at map-compile-time it was determine that node B is not visible from any point in node A, then the engine will not try to draw any triangles that are in node B.

The reason that you want to make brushes detail is to avoid introducing unnecessary splits into your map. This will both speed up your compiles and also help your map run better (because there is less visibility info to deal with). Granted this is not as much of a concern these days with computers generally being much heftier than they need to be for running Q3A, but it's still good practice. Having a simpler visibility structure also helps you reason about visibility in your map, and plan out how to fix/tweak vis problems as necessary.

So generally people make a "hull" out of structural caulk brushes, which follows the vis-blocking outlines of the map and doesn't have a real complicated shape. Then they layer finicky-shaped detail brushes on top of this. The detail brushes get textured on their visible faces (non-visible faces of detail brushes should still be caulked as well). It's quite possible for the faces of structural brushes to be textured as well, of course, if there are areas where the "hull" matches up precisely with your desired visible surfaces.

If there is anywhere that you want to introduce a split but there is no structural brush with a face on that plane, you can place a structural brush textured with the "hint" texture, which is not visible or tangible to the player but will force a vis split.

Oops, my setup is done for some tests here at work ... need to get back to the grindstone. More later if no one beats me to it.
Johnny Law
Posts: 179
Joined: Tue Nov 16, 1999 8:00 am

Post by Johnny Law »

A little more:

Why caulk?

The compiler removes unseeable surfaces from the map at compile time, so if a surface is unseeable it doesn't matter what you texture it. However, the bright pink caulk helps to remind you (as you are mapping) which surfaces are seen and which aren't.

And the "unseeable" part of the above factoid is important, and a little trickier than it might appear. If a surface is behind a detail brush or a patch mesh, it is "seeable". Therefore you usually want to caulk it in order to make sure that the surface doesn't get drawn. Two reasons for this:

- Z-fighting avoidance. If the textured surface of the obscuring detail brush or patch mesh approaches close to the surface behind it, then at certain distances the renderer will have trouble figuring out which of those surfaces is "in front", leading to weird visuals. If you caulk the surface behind the detail brush or patch mesh, this problem goes away.

- Less work for the game's renderer at runtime (sometimes). You're reducing overdraw by caulking the surface, but often you have to split up a surface in order to caulk ONLY the part behind the detail brush or patch mesh. By doing this you are introducing more triangles to be rendered. So for small areas this is not likely to be a performance win.

But as I said above, with today's systems running Q3A you have extra rendering oomph to play around with, so that performance issue is not much of a worry. If you think the surface behind a detail brush or patch mesh could cause Z-fighting, then caulk it.
d3mol!t!on
Posts: 284
Joined: Thu Feb 16, 2006 3:48 pm

Post by d3mol!t!on »

1) If I recall correctly from my days of Quake 3 Arena level design, detail brushes do not vis block. This means that they will not block any visuals drawn behind them. Structural brushes, on the other hand, will, and so can control the visuals if used carefully. Detail brushes will save file size, and make the vis stage of compiling shorter.

2) A method often practised is the caulk hull, IIRC, and also IIRC (sorry, haven't done it for a long time) this involves you making brushes that would have textured faces and setting them all to detail, then put structural caulk brushes around them and between areas (of course, always outside your detail brushes, else they would show up). This saves a lot of compile time for vis (smaller, finely created brushes will never block vis, so there is no point in making them structural), and then you can control how your visuals are blocked to a certain extent (although there is lots more vis blocking and other related things required by other methods, such as hinting and cluster portals (which I don't know enough about to be of help)).

3) You should notice that patches only have one textured side. This will be facing the inside of the map, because you're going to see it. The other side will require caulk around it, as patches are never structural, and the map will leak if they have a gap behind them.

4) Caulk should be used on pretty much all brush faces that do not need texturing. Your example is correct (the way I am reading it anyway), so if only one face of the six faced brush will be shown in game, you should only texture that and apply caulk to all the other 5 faces.

5) I can't help you much with that, but what I can say is that you need to remember there could still be players out there with slower machines, so the lower the better still applies.
Johnny Law
Posts: 179
Joined: Tue Nov 16, 1999 8:00 am

Post by Johnny Law »

OK, I'm going to answer the specific questions now :) using my above posts as background.

For the most part I'm just going to be saying the same things that d3mol!t!on did, in different wording. But maybe that's helpful.


1) It can make the .bsp file smaller, because of less vis info. I don't think that's the primary reason for using detail brushes; hopefully I've covered that above. Proper use of detail/structural brush construction techniques can help reduce tris (through better visibility), although it can also introduce a few tris if you break up surfaces to allow you to caulk behind detail brushes. Correct use of detail vs. structural brushes in construction should help performance by reducing the amount of vis info that the engine has to crank through, and helping you set up a sensible visibility structure that overall reduces the number of triangles to draw.

2) Probably no more for me to say on this topic, except to point out that it may be difficult to go in after your map is "done" and just mark stuff as detail without doing any re-construction, except in the case of wall-mounted decorative brushes here and there. Detail/structural use is something that is best to keep in mind from the beginning of a map's construction. (It depends on how complicated your map is I suppose.)

3) The answer to "where, exactly" is probably already clear, but just in case: for patch meshes you need to caulk behind them, i.e. so that the back of the mesh and the caulk texture are facing each other. You are basically constructing a caulk-textured "container" that your mesh snuggles into. (Any tutorial about patch mesh use will probably have pictures that illuminate this much better than my typings.)

4) Not generally... see my stuff above about unseeable surfaces. It depends on where your detail brushes and patch meshes are.

5) I don't know what the standard is these days, sorry! You can always grab some other maps and check them out.
Johnny Law
Posts: 179
Joined: Tue Nov 16, 1999 8:00 am

Post by Johnny Law »

BTW, as for the green ooze, if it is tesselating into lots and lots of tris you can adjust the shader to make it tesselate more coarsely. For big expanses of finely-tesselated liquids this can help quite a bit with your tri count without noticeably changing the visuals.

This is another thing that I don't remember the exact syntax for, but maybe someone else will (or you can find out yourself by poking around in the shader docs).
NjR_Shrapnel
Posts: 18
Joined: Fri Sep 23, 2005 6:36 pm

Post by NjR_Shrapnel »

Thanks a lot Johnny and d3molition. I really appreciate the info. As I mentioned, I have done some reading and seen some tutorials but I guess it just doesn't get through my thick skull. This helps a lot, though and I've read your posts several times.

So, quick question, let's say I make four walls. At this point there's no difference between using caulk on each of the walls then making the textured brushes "detail" vs. making the four walls with 4 "structure" brushes.

Now, if I drill a square hole in one wall then stick a new brush in it (exactly the size of the hole) that I texture differently, if I had used the caulk/detail scenario earlier, my vis stays the same but with the structure scenario, I've just made extra cuts and complexity to my vis tables/bsp file. Yet, under both scenarios, the tri count stays the same. Is that correct?

Also, does the caulk share the same plane with a detail brush? Can it be exactly the same size/location as the detail brush?

Finally, thanks for the tip about the green ooze. I'll have to find a way to change that shader. Knew a shader could do a lot but I didn't know it could actually add geometry. When I pan my look away from the slime, r_speeds improve by almost 9,000 tris!!

- Shrapnel
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Q3A - Noob-ish map questions

Post by obsidian »

Having not read Johnny or Demo's responses (it's late, forgive me)...
NjR_Shrapnel wrote: A) I don't grok the caulk. :icon31:
B) I got to get my tri count down.
A is in many ways related to B if done correctly. Caulk is a non-drawing solid shader that is used on unseen faces of your brushes. If the player can't see it (backfaces, between brushes, places where the player can't see because it's clipped off, etc.) caulk it. Since its solid, it is very effectively used in relation to vis-portals so you can limit the line of sight, portals and the amount of polygons drawn for each vis area.
NjR_Shrapnel wrote:1) Making non-structural brushes "detail" will make the .bsp file smaller but has no effect on number of tris drawn or fps. Is that correct??
More or less. But the main advantage is that detail brushes will significantly(!) reduce the time it takes to compile your -vis stage. It also makes planning and placement of your hint brushes much easier.
NjR_Shrapnel wrote:2) I've seen suggestions to make all your structures out of caulk then make all the textures detail. If I understand this right, you're doubling the effort to make the map. Why is this better than just defining structural vs. detail brushes.
It has to do with vis and hint optimization. It's a tricky concept and I'll link you to a couple of tutorials that I think will be most beneficial. Detail brushes is usually where you spend most of the time building. Structural caulk elements are just big large blocks that you can drop in a few minutes, so not that much extra time working.
NjR_Shrapnel wrote:3) I've also read to caulk behind patches. What does this mean?? Is it because a patch seems to be a set of one-sided tris? Specifically, if I make an Invert Endcap (for, say the path up a brush with a bounce pad in front), where, exactly do I make a caulk brush?
Sometimes, people often end up with sparklies (small seams between patch polygons) that are easily remedied by using caulk behind them. Also, patches are not vis-blocking structures, so you need to seal them off from the void or from other vis portals areas.
NjR_Shrapnel wrote:4) Will caulk texture lower my triangles? For example, if I need a wall and make brush for it, I get a 6-sided (12 tri) brush. If I caulk the unseen 5 of those 6 walls, does my 12 tri wall now drop down to 2? If so, I got a lot of caulking to do :D
More or less. The compiler is capable of removing some of those faces, but not all. But in general, as mentioned above, caulk does quite a lot for reducing tri counts.
NjR_Shrapnel wrote:5) What is an acceptible number of tris these days? ... And, that pool of green ooze seems to be taking up a lot more tris than I thought....
It's all relative. Tris aren't everything you need to worry about. r_speeds, shaders, overdraw, etc. can all affect fps. More tris may mean that you have to limit the amout of shader effects or vice-versa. People can debate this as much as they want, but at the end of the day, get yourself some beta testers on a wide range of different machines and see what kind of fps they get on a normal config setting.

The green ooze shader has a higher number of tris since it uses q3map_tessSize in the shader. The compiler breaks up the brush into a bunch of smaller triangles for the wave effect.
Q3Map2 Shader Manual wrote:q3map_tessSize amount

This controls the tessellation size (how finely a surface is chopped up in to triangles), in game units, of the surface. This is only applicable to solid brushes, not curves, and is generally only used on surfaces that are flagged with the deformVertexes keyword. Abuse of this can create a huge number of triangles. This happens during Q3Map2 processing, so maps must be reprocessed for changes to take effect. The poorly named tessSize keyword still works but has been deprecated in favour of q3map_tessSize for the sake of consistency.

Design Notes:
It can also be used on tessellating surfaces to make sure that tessellations are large and thus, less costly in terms of triangles created.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

Some of my favorite links from the Archive Sticky thread.

Plan B's take on caulk hull/overdraw/hinting:
http://www.quake3world.com/ubb/Archives ... 22411.html?

Q's Sample Map thread:
http://www.quake3world.com/ubb/Archives ... 20488.html?

My Advanced Portal and Hinting Optimization Tutorial:
http://www.quake3world.com/forum/viewtopic.php?t=3620
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Johnny Law
Posts: 179
Joined: Tue Nov 16, 1999 8:00 am

Post by Johnny Law »

NjR_Shrapnel wrote:So, quick question, let's say I make four walls. At this point there's no difference between using caulk on each of the walls then making the textured brushes "detail" vs. making the four walls with 4 "structure" brushes.
From the phrasing of this I think there may be some confusion. For the use-of-detail scenario, do you mean making the a) wall brushes themselves detail, or b) making the wall brushes structural and then adding detail brushes attached to the visible surfaces of the walls?

Well, in either case, there's no difference in the # of tris for those visible surfaces, and no difference in the visible number of tris for those surfaces if you are standing right among them.

A couple of notes if you mean situation a) above:

- By making the walls detail rather than structural, the compiler will no longer consider them to be visblockers, so if there is more to your map this will probably affect the visibility of various map pieces.

- If those walls are bordering on "the void" then turning them into detail brushes will make your map "leak" (and therefore fail to compile).

If on the other hand you meant situation b), then no problems, since you have structural wall brushes (covered with caulk) backing the detail brushes to block vis and prevent leaks.

NjR_Shrapnel wrote:Now, if I drill a square hole in one wall then stick a new brush in it (exactly the size of the hole) that I texture differently, if I had used the caulk/detail scenario earlier, my vis stays the same but with the structure scenario, I've just made extra cuts and complexity to my vis tables/bsp file. Yet, under both scenarios, the tri count stays the same. Is that correct?
I'm beginning to think we need pictures. :) But it sounds to me like you have a grip on it.
NjR_Shrapnel wrote:Also, does the caulk share the same plane with a detail brush? Can it be exactly the same size/location as the detail brush?
Hmm. I'm actually not 100% sure about this. I know from practice that you can have a flat patch mesh completely coplanar with a caulked structural surface, within the bounds of that surface, and the patch mesh will show up just fine in-game (it'll look messy in the editor).

I haven't tried that with a detail brush surface. With detail brushes I've always had only the back face of the detail brush touching the caulked structural surface (and sometimes not even that). I would guess that, as with a patch mesh, the detail surface would be visible, but it's something you'd have to test if you really want to do that. Seems like any situation like that would be better served with using a patch mesh though.
Johnny Law
Posts: 179
Joined: Tue Nov 16, 1999 8:00 am

Post by Johnny Law »

obsidian wrote:Some of my favorite links from the Archive Sticky thread.
Hoo... most excellent.

Edit: Something I happened to notice in those links... in this thread, I've kinda been talking about laying hull first then adding detail brushes. Some of those links on the other hand talk about making detail brushes then putting a hull around them. I guess it's actually an iterative process, especially for me since I tend to "sketch" layouts in the map editor itself (all structural), then make detailed brushwork and adjust the hull to fit it properly. Do whatever works for your process; as long as you understand how visibility works and what detail/structural does, it's all good.
NjR_Shrapnel
Posts: 18
Joined: Fri Sep 23, 2005 6:36 pm

Post by NjR_Shrapnel »

Hey all!

Just a thanks again for all the info. I'll read over those tutorials in depth, so thanks.

I went thru and just quickly changed a bunch of detail brushes to "detail" and also found how to edit the slime shader to reduce the tessalation. That was a huge help! So, in a quick evening I've cut my number of portals by half and cut about 5,000 tris out of my r_speeds. :D

I'll post another update (and maybe a question or two for clarification) after I read the links again and do some more work on the map over the weekend. But I'm thinking if I redo my ceiling patches now using meshes of less detail, I might be in the realm of pretty good fps on most machines and can then move forward on finishing this sucker.

Y'all rock! Thanks!

- Shrapnel
Post Reply