Hint of the day (arf)

nrbynrby Join Date: 2002-03-05 Member: 270Members
I noticed a lot of ns maps had (by thier nature) loads of pipes. These can easily make your r_speeds rise because the shape of the pipe cuts lots of new portals and makes vis cry.
You can help it out using hints.

Untreated pipes, notice no hinting. not tied to entity, points not snapped to grid.

<img src="http://csnation.counter-strike.net/barney/personal/wc_nohint.jpg" border="0">

Notice r_speeds are touching 300

<img src="http://csnation.counter-strike.net/barney/personal/game_nohint.jpg" border="0">

Pipes hinted, covering the pipes, not touching the wall.

<img src="http://csnation.counter-strike.net/barney/personal/wc_hint.jpg" border="0">

Hinted r_speeds are about 50 polys less. Add this up in an area and you could save a lot of poly's

<img src="http://csnation.counter-strike.net/barney/personal/game_hint.jpg" border="0">


Hope this helps <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->

Comments

  • YamazakiYamazaki Join Date: 2002-01-24 Member: 21Members, NS1 Playtester, Contributor
    That's an interesting use of hint brushes I'd never thought of before. Most people just see vis areas in terms of large horizontal and vertical chunks, not as small little areas created around cylinders.

    My map isn't very cylinder heavy at the moment, mostly because I tried other ways to showcase pipes and machinery, but now my hands are untied <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
  • ComproxComprox *chortle* Canada Join Date: 2002-01-23 Member: 7Members, Super Administrators, Forum Admins, NS1 Playtester, NS2 Developer, Constellation, NS2 Playtester, Reinforced - Shadow, WC 2013 - Silver, Subnautica Developer, Subnautica Playtester, Pistachionauts
    Nice help tehcnique you got going here! Now if I only could map and use this technique... Glad to see your posting tips to help people out. There seems to be a surge of new mappers asking questions, and another knowledgeable person is always good to have around (P.S. - love your level screenshots in the other thread)

    Just curious though, as I do know a little about mapping : If you just made them not touch the walls and not added hint brushes, how much does that help the r_speeds? (Just from the way I read about hint brushes, I dont see how they would help here, but maybe I learned them wrong)



    <!--EDIT|Comprox|Mar. 05 2002,18:25-->
  • nrbynrby Join Date: 2002-03-05 Member: 270Members
    That will help a LOT, Tommorow i'll post a bunch of stuff about face splitting and r_speeds.

    Basically avoid having world based cylinders touch other faces, i'll explain why tommorow.
  • YamazakiYamazaki Join Date: 2002-01-24 Member: 21Members, NS1 Playtester, Contributor
    Well, actually, I think I see now how it works. The hint brushes split surfaces they touch like any other brush, so they neatly chop the area the pipe touches. Instead of having a jagged collection of triangles and trapezoids crisscrossing the wall, you end up with a small set of triangles in a square area where the pipe is, and nice rectangles on the rest of the wall.

    A picture with gl_wireframe 1 on would've confirmed this, so I'm just guessing. I'm too lazy to try it out for myself at the moment <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
  • mr_Nebelmr_Nebel Join Date: 2002-01-24 Member: 36Members
    Nice, thats very useful.

    A technique I came up with for the pipes under the floors in my levels was to have only the upper half showing with NULL on the bottom and the ends, with a 1 unit gap to the wall, that way i cut about 100 of my r_speeds in the area i was working with, and you couldn't tell because there was no way to see the bottom half of the pipes.
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    I know a few people won't believe this unless I show them first hand, but I have had situations where the end of a cylinder was moved away from a wall/platform 1 and even 2 units, but the wall/platform was still being split as if the cylinder were touching it.  In fact I have one in ns_bast that was doing this until I surounded it with a hint brush.  I would bet that this is a significant reason why the hints cut down on the r-speeds in n@rby's example, as that's the method (using hints) I had to employ when this has happened in the past, and it does indeed prevent this from happening.

    Oh, and also, using hints like n@rby did will also significantly reduce VIS compile time, and go a long way towards preventing those occasional HOM artifacts on angled faces.



    <!--EDIT|Relic25|Mar. 05 2002,22:03-->
  • YamazakiYamazaki Join Date: 2002-01-24 Member: 21Members, NS1 Playtester, Contributor
    Relic25, I've had something similar occur. I had a desk touching the floor, and made the vertical panels (the only part that was touching the floor) into func_walls, and left the countertop a normal brush. The func_walls ended up cutting the floor as if they were normal brushes. No one believed me.
  • nrbynrby Join Date: 2002-03-05 Member: 270Members
    relic! long time no see <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
  • Black_DogBlack_Dog Join Date: 2002-02-10 Member: 190Members
    THANKS VERY MUCH! It's a long time i search someone teaching me hint brushes' use.
    But i can make just 1 brush over the tube or i have to make 4 brushes?(i think the 1st way but i dunno)

    AND always about hint brushes...what's the use for entire areas? Can someone tell me where to find tutorials and/or samples and/or everything else where to learn more about?(if someone can't explain here)
  • neagneag Join Date: 2002-01-24 Member: 12Members
    Good hit.
    Here is another one use the null texture.
    I can be used instead of {invisible or {blue on funk illusionarys and on  a side on a brush entity that is not visible.
  • YolmerYolmer Join Date: 2002-01-25 Member: 84Members
    Someone here said that your VIS time should be reduced by this. From what I've heard, hintbrushes add to compile times. I don't know why this would be an exception, maybe someone could explain that to me. And also, wouldn't this screw up the VIS leaves?
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    Okay, I'll do my best.  First, I should clarify something.  I should have said that it <b><i>can</i></b> reduce VIS compile times, not that it will in every case.

    In the attached picture, you can see a cylinder that is splitting up an adjacent surface.  (This is the example I was writing about when I said that even moving the end of this cylinder 2 units away from the wall didn't keep the adjacent face from being split up.)  Anyway, the reason that the face is being split up is because those are the boundaries of the VIS portals that were created.  VIS must calculate every other VIS portal that can be seen from each of these portals.  In other words, the 'space' surrounding the cylinder must be subdivided in order to analyze what other 'spaces' are visible from anywhere around the cylinder.  By nature, it is more difficult (time consuming) for VIS to run visportal calculations for non-regular (non-90 degree) 'spaces', and leads to a greater chance of error in the VIS calculations (results in HOM effects).

    In Figure 1, an overhead of a cylinder in a room, you see how the space is automatically subdivided if the compiler is allowed to fraction up the space on its own.  This creates a lot of non-90 degree vis portals in the space around the cylinder.

    Figure 2 shows the same cylinder surrounded by a hint brush.  The hint brush prevents the wild fractioning and creates much more 'regular' blocks of space. It also confines the fractioning to a controlled, regular space.  This prevents the face splitting that sometimes occurs even when a brush isn't in direct contact with another surface.

    I know a lot of this is probably common knowledge, and if any of it is incorrect, feel free to correct me, but this is what I have come to understand from past experience.



    <!--EDIT|Relic25|Mar. 06 2002,15:34-->
  • YamazakiYamazaki Join Date: 2002-01-24 Member: 21Members, NS1 Playtester, Contributor
    Actually, when you look at Figure 1 and the first image, it almost looks efficient. The compiler is trying to create an iris shape and is doing it with just triangles... but then it has one or more lines continue and overlap other triangles and it gets messed up. Also the placement of the pipe causes some of the triangles to not match up with the edge of the wall, causing them to become trapezoids rather than real triangles. A perfect iris would lead to the fewest number of wpoly, but the compiler can't seem to do it on its own, and it wouldn't work with every surface.
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    Well, remember, we're not talking about w-poly here.  That would only be the case if the surface splitting actually occurred.  As long as the cylinder with hint brush is not touching the wall, there will be no face splitting at all.  The 2 figures just show how space (and coincidentally how an <i>intersecting</i> face) would be split up.
  • YolmerYolmer Join Date: 2002-01-25 Member: 84Members
    Yeah, I know about face splitting, but why is this method better than just making the part of the cylinder that touches the wall an entity? I don't really see why hint brushes would be better. And, if I understand correctly, a hintbrush creates a VIS portal right?
  • JuggieJuggie Join Date: 2002-01-24 Member: 10Members
    This part I get, but the part where certain rooms get divided by those hintbrushes, i dont get... here's a tutorial about what i ment with rooms being devided
    <a href="http://countermap.counter-strike.net/Tutorials/tutorial.php?id=2" target="_blank">http://countermap.counter-strike.net/Tutorials/tutorial.php?id=2</a>

    Is there a way to explain it easier?
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    Yolmer: It's not necessarily more or less advantageous, unless you can't spare the brush entities.  In that case, this is a good alternative.

    Juggie: Unfortunately, I don't know of an easier way to explain it.  Although that page credits me, I didn't write that tutorial.  I only edited it.  It's really difficult to understand exactly how hint brushes work and how to really use them effectively until you fully understand how CSG, BSP, VIS, and HL's rendering engine work to process what is drawn in a map.  Using the same principles as briefly discussed above, you can apply the same rules to using hint brushes to more controllably split up the space in a room/area so that fewer other spaces can be 'seen' along the longest line-of-sight from anywhere within each subdivided space.  Essentially, all hint brushes do is create vis portals along the faces to which the hint texture is applied.  It may help some people to change the mindset from maps being constructed of solids to maps being simply chunks of space with texturing on the interior surfaces.



    <!--EDIT|Relic25|Mar. 06 2002,16:52-->
  • YolmerYolmer Join Date: 2002-01-25 Member: 84Members
    Ok, thanks. I guess I'll have to find another way to decrease r_speeds.
  • Black_DogBlack_Dog Join Date: 2002-02-10 Member: 190Members
    Now i'm a little confused <!--emo&???--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/confused.gif" border="0" valign="absmiddle" alt='???'><!--endemo--> ...in the example you made, Narby, the screens at the beginning...the tubes weren't touching the walls? so were is the trick? vis don't cut the faces if the brush isn't touching the face...no? and...in the new shots...you show that with the hint the face is cutted "better"...but isn't better use a func_wall on the sides of the tube? so there isn't splitting,there isn't face cutting...and the maps looks more detailed <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->

    Can u clarify? PLEASE!
  • Relic25Relic25 Pixel Punk Join Date: 2002-01-24 Member: 39Members, Retired Developer, NS1 Playtester, Contributor
    <!--QuoteBegin--Black Dog+Mar. 06 2002,17:18--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td><b>Quote</b> (Black Dog @ Mar. 06 2002,17:18)</td></tr><tr><td id="QUOTE"><!--QuoteEBegin-->vis don't cut the faces if the brush isn't touching the face...no?<!--QuoteEnd--></td></tr></table><span id='postcolor'><!--QuoteEEnd-->
    This isn't always the case.  Every once and a while, you'll find that it will still split faces, even if the brushes aren't touching.  It just depends on what the compile process decides is the most efficient way to build the VIS portals.
  • CrematorCremator Join Date: 2002-01-24 Member: 27Members
    excellent help, i really needed this.  glad you pointed it out.
Sign In or Register to comment.