R_speeds (again)

KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
Ok well i think i know most of the basics for keepiung em down but heres another question:

<span style='color:red'>Q. Do R_Speeds only apply to what the player can see, or do they make up the entire map, meaning in your whole level you can really go over 800 poly or does that apply to each room ?
A. ?</span>
«1

Comments

  • KageKage Join Date: 2002-11-01 Member: 2016Members
    wpoly is the count of polies that the engine is currently drawing...if a map could only have 800 polies total, it would look terrible.
  • KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
    yes i already came to that conclusion but i was just double checking.
  • NerdIIINerdIII Join Date: 2003-04-05 Member: 15230Members
    don't forget to use gl_wireframe 2 to see ALL the wpolys that are drawn.
  • Soylent_greenSoylent_green Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
    Yes gl_wireframe is very useful. mode 2 shows all the w_polys the engine thinks the player can see(and hence must be drawn, visible or not), it draws a thin border around each w_poly. gl_wireframe 1 draws only visible polygons and is useful for finding world brushes that intersect and get split up(like a pipe stícking out of a wall).

    A common solution to intersecting world brushes is to use vertex editing or if possible simply resize the objetct or move it away so that it is one unit away from the wall/floor/etc, applying the NULL texture to the side one unit of the wall/floor/etc not visible to the player. Crates can be placed one unit of the floor and their under side textured with NULL to avoid splitting. entities generally do not split up surfaces, a crate made of a func_wall will not split a floor even when standing on it but the compile tools will treat it as non-visible during VIS(thus making a wall a func_wall will allow the engine to think that you see whats on the other side, thus increasing r_speeds). Non visible surfaces of entities like func_walls should generally be textured with NULL so the engine doesn't think it has to draw them.
  • KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
    thanks for the more detailed summary, but im wondering. If r_speeds are high with what you see, i look down one of my hallways and it hits around 700, but once i start to walk back where i started the map it is about 300. It seems as though it acts with how far away i am from my spawn entity.
  • Soylent_greenSoylent_green Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
    edited August 2003
    Your "spawn entity" has nothing to do with it. I think your problem is that you have not added enough stuff to prevent you from seeing too many rooms and corridors at the same time. gl_wireframe 2 draws what the engine thinks you can see, can put a bend in the corridor or a big pillar infront of the entrance or something and see if the engine still thinks you can see in.

    high detail areas are usually shielded of pretty well, look at the eclipse hive for example, when inside the hive you are prevented from seeing anything outside by a big pillar type wall on one side and a short bent corridor on the other.

    edit: If you like you can take some screenies with gl_wireframe 2 and let me/others willing take a look and see if we can suggest something.
  • KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
    ok sum1 mentioned that r_speeds go by what you can see, well heres the deal, im in a vent looking straight ahead, yet r_speeds are pretty high for a vent. so im takng ot means everything in front of you even if you cant see it. Is this true:
    <img src='http://www.members.optusnet.com.au/nambucca/r_speeds2.JPG' border='0' alt='user posted image'>
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--ozbirdboy+Aug 21 2003, 11:17 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (ozbirdboy @ Aug 21 2003, 11:17 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->ok sum1 mentioned that r_speeds go by what you can see, well heres the deal, im in a vent looking straight ahead, yet r_speeds are pretty high for a vent. so im takng ot means everything in front of you even if you cant see it. Is this true:
    <img src='http://www.members.optusnet.com.au/nambucca/r_speeds2.JPG' border='0' alt='user posted image'><!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    All of those wireframe lines are showing faces that contribute to r_speeds, which tell you how many polygons the engine is drawing. Only polygons that are being drawn during that frame count, but most of the time the engine draws faces that aren't actually visible to the player... this is due to the way that the Half-Life engine determines visibility--if you're up for some technical reading, Michael Abrash, the co-author of the Quake engine, has written a series of <a href='http://www.gamedev.net/reference/articles/abrash/abrash.pdf' target='_blank'>articles</a> on how the engine works. The first article describes visibility matricies and how the engine determines what to draw.

    If you're not up for the read, just know that running VIS -full should store information in the map telling the engine to skip drawing the rooms below that vent, and should lower your r_speeds at that point.
  • KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
    thanks for another wonderful post cage, dont have the time to read it to i get back but basically i should run in full vis not fast from now on ?
  • OneEyedOneEyed Join Date: 2003-03-14 Member: 14493Members
    Yea ozbirdboy, I had the same thing happen, cause i would always compile fast, but when I compiled full, it was much better.
  • NerdIIINerdIII Join Date: 2003-04-05 Member: 15230Members
    hehe, lol I alsways assumed you were running VIS in normal when complaining about VISibility problems <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
  • KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
    lol sorry guys i should be more specific.
  • SoundFXSoundFX Join Date: 2003-08-21 Member: 20048Members
    i dunno if this is on or off subject but i think its along the same lines...besides every1 should read it

    <a href='http://countermap.counter-strike.net/Tutorials/tutorial.php?id=2' target='_blank'>http://countermap.counter-strike.net/Tutor...torial.php?id=2</a>
  • KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
    i tried running it in full vis and it still done the same thing... what the ?

    i use a couple of those hint brushes but not sure if i still used em right, i used em where i thought they were right.
  • NerdIIINerdIII Join Date: 2003-04-05 Member: 15230Members
    Are you sure the bsp was overwritten with the new version and you loaded the new one and not an old version? Are you 100% sure there is no gap in your vent? I've never seen vis go so increadibly wrong so I wonder a bit. Anyway would you mind to draw a picture of where you used the hint texture and why?
  • KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
    yes
    yes
    <img src='http://www.members.optusnet.com.au/nambucca/hint1.JPG' border='0' alt='user posted image'>
    <img src='http://www.members.optusnet.com.au/nambucca/hint2.JPG' border='0' alt='user posted image'>
  • OlljOllj our themepark-stalking nightmare Fade Join Date: 2002-12-12 Member: 10696Members
    edited August 2003
    that hint brush in the vent entrance better should not look out of the vent or be infront of it, it should just FILL the vent entrances volume.
    otherwise you just get more leafes, faces and w_poly.
    hint brushes split up all faces they touch causing more w_poly!!!

    Placing hint brushes in doors is no bad thing but rarely needed.
    It rarely improves w_poly (most ti mes increases), sometimes lessens the leaf count.
    When you look straught trough a hint brush it does nothing!!!
    <b>Best usage of hint brushes is in L-shaped corridors/vents in the turn (45°) to make it impossible to look around turns.</b>
  • NerdIIINerdIII Join Date: 2003-04-05 Member: 15230Members
    ...and don't texture ALL sides with hint. hint works as a plane, not as a volume. So when you have a cube with hint textures on all sides you create up to 6 cuts in the level instead of only the one you want. Why you can still see the whole room, I have no idea <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo-->
  • KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
    so what do i put on the other sides of the block if i only want the others to be hint ?
  • EriasErias Join Date: 2003-08-17 Member: 19878Members
    NULL is your friend.
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--ozbirdboy+Aug 25 2003, 10:35 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (ozbirdboy @ Aug 25 2003, 10:35 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> so what do i put on the other sides of the block if i only want the others to be hint ? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    <!--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-->NULL is your friend<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    SKIP works, too.
  • KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
    lol ok i keep on hearing of all these textures i have never heard. Any1 got a tutorial on where it lists and describes them ?

    Also i have ran my map in full vis and r_speeds have gone down but some places still high, does this require the hint texture nearby to stop VIS from drawing it ?
  • EriasErias Join Date: 2003-08-17 Member: 19878Members
    edited August 2003
    Tutorials...? Hmm. Ah, screwit. I'll write a post because you're special!

    SPECIAL TEXTURES:

    Name: NULL
    Function: Whatever is textured with NULL is removed from the visible faces in the bsp during compile. A
    face with NULL on it will <b>not</b> contribute to wpolys or r_speeds, which is nice.
    Location: ns.wad

    Name: HINT
    Function: In short, it splits vis leafs along the plane the texture is on, in areas where too many out-of-sight
    wpolys are being rendered and thus making r_speeds too high.
    Location: ns.wad
    More Info: <a href='http://collective.valve-erc.com/index.php?doc=1043477348-95410300' target='_blank'>Click for more info</a>

    Name: SKIP
    Function: [edit] This only has a use for texturing the sides of a HINT brush that you don't want to break up
    vis leafs with. The sides with SKIP are completely ignored by the compiler. [/edit]
    Location: ns.wad

    Name: CLIP
    Function: An invisible texture that simply creates a collision hull. Skulks can only climb on world brushes and
    wall entities, btw, but <b>not</b> plain clipnodes or the SKY texture. Bullets also pass through CLIP, too.
    Location: halflife.wad
    More Info: <a href='http://www.vlatitude.com/tutorials.php?tutID=25' target='_blank'>Click for more info</a>

    Name: SKY
    Function: This face doesn't really appear, and may or may not generate a collision hull (depends on your
    compile tools) but renders a skybox wherever the texture is. Generally a brush should have all of its faces
    covered with SKY.
    Location: halflife.wad

    Name: NOBUILD
    Function: An NS-specific texture, this creates a surface that can't be built on. Duh.
    Location: ns.wad. Duh.

    Name: ORIGIN
    Function: This is used for some rotating entities. Use this to texture a brush that indicates the point around
    which the entity will rotate. ORIGIN is invisible after the map is compiled.
    Location: halflife.wad
    <a href='http://collective.valve-erc.com/index.php?go=rotating_objects' target='_blank'>Click for more info</a>

    Name: AAATRIGGER
    Function: I'm not sure about what this does specifically, but generally it should only be used for texturing invisible brush entities.
    Location: halflife.wad

    I was filled with a desire to write them all down. I am insane. If anyone has any additional info, I'll edit this post.
  • KalopsiaKalopsia Join Date: 2003-05-15 Member: 16331Members, Reinforced - Shadow
    wow thanks mate, new a couple but didnt fully understand others.
    Question: With the hint texture, is it possible to put it in gaps between to rooms or something, that way it stops r_speeds affecting where ur looking.
  • OlljOllj our themepark-stalking nightmare Fade Join Date: 2002-12-12 Member: 10696Members
    hopefully you did vis with "-full" because it does not look so.
    Ok the trick about VIS is that your whole maps volume gets split up into "leaves" (volume parts just like brushes).
    Leafes have "portals" on their borders that connect neigbour leafes to each other or show a wall with its texture. (leaves are stored in a bynary data tree, thats why its called leaf)
    Now VIS checks what leaf is visible from what other leaf creating a vis matrix that shows if you can see leaf 1945 from leaf 6792 or not.
    Now ingame when you stand in one leaf its like you stand in ANY position of this volume piece looking in your 180° field of view.

    black = leafes and its portals/borders.
    red dot = player position.
    blue dot = leafes can "see" from here, imagine you stand there, too.
    blue lines = imaginative lines of leafes sight.
    green = visible leafes from your leaf/position. you see all players and textures in there when its in your 180° field of view.
    purple = hint brush face splitting leafes.

    When you stand in a long straight hallway, that is one leaf for example, its like you are standing at each place of this hallway at once seeing into multiple rooms like you look around corners. (upper left pic)
    Lower left pic shows how it seems that you look around 3 corners but the leaf you are standing in can see that other room and so can you.

    The right pics show the best usage of hint brushes in general in the upper pic, without hint brush, you can see around the corner.
    In the lower, with a hint brush in 45° angle, you cant.

    now hint brushes split texture faces causing more w_poly in general.
    They also increase the leaf count what makes your map more complex, bigger, longer to compile and even laggyer... but you wont notice that.
  • ssjyodassjyoda Join Date: 2002-03-05 Member: 274Members, Squad Five Blue
    edited August 2003
    you could easily break that middle hallway up. well, it is the easiest thing for hint noobs. I still have trouble with them. Evil things. Why can't i just wave a wond and say r speeds be lower and its done.
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    <!--QuoteBegin--Erias+Aug 26 2003, 02:34 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Erias @ Aug 26 2003, 02:34 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Is [SKIP] compiled out like NULL? <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Yes, but if you try to use it with something other than HINT you'll get a mixed brush content error.

    SKIP is actually ignored during hull processing and doesn't contribute to any hull (hence the name). When NULL is used in a hint brush, it behaves almost same way--the brush content type is set to CONTENTS_HINT by the HINT texture and NULL doesn't change it back; as a result the NULL faces aren't compiled into the clip hull. They are, however, still considered cutting planes for the vis hull, resulting in cuts that SKIP wouldn't make.

    The two textures are both usable for hint brushes, but I prefer using SKIP so I know at a glance that those faces aren't going to contribute to the hulls. It's also slightly cleaner to use SKIP since NULL still cuts the vis hull along the plane of its face when used with HINT brushes.
  • DubbilexDubbilex Chump Join Date: 2002-11-24 Member: 9799Members
    *raises hand*

    I have a small question. This technique was mentioned in another thread: Using the NULL texture on every face that the player can't see (I.E the walls on the outside of the map or the backsides of large, wall-adjacent brushes), This usually entails texturing the entire map in NULL and only texturing the inside of the map.

    Does this actually work? Will it lower r_speeds significantly, or is it not worth the effort?
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    edited August 2003
    <!--QuoteBegin--Dubbilex+Aug 26 2003, 12:16 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Dubbilex @ Aug 26 2003, 12:16 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> *raises hand*

    I have a small question.  This technique was mentioned in another thread:  Using the NULL texture on every face that the player can't see (I.E the walls on the outside of the map or the backsides of large, wall-adjacent brushes),  This usually entails texturing the entire map in NULL and only texturing the inside of the map. 

    Does this actually work?  Will it lower r_speeds significantly, or is it not worth the effort? <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    Using NULL on the faces that are "outside" of your level is redundant because BSP already removes the outer shell of your level when it processes. NULL face removal actually takes place after the removal of the outer leaves, so any NULL textures on the outer walls don't make it to the NULL processing step (edit: or NULL ignoring step, to be more accurate) anyway. IMO, it's not worth the effort of carefully texturing the interior surfaces a face at a time.

    The only time it would have a significant impact on r_speeds would be when the level has a leak and the outer shell isn't being removed -- but when that's the case, other extra information like excess leaf and node information isn't being removed, either. It's far better to fix the leak than to NULL the outside of your level.

    There may be a slight difference in your level's r_speeds you see if you're not good about finding places to use NULL -- it may be easier for some people to "turn on" NULLed faces than to work in the other direction; I'd expect the impact to be minimal if you know how to use NULL properly on the inside of your level and are actively looking for opportunities to optimize your level.
  • EriasErias Join Date: 2003-08-17 Member: 19878Members
    Thanks for enlightening us, XP-Cagey.

    I've found two places to use NULLs to slightly (but significantly) decrease wpolys and r_speeds. One is on the backside of brushes that are <i>in the map</i> but you never see that side or can't get behind the brush (say, on the back of a round pipe placed a few units away from a wall.) The other is on solid brush entities, on the sides that are flush with or inside the walls (these sides are still visible a lot of the time, because brush entities don't integrate into the level geometry or get culled.) This can really help if you use a lot of func_walls or somesuch to prevent funny shapes from breaking up your faces too much.
Sign In or Register to comment.