Probably the noobiest question yet...

Discussion in 'Mapping Questions & Discussion' started by 404UNF, Aug 25, 2015.

  1. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    59
    How do I stop this from happening?

    That's the wood-framed glass ceiling of my central area that you can see bits of.

    I've got the backsides of the glass and the wooden beams nodraw'd and then covered by a layer of 2d skybox which also has the backs nodrawed. Even when the backs were not nodrawed, I could still see the glass ceiling from the pond area.

    This same issue comes up when you grapple onto the glass ceiling or stand on the bottom wood frame (it acts like a ledge, for snipers). You can see clear into the spawn rooms and hallways.

    How do I prevent this see-through-ness? It's been a long time since I've done any mapping so I can't remember how I resolved this issue a few years back when I encountered it.
     
  2. Crash

    aa Crash func_nerd

    Messages:
    3,190
    Positive Ratings:
    4,918
    The reason why those parts are loading in is because you can see the visleaf they are touching from where you are standing.

    If you're unfamiliar with visleafs, read up on how optimization works here.
     
    • Thanks Thanks x 1
  3. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    59
    Ah I remember those tricky bastards now. What's the easiest fix? Areaportals? Or a door? I'm guessing a door in that doorway will separate things. Obviously an areaportal should be added where the door is and linked up to it to switch states based on the doors open/closed status.
     
  4. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,035
    Positive Ratings:
    3,992
    That glass stuff is through the door? Proper hinting should do it. Might need to be diagonal based on what's in the room. A door with a linked areaportal would do it too, yeah.
     
    • Thanks Thanks x 1
  5. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    59
    Yeah it's through the doorway in the central area where the control point is. (linked screenshot is from older version of the map)

    And yeah, if you grapple up to the bottom wood frame and stand on it (again, you can stand on it, the wood frame is 32 units wide, the glass is 16 and is pushed to the back half of the wood frame to allow standing), you can look down into the spawn room (though players aren't visible, I believe). Hopefully hinting will fix that, otherwise I may have to put a "ledge" outside of the glass to block the view into the spawn rooms.
     
  6. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,035
    Positive Ratings:
    3,992
    Then hinting should be able to do it as you've got it, but an areaportal door would definitely make it simpler. Normally I would say I hate doors, but it's a trade map right? So whatever.
     
    • Thanks Thanks x 1
  7. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    59
    Yeah and I just read your guide on thinks to avoid when mapping and now I feel bad that I'm still making trade maps. But that's only because I'm not a professional mapmaker. I can make maps and get done what I need to get done, but I'm never going to make something in an attempt to get it into the game. To each his own I guess, but I do thank you for the help nonetheless.
     
  8. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,035
    Positive Ratings:
    3,992
    That article is useful but was written when we had a lot of people making really bizarre maps and trying to get them into gameday. I'll probably rewrite it for the new forums and make it a little less dogmatic and a lot easier to read. What I'm saying is: don't feel bad about what you're doing. That wasn't my goal.
     
    • Thanks Thanks x 1
  9. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    836
    Just following on from what ty said, if you put a hint face the width of the room, right below your sky light brushwork, an open areaportal on your entrance tunnel should be enough. If you associate one with a door, you have the benefit of it closing when the door does, but if someone else opens the door, then the brushwork might pop in to view anyway. If you find that an open area portal isn't enough to prevent it from being seen, perahsp increase height of the brushwork (note: As in move it upwards some, don't stretch it to make it taller).

    You could of course just texture the outside of the sky light brushwork since it doesn't really make sense to look in to the sky and not see it.
     
  10. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    59
    Yeah see I had it textured normally, and then I put a layer of 2d skybox textured brush on the top and sides of the glass. Either the skybox around the glass, or the visleaf issue was causing visibility errors like in the first screenshot when you would look at it from the pond. I have a feeling that even if I textured the outside again and moved the skybox away from the glass, I'd still get visleaf-related issues....but I'll give it a shot.

    I probably could just go the 3D skybox route and create a standard 2d skybox but in 3d without any props, then just surround the entire map in a giant cube of skybox.


    EDIT: There, solved the issue, though I need to go around retexturing certain things that I originally had nodraw'd as they were in the void. I surrounded the map with a giant skybox box spaced 32 units away from any edge of the map.

    However, I'm not a fan of this method as I think it may cause lower optimization quality in the long run, so I'm gonna keep at it until I figure out how to make it work right.
     
    Last edited: Aug 25, 2015
  11. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    951
    Positive Ratings:
    937
    Try to make sure that all sides of a brush are toolsskybox(2d) or else there can be tiny problems with lighting. It's weird, it's rare, and probably nobody here knows what I'm talking about but it is real.
    The thing is just that nodraw doesn't let light pass. So if you ever experience a problem with your outside lighting, that might be why.
     
  12. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    59
    Aha! Figured out how to make it work.

    I made an 8 unit wide wall of skybox surrounding the glass ceiling, then around the pond area, I made another 8 unit wide wall of skybox tall enough to reach the top of the glass ceiling (because the skybox likes to cut off the players view of things).

    I even lowered the portal optimization % on compile from 0.25% to 0.12%
    http://i.imgur.com/5MXv9GKl.jpg

    The fence surrounding my pond area is 32 units wide, so I made the skybox around the pond 8 wide as well and just pushed the skybox wall to the edge of the fence.
    http://i.imgur.com/llVV1J1l.jpg

    Because the pond area is wider than the ceiling, I had to do some fancy cornering, and because there was a void gap between the pond and the central area, I covered it up with an 8 unit high "floor" for the time being until I put something more permanent there (probably an admin-only walkway)
    http://i.imgur.com/Hlgtdea.jpg

    I'm also happy to report that after years of using Hammer I just today learned how to properly use the clipping tool, and I've been going around my map changing all the corners from what you see in the first image to what you see in the second image.
    http://i.imgur.com/vZZlirZ.jpg http://i.imgur.com/FZFaoo9.jpg
     
  13. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    836
    Congrats on all that stuff you showed in the screenshots. And grats on learning how to use the vertex editing tool (not clipping tool) to make the corners of brushes meet up like that, but you needn't bother if the exposed edges are in the void. They get culled when the map is compiled.

    However that technique is useful for internal geometry sometimes because it can neaten up portals and fix lightmap issues.

    Don't concern yourself with portal efficiency too much in such a simple area. If you start watching the numbers like that you might do silly things to get it down, and harm visibility optimisation in the process. Visleaves are your friend. The more you have (within reason) then the more the map can be segmented up and limited in the player's rendered view.

    Just a thought for you to go on with: If you want to use area portals to divide the spaces between your rooms, say you put one in the tunnel, there, which is good practice, then you'll probably need to put one in your sky light brushwork (the glass stuff in that big room) to seal that room from your 'pond room'. Simplest way to do that would be to make a horizontal area portal just below your sky light brushwork. For an example of a use of a horizontal area portal in a Valve map, check the 'courtyard' area in either team's base in 2fort.

    And following on from what Tumbolisu said about texturing all sides of a skybox brush with the skybox texture: When you build your map, you needn't bother nodrawing any faces that are in the void, because they will be culled during compile. If you build a room out of dev textured brushes, or concrete or wood or something, then the brush will have your choice of texture on all its faces. But you can safely ignore the faces that are in the void, or covered entirely by other world brush faces, because of the culling done by VBSP that will get rid of them. Try it out in Hammer by making a test world composed of fully-textured world brush faces. You can even go further by putting in internal world brush walls, and flying around your compiled map in TF2 using noclip, to see which faces have disappeared.
     
    • Thanks Thanks x 1
  14. 404UNF

    404UNF No longer a "TF2 Beta/Cut Content Historian".

    Messages:
    228
    Positive Ratings:
    59
    Funny, I hovered over the button I've been using and it said "Clipping tool". And yeah, I've been doing the "make brushes completely textured with nodraw and then texture the visible faces" thing as well. I actually went through my map which I already half-textured, selected every brush and applied nodraw to everything, then re-textured the visible faces.

    I've been using Hammer for years and I'm just now starting to pick up all these little things I should've been doing from the start.

    And thanks for all the other tips too :D
     
  15. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    836
    No worries. Sorry if I sounded dictatorial at all, there.

    In case of any misunderstanding between us, the clipping tool is the one you use to cut brushes along a line, like slicing them up. The vertex editing tool is, as I'm sure you understand, the one that lets you move the corners around. Looking at your screenshots, it seemed to me it was the latter you were using. I recommend learning the keyboard shortcuts for them, because it makes it much quicker and you feel pro B-) (why don't we have any sunglasses emoticons?). Oh I just realised I can do this :vertextool: and this :clippingtool: What fun!

    Some folks prefer to make their brushes all in NODRAW first and then texture them later. It provides that peace of mind that if ever there was a hidden face, it wouldn't get rendered. The downsides to this are that it can be harder to make things out in the 3D viewport because the texture is a bit noisy compared with dev faces, and the author must take the time to texture the visible faces in the map during alpha stage before they can compile for play testing. Some map authors like to build their map in dev textures, and when it's fully detailed, do a find+replace to change any remaining dev faces to NODRAW. Others like to keep the dev faces in, so that there is less chance of players being able to see through brushes in-game, and by flying around the world you can spot problems with misaligned brushes or pockets of unplayable space, if you see a dev texture. If you understand how VBSP face culling works, you can build things with it in mind, to make the whole process more efficient.
     
    • Thanks Thanks x 1
  16. Zed

    aa Zed Certified Most Crunk™

    Messages:
    1,249
    Positive Ratings:
    1,015
    This is why we need :b1: