angled roofs for buildings with interoirs?

  • If you're asking a question make sure to set the thread type to be a question!

Ezekel

L11: Posh Member
Dec 16, 2008
818
245
what's the best way to do angled roofs when there's an interoir area that can be accessed?

just a regular brush at an angle or func_detail (at an angle) + an areaportal beneath it that's horizontal?
 

Rexy

The Kwisatz Haderach
aa
Dec 22, 2008
1,798
2,533
Can you show a visual example? I'm more of a visual learner.

But you can't include area_portals and func_detail together and expect it to seal entities. You'll just leak. So I'd go for using world brushes and have the room/roof any shape you want, and seal the doorway with an areaportal.
 

TotalMark

L6: Sharp Member
Feb 13, 2008
331
78
The little shops in my map are enclosed in boxes made of hint brushes. The doorways are thus areaportal-ed and are world brushes.

redbreadshedworld.jpg

redbreadshed.jpg
 

Spike

L10: Glamorous Member
Feb 13, 2008
716
82
I would func_detail the whole house, will give you better performance than an areaportal and in all VIS in general
 

Sgt Frag

L14: Epic Member
May 20, 2008
1,443
710
You can use a func_detail for the angles AND an area portal under them just fine. Of course the area portal just needs to be touching the walls below the func_detail.

On a small house like Total_Mark's though it wouldn't do much good as you could probably see all outside vis-leafs from anywhere inside it.

I also agree TotalMark, that you should just func_detail the whole thing. Cut down on visleafs and area portals.
But I'm curious what you are trying to achieve with the blue brushes. If those are hints you are only adding at least 8 polys, 4 + leafs which all takes more to compute then if the house was just a func_detail.
It's always hard to say performance-wise by a screenshot alone but I don't think any of that is helping more than it's hurting.

Also, you should bring those corners together. Each of those indents in each corner is making a new visleaf. Each of which most likely extends half way across the courtyard knowing how Hammer optimizes. And adding the hints there doesn't fix it, it just cuts them in half and makes more leafs.
Plus you'll cut down on poly count if you bring the corners together. Even if you have nodraw the floor is being split into more polys than needed because of that.
 
Last edited:

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
Why not just having a solid roof. visleafs can easily be made triangle shaped. Just instead of rotating a brush use the vertex tool to make the angled roof. Its not hard at all and works best for optimizing also. The cost is a longer compile time but even when you have alot of those roofs that are made well it doesnt go extremely long (it would add about 1-3 minutes on a average sized 1 stage map - 3 stage maps get a bigger impact usualy)
 

Ezekel

L11: Posh Member
Dec 16, 2008
818
245
well i'd normally make it a func_detail building or have a flat inside roof and func detail the angled roof.
in this case, however, the building in question contains a spawn room, so i don't think func_detailing it would be apropriate.

angled world brushes mess up visleafs so i don't really want to do that, but the angle of the roof means that at one end of the spawn room you'll be above the areaportal used to seal the room.

the roof is made using vertex tool yes.
alias you think i should just make it triangular visleafs above/below the roof? using hints to define the shape of the visleafs in advance?
 

TotalMark

L6: Sharp Member
Feb 13, 2008
331
78
You can use a func_detail for the angles AND an area portal under them just fine. Of course the area portal just needs to be touching the walls below the func_detail.

On a small house like Total_Mark's though it wouldn't do much good as you could probably see all outside vis-leafs from anywhere inside it.

I also agree TotalMark, that you should just func_detail the whole thing. Cut down on visleafs and area portals.
But I'm curious what you are trying to achieve with the blue brushes. If those are hints you are only adding at least 8 polys, 4 + leafs which all takes more to compute then if the house was just a func_detail.
It's always hard to say performance-wise by a screenshot alone but I don't think any of that is helping more than it's hurting.

Also, you should bring those corners together. Each of those indents in each corner is making a new visleaf. Each of which most likely extends half way across the courtyard knowing how Hammer optimizes. And adding the hints there doesn't fix it, it just cuts them in half and makes more leafs.
Plus you'll cut down on poly count if you bring the corners together. Even if you have nodraw the floor is being split into more polys than needed because of that.

cp_villa_a20061.jpg

cp_villa_a20062.jpg


If it were detail all those models would be drawn, I wouldn't be able to portal it off.
 

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
the roof is made using vertex tool yes.
alias you think i should just make it triangular visleafs above/below the roof? using hints to define the shape of the visleafs in advance?
Hints usualy dont even matter alot for angled roofs unless ingame the optimizing failed. But if you want to be 100% sure that it gets done well only use hints for the roof itself and use only 1 brush for it (if you use more it usualy makes the compile take longer). The most important thing is to have everything done smooth without any gaps. As long as you keep it to nice brushwork you wont get any problems from it (where vertex usualy keeps the brushwork nice unlike a simple rotated brush).
 

Sgt Frag

L14: Epic Member
May 20, 2008
1,443
710
If it were detail all those models would be drawn, I wouldn't be able to portal it off.

True. But you could still detail the entire top of the roof. Put an area_portal in the top and those models would still be culled when you can't see through the door or roof portals.
But that's one of those things you just have to do and look at in-game to see which has a bigger performance advantage. It's possible that having a solid roof in that instance is better, but it's worth checking out the alternative imo.

It would cut down on alot of weird vis-leafs surrounding the top of the angled roof.

But still, the hints around the house don't make sense.

Just as a pointer on hints too. Instead of using a cube use a pyramid. take the verts on the skip side of hint brush and drag them together to weld them for the point of the pyramid (on its side). Then the hint will only make one cut.
If you use a cube it makes 2 cuts (the skip side doesn't get drawn but still cuts terrain).
 

TotalMark

L6: Sharp Member
Feb 13, 2008
331
78
Maybe I should've said something, but I've converted the shops into func_detail and occluded the walls and roof.