Game Development Community

Detail verses Structual Brushes

by John Hameier · in Constructor · 03/03/2009 (12:14 am) · 27 replies

Anybody have a straight forward rule for when to use detail brushes and when to use Stuctual? I read pretty much all the documentation in Constructor but there are their any hard fast rule for when and when not to use detail brushes.

Page «Previous 1 2
#1
03/03/2009 (1:17 am)
If the brush have more then 8 face that touch other brush, use detail.
#2
03/03/2009 (7:49 am)
Use structual brushes for things like walls, floors, ceilings - things that define the structure of the zones. Otherwise make them detail.
#3
03/03/2009 (8:21 am)
Just a note that detail brushes don't cast shadows on to other things, which can look odd if you have large overhanging ledges (which is how I do guttering on buildings). Also detail brushes mess with player lighting if the player/AI is standing on them.

To be honest I use structural for everything (but I don't make window frames or little details - I leave all that to textures), and I try and make my designs as BSP friendly as possible to limit extra BSP cuts, though it still happens in a few places.

Try a -insert favoured search engine here- search on how to make a good BSP.
#4
03/03/2009 (9:17 am)
Thanks guys. That was pretty much my line of thought. One thing that I noticed when building a map, I have a roadway & some buildings (roadway is built & textured -road surface, curbing & sidewalks). Pretty big I guess in terms of faces (about 700). I added some buildings (about 8 or 10 & just textured with a color for now). I noticed that when I flip either the buildings or road surface to detailed brushes, I get smooth game play. When I have both set to structural brushes or Detail Brushes I get kind of a lag (granted I am testing with a low grade laptop - but I figure if I can get it to run fairly smooth on it (Dell running @ 1.6GB with 2GB memory)then I would be fine when running on most desktops.

I guess my next question would be: I want to make the all of the buildings so you can enter them, walk multiple floors and cross from building to building. I am assuming that once I start that process that is going to really slow things down. Do I just make the building static and use a portal to load a separte map altogether or what. Not sure how to proceed at this point. Any suggestions?
#5
03/03/2009 (1:06 pm)
structural brushes are used to designate zoning and portaling for interiors. Detail brushes just look nice and collide. Anything that will be used for zoning, like Jaimi said, should be structural. These will split any other structural brush they contact with in order to create zones. Detail brushes should be everything else.
#6
03/03/2009 (1:22 pm)
i thought if you had two intersecting detail brushes they get split as well. no ? that would be good to know!
#7
03/03/2009 (1:36 pm)
... I didn't think detail brushes get split at all ....
#8
03/03/2009 (2:03 pm)
steve, you're absolutely right! thanks!
here are some quick tests i did exporting from constructor as "legacy dif".
you can also see that detail brushes clearly cast shadows.
elenzil.com/gg/images/structuralAndDetailBrushes_normal.jpgelenzil.com/gg/images/structuralAndDetailBrushes_wire.jpgelenzil.com/gg/images/structuralAndDetailBrushes_tristrips.jpg
edit: now w/ proper URLs
#9
03/03/2009 (2:09 pm)
i think possibly 3DWorldStudio would split detail brushes when they intersected each other.
#10
03/03/2009 (2:24 pm)
Detail brushes do not get split, but they do cast shadows. for the most part, there is no need to make something a structual brush unless you are using portals and zones, and only then if they define the structure.
#11
03/03/2009 (3:04 pm)
@Jaimi
Using map2dif_plus_tgea exporter I found that all my guttering (detail bushes) didn't cast shadows down the wall face that they were on (with the sun high in sky). Turning my guttering brushes to structural meant they did cast shadows on the wall.

Also, I never allow brushes to intersect. They cut anyway by placing the edge of planes next to each other.


EDIT: Aha! After a quick test ... Detail brushes don't cast shadows if there isn't lighting info (light_geometry_scale) applied in the worldspawn of the map file! I'd deleted all the worldspawn info after having troubles with editing it earlier.
#12
03/03/2009 (4:00 pm)
That is very interesting. So using my example the road surface should always be detail, the main stucture of the builings (outside walls, floors and roof - if you are to climb on) should be stuctural brushes and interior of the building (interior walls) should be either detail brushes or imported DTS shaps. Would that be a correct summary?

I know you are supposed to use portals on exterior doorways and windows. Would there be a reason within the same building to use a portal to separte parts of the builings?
#13
03/03/2009 (4:27 pm)
John,
it's still beneficial to add zones (and probably portals) inside the building. zones improve rendering performance. the basic idea is this:
when the viewpoint is inside a zone which is totally sealed, then the engine knows there's no way anything outside the zone is visible, so it only needs to render stuff in the zone. portals allow you to make windows & doors in the walls of zones, and the logic becomes a little more complicated but the idea is the same: only render the zones you need to.
so creating zones within a building can be good too.

you probably want to reserve DTS shapes for stuff like furniture and items,
and keep all the walls of the building as part of the DIF.
#14
03/03/2009 (5:31 pm)
So, does my previous explanation win? :p

You would want to make anything the player will be running in/around that isn't tiny and very detailed (and not moving) an interior. They are made for handling collisions and rendering/working like that. With zoning are much more efficient for both rendering objects inside them and having objects move in/out.

When an interior zones stuff, it needs an air-tight area, the only gaps in brushes can be portal brushes (technically these aren't gaps). Detail brushes don't actually count towards brushes as far as zoning goes. Structural brushes will split any brushes they meet faces with on the border, so they can create it's own zone with that air-tight area (and not have 1 floor brush make up 2 zoned rooms, for example. It'd be a floor, but split into 2 or more brushes). If a brush doesn't complete this air-tightness, or there will be no sealing of the sort, do not make it structural, as it will still split any other brushes it contacts, but for no end purpose.

Picture it like this, when designing an interior, will it have enclosed areas you can zone off? No? No detail brushes. Otherwise, all the exterior walls/structure that would separate that zoned area from another zone/the outside world should be structural. Need a door/window? Create a gap in the structural brushes and place a portal brush there, make sure it's a rectangular prism, as it can glitch with other convex shapes (It may work with other shapes, but at the same time it most likely won't).

If you need pieces that would not separate it completely from the outside world/other zone, make those a detail brush. For example, a courtyard area outside of a real building (real building = structural, courtyard pieces are detail), or maybe a room in a building with a hole in the ceiling that you would not be portaling (I have no idea why you would not be portaling it, but say you aren't, no need to make it structural). If you don't know whether a brush should be detail or structural because it is being used for both purposes, make it structural.

Than once designing the interior of that building, when creating walls, stairs, etc... consider whether or not those walls will make up another zoned area, e.g. zoning off multiple rooms from each-other, than make them structural. Otherwise if they are details which do not attribute to zoning, or will not need to be zoning. another example: Maybe you want a 2-room house to be only 1 zone, than the interior walls of the house would be details, but the exterior walls which separate it from the outside would be structural.

Exception to the previous paragraph, if a wall that would make up a detail area also makes up a zoned area, make it structural. For example: the courtyard mentioned earlier, if it were attached to said building, any of the courtyard walls that are actually building walls would be structural. Any courtyard walls not making up the building (or details such as columns, overhangs, that won't be responsible for zoning).

And correct me if I'm wrong, but don't objects who are in a different zone than the player get ghosted on the server and not need to update via the network to that player's client?
#15
03/03/2009 (5:43 pm)
"ghosting" refers to the server sending a copy or "ghost" of a server-side object down to a particular client. all player objects instantiated on a client are "ghosts", and the ones on the server are not.

so yes, you are correct: objects which are in a zone that is not visible to a given client will not be ghosted to that client. this saves network bandwidth and is another good reason to design your zones well.



#16
03/03/2009 (5:45 pm)
Quote:So, does my previous explanation win? :p
Yep, pretty much!

I stand by my assertion that if the player is going to stand on it, then it should be structural because of a player lighting issue when standing on detail brushes.
#17
03/03/2009 (6:00 pm)
Ah, thanks Orion, I always thought the term ghost meant the reverse of that, that they only existed on the server.
#18
03/03/2009 (6:07 pm)
yeah, it took me a long time to figure out as well. the TDN page on ghosting sort of assumes you already know a bunch of stuff about ghosting.
#19
03/04/2009 (4:04 pm)
Thanks guys. This info is very helpful. I learned quite a bit. Sometimes it is easier to grasp something you already kindof understand when you get examples like "if you do this...this is what will happen" (Thanks MORROCK).

So let me ask this...

I notice that when you create a brush and turn it into a portal Constructor automaticly textures this with the NULL texture. I would assume that you can not make a portal just but manually texturing a structural brush with the NULL texture? I ask because in some cases I began building using the NULL texture for all my faces and then went back and began texturing only the faces that would be seen so that unneccessary faces would not get rendered.

Am I making an over assumption that it would see all the null textures as portals? And do I need to go to that extent and that Constuctor will eliminate any surface that is not needed when exporting?
#20
03/04/2009 (4:13 pm)
i believe if you turn on "RHS" when exporting, constructor will automatically remove hidden surfaces. and no, putting the NULL texture on a surface does not make a portal.
Page «Previous 1 2