Stopping Vvis from cutting up leaves?

Stopping Vvis from cutting up leaves?

Re: Stopping Vvis from cutting up leaves? Posted by midkay on Mon Aug 7th 2006 at 5:17am
midkay
398 posts
Posted 2006-08-07 5:17am
midkay
member
398 posts 120 snarkmarks Registered: Apr 15th 2005 Location: United States
Hey all.

So I'm starting to do a lot of Vvis optimization on my map. The "problem" I have is that for example there are a lot of leaves in one area for a reason I don't know and I'd like to just surround that area with a hint brush to have one big leaf there to avoid all of the individual tiny ones. The problem is that Vvis half-ignores this and although it does split any leaves along the hint brush's boundary, it also splits up the hint brush internally.

Anyone know how to tell Vvis that "I want one leaf here and don't touch it"? I know it's an engine limitation that leaves can't be larger than 1024 units in any direction but even so, I don't want it to try and break them up if I know exactly how I want the leaves laid out in one area. Do I just need to try and manipulate it into doing what I want or does anyone know how to tell it exactly what to do?

Thanks in advance.
-- midkay
Re: Stopping Vvis from cutting up leaves? Posted by Dark_Kilauea on Mon Aug 7th 2006 at 9:35am
Dark_Kilauea
629 posts
Posted 2006-08-07 9:35am
629 posts 123 snarkmarks Registered: Apr 15th 2005 Occupation: Fast Food Location: USA
Reread how hint brushes work, it's sounds like you are using them completely wrong
Dark_Kilauea
DVS Administration
http://www.dvstudio-production.com/
Re: Stopping Vvis from cutting up leaves? Posted by reaper47 on Mon Aug 7th 2006 at 10:38am
reaper47
2827 posts
Posted 2006-08-07 10:38am
reaper47
member
2827 posts 1921 snarkmarks Registered: Feb 16th 2005 Location: Austria
"split any leaves along the hint brush's boundary"

That's exactly what HINT brushes are supposed to do. Nothing more. Every polygon with the hint texture on it becomes the border of a new vis leaf. You can "guide" the vis process but it still cuts new leafs where necessary. They have to be concave I think like brushes in hammer and they have to cover the whole level.

The only way you can make vis leafs ignore brush geometry completely is by making it func_detail.
Re: Stopping Vvis from cutting up leaves? Posted by Stadric on Mon Aug 7th 2006 at 4:30pm
Stadric
848 posts
Posted 2006-08-07 4:30pm
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
If you want a full and complete description of all optimization methods, and how they work, check out zombie's optimizing page:
http://www.student.kun.nl/rvanhoorn/Optimization.htm

Hints probably isn't the best route to take right now, I'd just go with func_details.

For the record, brushes can be concave, when you create intercepting brushes, but that means they can look into themselves, and render themselves twice when you're in them.
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: Stopping Vvis from cutting up leaves? Posted by midkay on Mon Aug 7th 2006 at 7:32pm
midkay
398 posts
Posted 2006-08-07 7:32pm
midkay
member
398 posts 120 snarkmarks Registered: Apr 15th 2005 Location: United States
Thanks for your responses;

So there's no way to stop Vvis from doing its own stuff when you don't want it to split leaves in a certain area? I mean, it's not doing it around specific geometry or anything; there's nothing to func_detail. Just kinda randomly cutting them up in some places for no reason. No way to avoid this?
-- midkay
Re: Stopping Vvis from cutting up leaves? Posted by Dark_Kilauea on Mon Aug 7th 2006 at 9:52pm
Dark_Kilauea
629 posts
Posted 2006-08-07 9:52pm
629 posts 123 snarkmarks Registered: Apr 15th 2005 Occupation: Fast Food Location: USA
I'd have to see the map before I could suggest how to use the hint brushes to optimise the best.

Sometimes, there just isn't a way to get perfect splits either.
Dark_Kilauea
DVS Administration
http://www.dvstudio-production.com/
Re: Stopping Vvis from cutting up leaves? Posted by reaper47 on Wed Aug 9th 2006 at 4:55pm
reaper47
2827 posts
Posted 2006-08-09 4:55pm
reaper47
member
2827 posts 1921 snarkmarks Registered: Feb 16th 2005 Location: Austria
This level of leaf adjustment isn't what makes your map run any faster. I wouldn't worry too much. It's only important that there are enough leaves between two areas that are absolutely invisible to each other. If vvis splits up the leaves a little more I wouldn't worry that much.
Re: Stopping Vvis from cutting up leaves? Posted by midkay on Tue Aug 29th 2006 at 10:22am
midkay
398 posts
Posted 2006-08-29 10:22am
midkay
member
398 posts 120 snarkmarks Registered: Apr 15th 2005 Location: United States
Okay, so I decided to take some pictures after having another glview-look at the map. Here's what I was talking about when I posted this thread.

Hotel building in Hammer, world geometry + Hintbrushes only (no props, func_detail etc).
Hotel building in glview.
Leaf splitting overlaid onto world geometry for comparison.

I just don't get it, I mean.. I don't really "mind" it but it's so bizarre. There's no reason for it, for example what's with that diagonally-cut leaf? Absolutely no reason to have it.

Here's another example that's a bit different. The simple structure of the roof exit.

Structure in Hammer (world only, again).
Structure in glview.
Leaf splitting overlaid onto world geometry.

It's quite a simple box - literally - yet vvis has completely mutilated the leaves atop and around it. Again I see no reason for this, no geometry nearby causes it, the hintbrush is exactly lined up with the top of the roof...

I doubt this is "fixable" but does anybody have any thoughts on this?
-- midkay
Re: Stopping Vvis from cutting up leaves? Posted by Crono on Tue Aug 29th 2006 at 3:35pm
Crono
6628 posts
Posted 2006-08-29 3:35pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Are you sure the hint brush isn't making things worse?

Look into a func_areaportal and func_areaportalwindow

Seriously, go through that optimization guide and follow everything, everywhere, and you will find things that can be optimized.

It appears that there is a "leak" between the buildings and the outside and/or it's from the doorways you've already made.

Check for small "leaks" you don't want in the building by 'removing' (just make them hidden) all the outside geometry in the map. I can't personally think of another way to find small unwanted leaks that don't break the hull ... besides actually breaking the hull. Make sure to put something in the doorways, of course.

There really isn't anything to "understand" about what you're seeing ... the inside of the building is being seen from the outside ... fix it. There are in-depth guides that tell you how vvis cuts leafs up so you can design around it, I suggest looking at that as well. (They just happen to be on that optimization page too!)
Blame it on Microsoft, God does.
Re: Stopping Vvis from cutting up leaves? Posted by Dark_Kilauea on Tue Aug 29th 2006 at 9:24pm
Dark_Kilauea
629 posts
Posted 2006-08-29 9:24pm
629 posts 123 snarkmarks Registered: Apr 15th 2005 Occupation: Fast Food Location: USA
You are using hint brushes completely wrong. They should never hug world geometry. Read up on hint brushes on zombie@computer's page.
Dark_Kilauea
DVS Administration
http://www.dvstudio-production.com/
Re: Stopping Vvis from cutting up leaves? Posted by omegaslayer on Wed Aug 30th 2006 at 5:41am
omegaslayer
2481 posts
Posted 2006-08-30 5:41am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
ummm I don't know abotu glview being entirely acurate. For a better
idea of what they look like, hop in game and type "mat_leafvis 1"
without the quotes and you can actually see what vis leaf your
currently in.

And:

http://www.student.kun.nl/rvanhoorn/Optimization.htm

really explains how hint brushes and vis works.
Posting And You
Re: Stopping Vvis from cutting up leaves? Posted by Crono on Wed Aug 30th 2006 at 7:08am
Crono
6628 posts
Posted 2006-08-30 7:08am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
This has now been linked several times ... but I'm going to link it one more time for emphasis.

GO HERE and read up
Blame it on Microsoft, God does.
Re: Stopping Vvis from cutting up leaves? Posted by midkay on Wed Aug 30th 2006 at 7:19am
midkay
398 posts
Posted 2006-08-30 7:19am
midkay
member
398 posts 120 snarkmarks Registered: Apr 15th 2005 Location: United States
Crono:
A "leak"? There are no leaks in this map...? I don't understand what you mean. Everything's aligned and clean brushwork and 100% leakfree.

