proper func_viscluster application

Discussion in 'Mapping Questions & Discussion' started by tyler, Apr 11, 2011.

  1. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,033
    Positive Ratings:
    3,980
    Would all you entity wizards, gurus, wise men and general know-it-all smart asses say that using one or two func_visclusters in the large open areas of Desertion is a good or bad idea? It's kinda hard for me to know if Valve thinks they are suitable or not since they disappear after compiling and thus don't appear when you recompile.

    In this area is the main application of them currently. 12 minutes into vvis and I think it's saving me time, but...?

    Or is this supposed to be just for 3D skybox areas?
     
  2. RaVaGe

    aa RaVaGe

    Messages:
    728
    Positive Ratings:
    1,054
    Hello

    The viscluster must be placed in an outdoor settings not playable, in fact, when you put a viscluster in your map, VVIS will not cut this part, if you place it in a game zone, your map will be absolutely not optimized.

    And for your brush problem which removes after compiling, I have no idea :[
     
  3. jpr

    aa jpr

    Messages:
    1,095
    Positive Ratings:
    507
    Basically you put them in areas where you can see everything at once, aka where there's nothing that would cut visleaves. You could probably put them in the sky if your skybox's ceiling is high enough but otherwise it might not help much, in fact it might be bad for optimization.
    Here's how I used them in crossroads:
    [​IMG]
    Outside of the play area, where you can basically see the whole thing if you look at it so there's no point in cutting it into smaller leaves. They were used similarly in badwater too.
     
  4. Jeremy

    Jeremy L11: Posh Member

    Messages:
    829
    Positive Ratings:
    251
    Visclusters, when used properly, will save A LOT OF COMPILE TIME.
     
  5. Boylee

    aa Boylee pew pew pew

    Messages:
    1,068
    Positive Ratings:
    631
    They don't actually help optimise your map though, just tell vvis to skip calculating the vvis calculations between the visleaves they encompass.

    You will find however, that if you make that ground in the screenshot into displacements and put some nice flat, right-angled nodraw brushes underneath, with as few junctions as possible, that vvis will chew through that area much quicker. If you're not finalised with the layout you could just make the floor func_detail with nodraw underneath to seal it.

    How much of that area is func_detail btw?
     
  6. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,033
    Positive Ratings:
    3,980
    Alright well I think I am using these wrong from what you guys are saying.

    This is what that area looks like currently, and this is what it looks like with func_detail and displacements off.

    In fact, near as I can tell, the only thing slowing my compile down lately has been the displacements (which I didn't have in b2), but there's a nodraw skeleton where they used to be so I don't understand the difference. That should mean everything works out fine, but I can't finish compiles except on Fast. Last night I came home after work and saw vvis going on 5 hours in VBCT.

    Chat's been pretty unhelpful; basically I'm told over and over to make sure I have a skeleton in place, and I do. Then I am told to check for leaks or something stupid like that.
     
  7. Sgt Frag

    Sgt Frag L14: Epic Member

    Messages:
    1,443
    Positive Ratings:
    294
    It would be much easier to tell with a screenshot like #2, but with the visleafs showing so we can see where the cuts are.

    But I think you can still optimize more. A screenshot can be hard to tell, not as good as flying around first hand.

    Anyway. Those nodraw brushes sticking up could go. All they are doing is cutting up a bunch more leafs. And more leafs is probably worse performance than any culling that might be happening behind them.
    I also think the building on the left could be fully func_detailed. The reason is there is only a slim chance that it is blocking view of anything anyway whether inside or out.
    And that angled nodraw on the left, I'd just make it flush flat so you don't get weird cuts stemming off of it.

    Take Gpit for an example. The entire A, B and C areas are func_detailed. The ONLY optimizing is in the tunnels between those areas. And they run fine on 32 man servers.

    Better to have fewer leafs than anything imo.

    And as said above, clusters speed compile time, but don't really optimize in game. (though they could make it worse by grouping too many leafs together and making more stuff render around corners and such).

    ----------
    I'm wondering about that round roof and the angled next to it. Do you see those shapes inside? If not put a flat brush up top inside and that'll help seal that area a lot.

    At least put an area portal, but with the weird L bend, if the portal is on one plane it might not work properly. So maybe put the angled one down a bit and seperate those rooms with a wall or something (at least a partial wall high up). (maybe there is a wall inside)

    --------
    I'd be happy to take a look on tues night/wed also if you pm my a vmf link.
     
    Last edited: Apr 11, 2011
  8. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    As others have noted, the main benefit of proper use of func_viscluster is your VVIS compile time, so if you aren't hurting there (or VRAD is so huge that it's practicallly nothing) then I wouldn't bother.

    Conversely, improper usage of VVIS can harm runtime performance. It doesn't change where visleaves are or what their size is, but it changes the lookup table of "Can I see X from Y" so it's functionally equivalent.

    The maps I tend to think of as good candidates for it include Highway 17, the exteriors of Nova Prospekt, and this huge mostly-straight Ep2 valley.
     
    Last edited: Apr 11, 2011
  9. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,033
    Positive Ratings:
    3,980
    My vvis compile time was 5 hours 20 minutes last night when I came home and it was still going, so something deeper is at work here.

    I'm just not sure why b2 compiled fine and b3 refuses to when there's functionally no difference between what is cutting vvis.
     
  10. Sgt Frag

    Sgt Frag L14: Epic Member

    Messages:
    1,443
    Positive Ratings:
    294
    That's a very long time.

    I suspect a bad brush or something. I know you've probably checked for leaks and all but...

    Recently I had a bad brush and I spent an hour trying to find it. It was causing a leak to nowhere, through a bunch of brushes straight into the sky. Once I deleted a few brushes and redid them everything was fine. There was no true leak but I was getting a pointfile.

    So it sounds like you may have a similar issue.
     
  11. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,033
    Positive Ratings:
    3,980
    No. I don't have leaks or bad brushes. My only issue is there is no player start.

    After I destroyed all the displacements I had made and removed the nodraw skeleton, it compiled in about 25 minutes, and that's including HDR.

    It looks nice.

    So I really don't understand the issue that vvis is having. At all.

    Luckily, dogbread is pulling extra hours working on it for me.
     
  12. Sgt Frag

    Sgt Frag L14: Epic Member

    Messages:
    1,443
    Positive Ratings:
    294
    Was your nodraw skeleton just brushes leaving space between the play area and a box sealing the void?

    That would leave extra open areas underneath it.

    Or was the nodraw a direct seal to the void? That's how it should be, no extra spaces left to calculate.
    -------------

    I'd suspect that being more of an issue than displacements, unless you had a bad displacement (maybe nodraw on one done when nodrawing the skeleton), but that would show in the log if you looked through it. (would still go to compile)
     
  13. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,109
    Positive Ratings:
    6,059
    Doesnt Func_Detailing a displacement mess stuff up in some way? is that possible?
     
  14. Wander

    Wander L3: Member

    Messages:
    148
    Positive Ratings:
    42
    that would make the compiling fail completely
     
  15. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    There's a third, valid possibility: A bunch of large brushes seal the map, and a "displacement hill" exists with a large area underneath it. The map is valid, but there's a performance issue because your "displacement hill" doesn't block vis. Adding walls "under the skin" of the displacement tells the map that your displacement blocks view to an important extent.

    For reference, IIRC the SDK's copy of ctf_2fort does a full VVIS in about 25-30 minutes on a dual-core 3ghz machine.
     
    Last edited: Apr 12, 2011
  16. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,033
    Positive Ratings:
    3,980
    I'm recreating things one by one now for the third or fourth time. So far things are alright... we'll see.

    It isn't this, vbsp just gives up when this happens and screams at you
     
  17. Sgt Frag

    Sgt Frag L14: Epic Member

    Messages:
    1,443
    Positive Ratings:
    294
    But that doesn't necessarily mean better performance. It will add leafs, but if those leafs can see into each other all you've done is make the problem worse.
    Carefully placed hints might help.

    In which case it's better just to have open space under the hill and fewer leafs.
     
  18. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,033
    Positive Ratings:
    3,980
    Attention, cats and kittens: although I am not sure how, I do believe I fixed all the problems.
     
  19. Mr. Happy

    Mr. Happy L6: Sharp Member

    Messages:
    320
    Positive Ratings:
    144
    Something to remember about the nodraw skeleton under your dispalcements is that nodraw only blocks vis when ALL faces of that brush are nodraw.

    Also I want to reiterate what Sgt. Frag and Terr said about viscluster because they are right while the other posts were wrong.

    Also, if your compile is mysteriously taking longer but not giving any errors it might be due to a slightly misaligned areaportal. Like an areaportal that sticks out of its doorway by 1 unit or some such.
     
  20. ardysqrrl

    ardysqrrl L4: Comfortable Member

    Messages:
    173
    Positive Ratings:
    159
    untrue why would you even think that

    ok why is not important but anyway that's not true, the only thing that would stop a nodraw brush from blocking vis is if it had a side which was not opaque
     
    Last edited: Apr 13, 2011