How to reduce unnecessary leaves?

Discussion in 'Mapping' started by dame_pol, Sep 22, 2006.

  1. dame_pol

    dame_pol Member

    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    Im making large simple map. vbsp split my map to too many leaves, so vvis have to work too long times. I want to reduce leaves and vvis works more faster.

    I used glview to see how vbsp split leaves in my map, and i found that there are too many unnecessary leaves. I know that vbsp split leaves every 1024 units.

    Please tell me
    how to let vbsp splits leaves every 4096 or 8192 unit
    or
    how to disable splitting leaves every 1024 unit and split only by brush and hint brush
    or
    anything reduce unnecessary leaves.

    Thanks.
     
  2. dizzyone

    dizzyone I've been drinking, heavily

    Messages:
    5,771
    Likes Received:
    0
    Trophy Points:
    0
    Last edited: Sep 22, 2006
  3. Solokiller

    Solokiller Member

    Messages:
    4,861
    Likes Received:
    7
    Trophy Points:
    0
    Try using hintbrushes, it should work.
     
  4. R_yell

    R_yell Member

    Messages:
    208
    Likes Received:
    0
    Trophy Points:
    0
    From Valve Wiki:

    So you can't deal with the 1024 cut size. Use func_detail over all detail brushes that won't stop visibility. That's the only thing you can do to reduce leaves, hintbrushes will make new cuts.
     
  5. dame_pol

    dame_pol Member

    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    Thanks you.
    I converted most of world brushes to func_detail, and many leaves have disappeared.(from about 14000 numportals to 2000 numportals)

    But i dont think vbsp spliting map properly. There are still unnessecery leaves. If there is no way to change how vbsp splitting map, I will try to hack *.prt file.
     
  6. Broccoli

    Broccoli Member

    Messages:
    1,635
    Likes Received:
    0
    Trophy Points:
    0
    AFAIK, bsp will always split every 1024 units. That's just what it does. Unless you were going to re-write the entier compile tools.
     
  7. dame_pol

    dame_pol Member

    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    I know that.
    I think it is possible to write program that generate *.prt file from *.vmf file by reading information about HINT. Both file are ascii format, and i know what they means.

    My plan is...
    1, vbsp read vmf file and output bsp file and prt file.
    2, run my program that read vmf file and override prt file.
    3, vvis process prt file which my program generated.
    4, run vrad and etc...

    but, i dont enough time to do that.
     
  8. Wereaser

    Wereaser Member

    Messages:
    1,341
    Likes Received:
    0
    Trophy Points:
    0
    Isn't .PRT just made for LEAK tracing? I don't think that modifiying the .prt will help you on this.
     
  9. Solokiller

    Solokiller Member

    Messages:
    4,861
    Likes Received:
    7
    Trophy Points:
    0
    The .prt file, or portal file, is used to create portal generation info, editing it without knowing what you're doing might cause the compile to crash.
    Also, leafs larger than 1024 units may create problems, such as objects going invisible or the level crashing.
     
  10. dame_pol

    dame_pol Member

    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    You can know prt file format from this site.
    http://developer.valvesoftware.com/wiki/PRT

    I tried to overwrite prt file of my map.
    I wrote 3 leaves in my map, and I can compile my map successfully.
    But when loading that map, hl2.exe got crashed!
     
  11. Solokiller

    Solokiller Member

    Messages:
    4,861
    Likes Received:
    7
    Trophy Points:
    0
    Thats what i mean with editing it without knowing what you're doing.
     

Share This Page