Dark:
What do you mean, using them wrong? Why should they never hug world geometry? http://www.student.kun.nl/rvanhoorn/Optimization.htm#chapter4 shows them hugging world geometry plenty. Picture. I agree the roof isn't the prettiest solution and I'll be working on it soon, but that's beside the point... just look at the hotel one, ignore the hints on the roof - they don't interfere with the simple box atop the roof - and can you tell me why this happens? I can disable them all if you want and I'm quite sure it will look very much the same...

omegaslayer: Huh? glview is perfectly accurate and gives the same exact results as ingame.

Crono: I'll read it again, sure.. I highly doubt there'll be anything left there to do, though.
-- midkay
Re: Stopping Vvis from cutting up leaves? Posted by Crono on Wed Aug 30th 2006 at 7:26am
Crono
6628 posts
Posted 2006-08-30 7:26am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
I said leak in the building ... not the map. You can put the building (as in copy and paste it into a new map) into a void to see if there are any leaks besides the door ways. It was a suggestion to see if there's some parts of the inside being drawn that can be avoided (without using a func_areaportal ... which you should be using in those doorways.)

If you follow the optimization guide, you should be fine, but you should be aware that hint brushes are a last resort. As in: THE last resort. The next step if using them doesn't work out is to redesign and build the area. You should try your other options before resorting to hint brushes.
Blame it on Microsoft, God does.
Re: Stopping Vvis from cutting up leaves? Posted by midkay on Wed Aug 30th 2006 at 7:39am
midkay
398 posts
Posted 2006-08-30 7:39am
midkay
member
398 posts 120 snarkmarks Registered: Apr 15th 2005 Location: United States
I don't see how there could be a leak "in the building". Check the Hammer shot, I've done Select All in it, and you can see for yourself that the leaves are created across and around and through flat brushes. Keep in mind that the bottom nodraw texture does not extend under the building; it stops at the edges to vacuum-seal the building's insides.

The roof hintbrushing is, as I've already said, certainly not very smart, but why do you say they must be used as [bold italic huge text] the last resort? Why not use them casually to make sure things are divided smartly, like doorways and stuff? What's the problem with them?

Thanks.
-- midkay
Re: Stopping Vvis from cutting up leaves? Posted by ReNo on Wed Aug 30th 2006 at 9:40am
ReNo
5457 posts
Posted 2006-08-30 9:40am
ReNo
member
5457 posts 1991 snarkmarks Registered: Aug 22nd 2001 Occupation: Level Designer Location: Scotland
I use hint brushes like a bitch - far more often than area portals (which are damn useful, but are effectively a more powerful version of hints that come with an overhead-causing clipping trait). There's no harm in using hints frequently as, if you know what you are doing, you can almost always ensure you create a much neater BSP than VBSP would manage. Even though, at a basic level, they are used to create additional cuts in the BSP tree, I tend to use them to simplify it - adding a cut manually can save some horrible automatic cuts. For example, pretty much every window and doorway should have a hint covering each open side of it (but ensure the top, bottom and side faces have skip textures or sometimes they cause cuts that extend outwith the door boundaries!). By ensuring you have a clean BSP tree with neat and logical leafs, you can keep VVIS compile times down to an absolute minimum. My levels rarely take more than 10 seconds (but admittedly, rarely have wide open spaces) on VVIS because there are very few unnecessary leafs to complicate the calculations.

Anyway, this doesn't really help you midk, I just felt it might help some of the others who don't use hint brushes in this way. I'm not sure why you are getting such awkward cuts to be honest. Do remember though that it isn't that a leaf can't be bigger than 1024 in any direction, its that there will automatically be cuts at every 1024 units - thats every 1024 units in world space regardless of where you have hint brushes or whatever your leaf layout is. This can often result in some cuts in locations you would rather not have them. The unavoidable cut that often annoys me is the one that goes right down the centre of the world space grid - normally thats slap bang in the middle of a room or corridor for me :sad:

I can try and take a look in hammer if you like and see if I notice anything amiss. Email me it if you want me to...

reno84@gmail.com
[img]http://card.mygamercard.net/sig/Default/reno84.png[/img]
Designer @ Haiku Interactive | ReNo-vation.net
Re: Stopping Vvis from cutting up leaves? Posted by midkay on Wed Aug 30th 2006 at 10:13am
midkay
398 posts
Posted 2006-08-30 10:13am
midkay
member
398 posts 120 snarkmarks Registered: Apr 15th 2005 Location: United States
Thanks ReNo, actually that first part did help me, about having skip textures around the sides touching doorways - I've just always used a fully-covered brush with a Hint texture for that purpose (since I thought the hints around the edges would act like guidelines to "create this exact box of a leaf here"). I'll go and fix that wherever it happens.

