For Newbs Like Me

ImaTargetImaTarget Join Date: 2002-11-01 Member: 3415Members
<div class="IPBDescription">Optimize your Brushwork and null texture</div> Well i had some kind of enlightning moment today, and i thought id share with the people here and also hope to get comments from some pros if my theory or technique is flawed or could be refined more.

I made a <a href='http://www.unknownworlds.com/forums/index.php?act=ST&f=4&t=20558' target='_blank'>post</a> about the map i am working on. specially i was working on the "blue" hallway at the moment. This isnt about lightning or something like that but the null texture and brushwork. since i have no webspace of my own i will have to make several posts again so please bear with me till all are up before you comment <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo--> its a total of 4 pictures.

The first one is of the hallway of my map, without any optimization. As you can see r_speed is already up at 237. This bugged the hell out of me so i started to optimize it. (see next post).

Comments

  • ImaTargetImaTarget Join Date: 2002-11-01 Member: 3415Members
    Now here is the exact same hallway wich i optimized. WOAH 131 w polys! Thats better now isnt it?
  • ImaTargetImaTarget Join Date: 2002-11-01 Member: 3415Members
    Well now the question is, how did i do that? sadly i am not that great inexplaining things. First i took the visleaf size of 224 unist into account. after this every face is split again. so i shortened the hallway segments to 224 and with the columns every segment is now exactly 256. Then i rebuild the lower trim to consist not of three brushes but one brush and a small func_illusionary for the lightstrip. i used the null texture on faces that would be rendered invisible anyway to safe some faces.

    Next the uhm column/frame thing. i didn´t use one big brush and another one for the light fixture but rebuild it from single bruses and clipped the sides so they fit neatly together, inset the light fixture and saved faces again. to make it work fine in commandmode i used the null texture again. Now i look at both in softwaremode (open gl is fuxored in my HL)with drawflat 1 and it will become much more appearent where i saved faces. first the unoptimized again:
  • ImaTargetImaTarget Join Date: 2002-11-01 Member: 3415Members
  • ImaTargetImaTarget Join Date: 2002-11-01 Member: 3415Members
    So that was it. optimize your brushwork and learn to use the null texture with zoners HL tools, it can do wonders. Also try to understand how the compile tools work. It took me about 1 hour to make the changes and saved 100 wpolys, with no loss in atmosphere and looks! thats not too shabby in the time invested/result departement as far as i can tell. Now if i misunderstood something or i did something wrong please someone tell me before i go in and start rebuilding alot of my stuff again <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo-->
  • Lord_RequiemLord_Requiem Join Date: 2002-11-20 Member: 9481Members
    edited January 2003
    Thats a great tutorial Target, well done indeed.

    The only problem is there is absolutely NO gameplay affect on any r_speeds up to 600+

    The difference between 130 and 230 is completely nitpicky, if you really WANT to make sure your level is absolutely trimmed up with the best possible rspeeds then by all means go for it, Target has provided an excellent start for you to begin trimming away those extra annoying digits, just keep in mind you don't really need to unless your rspeeds are causing gameplay problems.

    I reiterate tho, excellent tutorial Target. Bravo!
  • ImaTargetImaTarget Join Date: 2002-11-01 Member: 3415Members
    Oh well yes you are right i am well within bounds, but after several "need to kill map because of r_speeds" failures i am kinda freaked of r_speeds <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo--> also it got a problem after i added more stuff into the corridors like dead doors, computer panels etc. this is seperated from the map right now and does not connect to anything, so i figure i rather safe as much faces as possible and keep w_polys down that way i can have more details in rooms, longer hallways, different kind of conections etc. It may be overkill but i firmly belief that if you do as good as you can from the start you will have much less to worry about later. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
  • Lord_RequiemLord_Requiem Join Date: 2002-11-20 Member: 9481Members
    If you map every corridor and room like that you will hit the planes/faces limit FAAAAR before you run out of r_speeds to detail rooms like you want. Im not saying the way you do it increases planes/faces but you can simply keep r_speeds down so well doing what you're doing, you'll want to add tons of accessories and the half life engine simply cannot handle all that much extra garbage for these huge NS levels.
  • OlljOllj our themepark-stalking nightmare Fade Join Date: 2002-12-12 Member: 10696Members
    Every face whose dimensions are not ( 2^n , 2^m ) will have not so sharp texturing no matter how its scaled. (2^m = 2,4,8,16,32,64,128...)
    Face dimensions with "2^n+2^(n+1)" look "good" but a little blurry,too. (= 3,6,12,22,70,96...)

    Using null textures or other vis splitters makes the Vis compiling much longer, because calculation time is "n^leaves" .
  • sySTEm1sySTEm1 Join Date: 2002-12-20 Member: 11222Members
    Ollj my mind just went numb. keep it simple lol
  • AxehandlerAxehandler Join Date: 2003-01-08 Member: 12038Members
    The Textures can play a big roll also for the Divide from the BSP.

    below is a 224 x 224 Face.
    The poly count as u see is 4.

    I have 'gl_wireframe 2' on so you can see where it is divided there.

    It's split into 4 faces cause the texture is a 256x256 texture.
    (2nd picture below this one)
  • AxehandlerAxehandler Join Date: 2003-01-08 Member: 12038Members
    2nd picture is the bottom of the 1st one <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' valign='absmiddle' alt='tounge.gif'><!--endemo-->

    still 224 x 224 but using a 64x64 Texture.

    1 poly. no divides.

    Makes me wonder why they didn't make 224x224 Textures instead of 256x256 =)

    Axe
  • DanDaManDanDaMan Join Date: 2002-03-19 Member: 335Members
    edited January 2003
    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Using null textures or other vis splitters makes the Vis compiling much longer, because calculation time is "n^leaves<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    null texture isn't a vis spliter. I think you're confusing it with hint.
  • GreedoGreedo Bounty Hunter Join Date: 2002-01-24 Member: 37Members, NS1 Playtester, Contributor
    <!--QuoteBegin--Axehandler+Jan 22 2003, 05:06 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Axehandler @ Jan 22 2003, 05:06 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Makes me wonder why they didn't make 224x224 Textures instead of 256x256 =)<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    Because of the way texture scaling works, textures are scaled down to the nearest power of 2 dimensions (so 224x224 textures get scaled down to 128x128) and then blown back up to the size they really are. So 224x224 textures end up looking really blurry in game. The 3 extra w-poly tends to be worth the increase in texture detail, if the mapper is sure to optimize enough to compensate.
  • SycophantSycophant Join Date: 2002-11-05 Member: 7092Members
    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin--><<i>Requiem</i>> The only problem is there is absolutely NO gameplay affect on any r_speeds up to 600+<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    Still, it doesn't hurt to optimize from the start if you're able. Having an rspeed that low from the start gives far more flexibility for when the map is 'complete'. When the mapper is making a quick tour of the area in pre-beta, he/she might wish to add some extra stuff. Having that much wiggle room grants a million times more possibility than if the rspeed was in the 400's.

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin--><<i>ImaTarget</i>>It may be overkill but i firmly belief that if you do as good as you can from the start you will have much less to worry about later.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    That basically (pre-)stated what I just said better than I ever could. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' valign='absmiddle' alt='tounge.gif'><!--endemo-->

    Nice job, Target! I'm still learning some of the finer (<i>aka "more complex"</i>) points of mapping, so this was a great read for me. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
  • Cash_Car_StarCash_Car_Star Join Date: 2002-11-03 Member: 6448Members
    Call me crazy, but I thought the patches were cut at 240, not 224... Same effect on a 256x256, but more for argument's sake.
  • AxehandlerAxehandler Join Date: 2003-01-08 Member: 12038Members
    dude: What’s with the 224 texture pixel cut up I’ve heard about?
    Mawibse: To complicate matters further, during compile the tools will cut at 224 pixels if the texture pixels visible on a brush face extends beyond the initial 240. This is a minor ‘flux’ so you can safely ignore this.
    ---

    Basicly this works on TILED Textures this way. you can use 240 for whole textures(256x256 textures) and get the same cut as if you used a 224.. if you tile the textures thou sometimes it will cut them up at 224.

    So if you use alot of tiled textures it's safer to set at 224.
    If whole 256x256 textures then 240

    seems resonable and safer to work at 224 thou <!--emo&;)--><img src='http://www.natural-selection.org/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo-->

    I suppose this is always debatable thou <!--emo&;)--><img src='http://www.natural-selection.org/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo-->

    Axe
  • ImaTargetImaTarget Join Date: 2002-11-01 Member: 3415Members
    Thats why i look at new sections always in r_drawflat lately. it really can tell you where you could save or add some wpolys. I also have to admit i totally forgot about the plane and node limits. Thanks for reminding me again, that is something you also have to look for. generally it may not have been that usefull what i did in this situation, and basicly gave me lower w_poly for the cost of more planes and nodes. So keep in mind: after every compile look at your plane and node limits. Alas things like this could be used in areas where you struggle with your r_speeds and get some fairly surprising results. Personally i was very surprised when i saw i saved 100 w_polys by tweaking just some little things. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' valign='absmiddle' alt='wink.gif'><!--endemo--> Back to work now.
  • KeksImperiumKeksImperium Join Date: 2002-11-19 Member: 9300Members
    whats a null texture?

    (im unworthy i know <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' valign='absmiddle' alt='biggrin.gif'><!--endemo-->)
  • OlljOllj our themepark-stalking nightmare Fade Join Date: 2002-12-12 Member: 10696Members
    <!--QuoteBegin--Axehandler+Jan 22 2003, 08:06 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Axehandler @ Jan 22 2003, 08:06 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
    Makes me wonder why they didn't make 224x224 Textures instead of 256x256 =)
    <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    256-224 = 32
    Faces are split every 224 units to have 32 units "overlay-space" for smoothing between 2 different 256 Textures (on old GFX cards in software mode).
  • marcosmarcos Join Date: 2002-06-26 Member: 825Members
    It renders the brush at 240x240 not 225x225 -> for a 256x256 texture that is.

    Check 3D-Mikes site for more info.
  • ImaTargetImaTarget Join Date: 2002-11-01 Member: 3415Members
    @waechter the null texture is a texture that comes with the newest zoner HL tools, and i think is also integrated into NS. its called "null" hence the name. As far as i understand it faces on wich the null texture is applie will be deleted, les faces, less w_polys. of course this only works for faces no one would see anyway, for example on faces of a transparent brush wich would be rendered completely invisible, or the back of a pipe no one can ever see. Search the forum for more information on this.

    marcos: hmmm so it only worked that well on the floor and ceiling and walls for me because it isn´t a 256*256 texture? interesting.
  • AxehandlerAxehandler Join Date: 2003-01-08 Member: 12038Members
    Correct Imatarget.

    if the texture is 256x256 then it will render at 240x240
    if the texture is smaller/tiled to fit, then it's usually 224x224.
    (as I stated above... <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo--> )

    Axe
Sign In or Register to comment.