Same here about that one that goes along the center of the grid.. I hate it. The center happens to be right along some crucial leaf-points (along some interior hallways and stuff).

I'd be glad to email you the VMF to have a look, but I'm just about off to bed- maybe I can cut out this section and test it on its own to make sure no geometry is interfering for whatever reason, and if that doesn't do it, send it over to you.

Thanks for the clarification. :smile:
-- midkay
Re: Stopping Vvis from cutting up leaves? Posted by Crono on Wed Aug 30th 2006 at 8:38pm
Crono
6628 posts
Posted 2006-08-30 8:38pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
I use hint brushes like a bitch - far more often than area portals (which are damn useful, but are effectively a more powerful version of hints that come with an overhead-causing clipping trait). There's no harm in using hints frequently as, if you know what you are doing, you can almost always ensure you create a much neater BSP than VBSP would manage. Even though, at a basic level, they are used to create additional cuts in the BSP tree, I tend to use them to simplify it - adding a cut manually can save some horrible automatic cuts. For example, pretty much every window and doorway should have a hint covering each open side of it (but ensure the top, bottom and side faces have skip textures or sometimes they cause cuts that extend outwith the door boundaries!). By ensuring you have a clean BSP tree with neat and logical leafs, you can keep VVIS compile times down to an absolute minimum. My levels rarely take more than 10 seconds (but admittedly, rarely have wide open spaces) on VVIS because there are very few unnecessary leafs to complicate the calculations.
All information I've seen on the topic has lead me to horrendous and complex trees.
I've rarely seen them used well. So, I've come to the conclusion that it's better to design your level in favor of the compiler.

Putting them at building openings really helps that much? I'm not sure how the BSP tree is constructed. Never dabbled in game design ( :sad: )

Sounds to me like a certain member should write a certain, detailed, and accurate tutorial on the topic. Do it.
Blame it on Microsoft, God does.
Re: Stopping Vvis from cutting up leaves? Posted by midkay on Wed Aug 30th 2006 at 9:08pm
midkay
398 posts
Posted 2006-08-30 9:08pm
midkay
member
398 posts 120 snarkmarks Registered: Apr 15th 2005 Location: United States
Here's a good example of "might as well use hint brushes" straight out of the Zombie tutorial you love. :smile:

Picture. On the left is sans hintbrushes, where Vvis decides it wants to create a leaf through the doorway and then some around it on each side. In the middle is the addition of a hintbrush in the doorway, and on the right is a screenshot of how there are now three clean leaves, one on each side of the doorway filling the room and one in the doorway filling the.. doorway.

I'm using them the same way as ReNo (as in making sure the compiler does the right thing instead of guessing/hoping it does). Regardless, it has nothing to do with these weird leaf cuts..
-- midkay
Re: Stopping Vvis from cutting up leaves? Posted by Crono on Wed Aug 30th 2006 at 9:22pm
Crono
6628 posts
Posted 2006-08-30 9:22pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
I never bothered reading that portion of the tutorial, since I never bothered myself with hint brushes (I guess). But, if you take a look at my mapping profile, this should not surprise you.

Well, if you can't work against the compiler, trying to tell it where to cut properly, you can try letting it work on its own. Which is what I was suggesting before. If you can't get your leafs the way you want them. Couldn't you also just shift the entire map and all of the contents over on the grid, so it aligns with the predetermined "leaf barriers"?
Blame it on Microsoft, God does.
Re: Stopping Vvis from cutting up leaves? Posted by midkay on Wed Aug 30th 2006 at 10:06pm
midkay
398 posts
Posted 2006-08-30 10:06pm
midkay
member
398 posts 120 snarkmarks Registered: Apr 15th 2005 Location: United States
That might line the 1024-gridlines up in one way but certainly disalign them in another. The 1024-gridlines aren't really a problem, they certainly aren't causing diagonal cuts through a network of useless leaves. :smile: Plus I think dragging the whole map around could cause problems, I distinctly remember doing it before on another map..
-- midkay