Hg's ns mapping tutorial #1
HanzGruber
Join Date: 2002-01-25 Member: 47Members
<div class="IPBDescription">Topic 1 - making nice shadows</div>If you already know how to do this - don't flame me...I just thought I'd help out those who don't <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
<span style='color:red'><span style='font-size:15pt;line-height:100%'><b><u>HG's NS Mapping Tutorials</b></u></span></span>
<span style='font-size:13pt;line-height:100%'><b>Topic #1 - Making nice shadows</b></span>
Something that has begun to bug me about the HL engine is how blurry it's shadows are. You've probably noticed that, for the most part, shadows in HL maps although well defined never really contain the detail of some other engines (more notably the Unreal Warfare engine). Not to mention, of course, the biggest problem is that entities do not allow the creation of shadows - they just let all the light pass through...
I was thinking about this today and came up with quite a clever (I think) way of making some nice shadows from the textures with transparency.
Now, we know that all light passes through entities onto whatever is in the path of the light. And we can't necessarily create brushes that have the complexity of the textures because that would eat too many valuable r_speeds. So we need a way to make the detail but not to impact the r_speeds.
It's really quite simple what we can do. And it is all in the texture we use.
Here's a picture to show you the final in game version. One with my technique, the other with the normal way of doing it...
In a little while I'll show you how I did it with a picture taken from Worldcraft. If someone can figure it out, by all means say it... <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
<span style='color:red'><span style='font-size:15pt;line-height:100%'><b><u>HG's NS Mapping Tutorials</b></u></span></span>
<span style='font-size:13pt;line-height:100%'><b>Topic #1 - Making nice shadows</b></span>
Something that has begun to bug me about the HL engine is how blurry it's shadows are. You've probably noticed that, for the most part, shadows in HL maps although well defined never really contain the detail of some other engines (more notably the Unreal Warfare engine). Not to mention, of course, the biggest problem is that entities do not allow the creation of shadows - they just let all the light pass through...
I was thinking about this today and came up with quite a clever (I think) way of making some nice shadows from the textures with transparency.
Now, we know that all light passes through entities onto whatever is in the path of the light. And we can't necessarily create brushes that have the complexity of the textures because that would eat too many valuable r_speeds. So we need a way to make the detail but not to impact the r_speeds.
It's really quite simple what we can do. And it is all in the texture we use.
Here's a picture to show you the final in game version. One with my technique, the other with the normal way of doing it...
In a little while I'll show you how I did it with a picture taken from Worldcraft. If someone can figure it out, by all means say it... <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
This discussion has been closed.
Comments
For those who can't work it out...
that blue is the null texture above the grate texture...
Don't forget to place a clip brush in the hole
The best part is that if you place it all correctly the commander doesn't see a thing. I use the null texture so much, on every entitiy that has faces you can't see I always make sure there is a null texture on. It is a really wonderful addition to NS mapping.
also this will block commander placement through the grating (it'll be invisible but the comm cant drop stuff through it, unless its made a func_illus or seethrough)
a more efficient and possibly easier alternative would be to just use an overlay texture on the ground and make the shadow have any geometry you want. the only trade off is that it doesnt cast shadows on models.
<img src="http://www.readyroom.org/ns_maps/tommyd/tanith_picture7_thumb.jpg" border="0">
I still believe it is a hell of a lot easier to do it this way than to create textures to overlay..Because, sure, if the shadow is to roll across one surface, that's fine, but what about across the floor and up a slightly curved wall ...using the overlay method becomes clumsy in this respect...
Of course, this still brings us back to good old commander... didn't think of that before....but doesn't mean you can't use this funky effect in other places <!--emo&;)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/wink.gif" border="0" valign="absmiddle" alt=';)'><!--endemo-->
As for making the null textured brushes into entities - that would kind of defeat the purpose...because then it would no longer block the light for the shadow <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
Unless you use the zhlt_lightflags property, then they do cast shadows <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
<!--EDIT|ChromeAngel|Oct. 20 2002,09:44-->
Turn off SmartEdit and add it manually
besides, the r_speeds would be terrible with a solid that has the detail of that grate...
/me doesn't mention that he was doing this months ago. <!--emo&:p--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/tounge.gif" border="0" valign="absmiddle" alt=':p'><!--endemo-->
<!--EDIT|KungFuSquirrel|Oct. 20 2002,09:47-->
It was built into one of the compile tools that came with NSTR2. If you use those null textured faces will be removed during compilation. I'm guessing you're still using the compile tools tha came with worldcraft.
Then ill use Nstr ones......
First, you have only one brush to worry about, on a flat surface. Whereas using null textures you have many more, even though you cannot see them, they are still there. Null brushes still add to the plane count and r speeds. Test it and you'll find out.
Using a texture is more beneficial for slower computers, because it doesn't have to perform extra rad calculations on a feature that can easily be replicated by a single texture. It produces the same effect, and in some ways is more realistic. A cheap way to make a "realtime" shadow of say a fan overhead is to put an additive animated texture below it. Rad cannot do this.
Its not as easily to screw up on. As KFS said, if you have any null brushes intersecting any world geometry, you'll get a the HOM effect. Which, obviously is bad. I don't need to tell you what the HOM effect does to framerates and r speeds (well, not neccissarily. In only some instances is there a real spike in either frame rates and r speeds, but still, frame rates and r speeds are decreased and increased, respectively, somewhat). Not only is it harder to screw up on, but its also easier to set up. With the overlay method, you have only one texture, one brush, to deal with. Whereas using the null brush way can get a little frustrating, trying to make the brushes line up to the texture(s). A n00b mapper could setup the overlay texture in a second, while it make take him/her a good bit of time to align the brushes and such to the texture that needs the lighting effect.
This is not meant as any kind of shootdown (although I'll admit: I am going to go on a tangent about this), but merely as a personal opinion. Take it as you like, dismiss it just as easily. I'm just here as a messenger (and a mapper obviously), so don't shoot me. <!--emo&::asrifle::--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/asrifle.gif" border="0" valign="absmiddle" alt='::asrifle::'><!--endemo--> <!--emo&:D--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/biggrin.gif" border="0" valign="absmiddle" alt=':D'><!--endemo-->
1. they add to the plane count, but not to r_speeds. Look in my screenies... 78 to 87... only reason there is a difference is because the angle I am looking at the hole... if it did add to r_speeds it would be more correct to see a figure 140+ bigger (I worked out the intersections for the side looking down and it was 140 polys on it's own)..
2. Using a texture is not more beneficial on slow computers. It's just another texture that has to be loaded into memory! As for having to make RAD calculations - surely you are joking aren't you? this is only done once when it is compiled... if anything, having the extra texture is more of a load on a slow computer than loading standard RAD PRE-calculated shadows.
3. Using a texture overlay is not at all more realistic because it does not light the players or the models correctly.
4. The example of the fan is a bit unfair because of course that is how we would do it for half-life if we were going to make an animated fan... HL doesn't support dynamic/animated rad calculations..
4b. HOM effect is easy to avoid. Have the brushes 1 unit away from all other world brushes. Simple. Problem solved.
5. You seems to neglect the fact you have to make the texture for the overlay. Unless there is some hidden resource of textures that I haven't heard about. You're looking at it from a skewed perspective, the overlay method requires just as much effort (if not more) in drawing up a new texture, putting it in a wad, making the overlay brush, converting to entity, setting parameters. The null texture method requries making brushes that match up with the texture.... thats it...
6. Overlay method requires an extra entity. Ask any mapper whether having extra entities lying around (when their map is almost finished and completely chockers with entities) is what they want (particularly with hl's limitation on visible entity counting).
7. Don't take this as an insult - but just as a friendly response that displays the truth <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
8. Zulu Alpha Zulu India / Denver Oscar Echo Sierra / November Oscar Tango / Oscar Whiskey November / Hotel Alpha November Zulu. Hotel Alpha November Zulu / Oscar Whiskey November Sierra / Zulu Alpha Zulu India.... so there...
There's a massive number of overlay textures and entities in Eclipse. Almost all lights are done as such, as well as wall-mounted computer screens. Yet despite the size of the map and the sheer number of lights and panels, the total brush entity count is well under 250. They're not that much if you use them right. <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
If your texture usage is below the 4 meg mark anyway, 1 texture won't make any sort of noticeable difference.
Keep in mind Ken used a very similar method in ns_nothing -- It nearly killed the map a couple times, if I'm not mistaken. /me prods ken in here to compare notes.
Using null texture brushes adds even more to the plane count than a single brush! This should be common sense, if not... seek help. Also, adding to the plane count adds to r speeds. This is a common fact. Although it may be small in size, it still adds to it. More so than a single brush anyways!
2.) You make NO sense here. That, and you proved my point. Compiling is PRECISELY what I'm talking about! Using brushes take MORE time to compile than a texture, because using a texture for an overlay... on the ground... does NOT take more time to compile a TON of null brushes overhead! IN FACT USING NULL BRUSHES TO CAST SHADOWS TAKES EVEN MORE TIME! OMG! IMAGINE THAT! Seriously here. Common sense. As for loading it into memory... I hope thats a joke, too. All textures are loaded into memory. Even all of those stupid null textures you have overhead. Not only are those loaded into memory, but you also have them adding to everything else. Multiplied by however many brushes you have. Whereas on the ground you have one brush. ONE BRUSH!
3.) What in the hell. RAD can't do this anyways, so whats your point?
4.) Duh. What do you think I am? A n00b mapper? Give me a break here. Of course I know that HL doesn't support dynamic shadows. Everyone knows that. You think I'm an idiot?
4b.) Duh. But that also adds to the plane count. Duh.
5.) Making the overlay texture is NOT hard at all. In fact, its easy. One can even do it in paint! And skewing it? What in the heck do you need to do that for? This is another joke, right? The "skewing" you're talking about happens in game. Do you think you have to make the texture from every possible angle that the player can view it? If you think so, then how come there are not MILLIONS of textures in the HL.wad file?
6.) Duh it requires an extra entity. But given the trade off, its a blessing. First off, it doesn't cut up the brush that its laying on, therefore not adding to r speeds. Remember, that if you add the null brushes overhead, the commander CANNOT deploy anything through it. Which becomes a royal pain in the rear. It makes more sense by this reason alone, to use an overlay texture than null brushes.
7.) Take this as you will. You are starting to annoy me, and insulting my intelligence just ticks me off.
No, you're right. I do not own you, because I have just PWNED you! I can list many more reasons than those. Just you see. Get me started again... /me puts up his fisticuffs.
Seriously, this is a new lil' mod ( or TC if you prefer...)
Lets not fight over the little details..While this is a HL base game, there are enough "n00b" questions to fill a few threads, I suggest you both busy yourself with answering them...
Hanz has been about here for a while, and seems always happy to help out teh n00bs with sensible answers for ( frequently) dumb questions, similarly, Zazi seems to know what he's on about..
They both seem to know what they are doing...my conclusion? There are different ways to go about things, why worry if someone prefers a diff technique to achieve the same ( or similar) effect..whatever suits the situation imo..
eg: if I was close to the max textures thing, I wouldn't suddenly decide to add 1.5 meg of texturelights or something.....
There may indeed be a "right way", but as everyone has different gear, why worry?
My PC for instance, doesn't mind a few extra polygons, but because of its n00b video card it hates textures...whatever works etc..( insert your cliche of choice..)
/me bitchslaps Sep.
Give peace a chance etc..
:slap :slap
/exit: hippymode
Edit: Kooom baaah Yaaaahhhhhhhhhh!!!!!!
1. I'm sorry, you are wrong. Adding to the plane count does not mean higher r_speeds.
The null textured brushes, whilst adding to the plane count - ARE NOT rendered so therefore do not add to the r_speeds.
KFS and anyone who knows anything about HL mapping can back me up here.
2. You obviously read me wrong after I read you wrong. I assumed you meant slow computer RUNNING the map. And it's a fact that a less powerful computer that has (assumption) less video ram will struggle with more textures. BECAUSE textures are stored (more often than not) in available video ram.
You were obviously talking about compiling, and that really isn't an issue because there are net facilities that will render the map for you if your computer is slow. So...besides, I thought we were talking about how it looks and how it runs...not how long it takes to compile.. compiling is 1% the issue here... not the 50% that you make out..
3. Erm...fire up half-life and walk under a light, see how your gun/stick/crowbar gets lighter as you get closer to the centre of the ambience.... a brush on the ground would not do that...unless there is some new wizz-bang version of hl..
4. Omg, please, get more defensive... I didn't say you were.. but you brought up an example where there is no other possibility but to use a brush. I was agreeing with you.
4b. Are you like 3 years old? can't you hold a mature conversation?
5. *sigh*...you are looking at THIS ISSUE from a skewed OR distorted perspective. I'm talking about how YOU are looking at things...
You were talking about how much effort there is to use the null textured brush technique and I was illustrating that there is equal or more effort required to make the new texture and so forth.
6. Null textured brushes don't cut anything because you have them 1 unit away from the other surfaces. Aside from that Entities still add to the r_speed count. they are still rendered they just don't cut the world brushes.
7. I'm starting to annoy you? Lol...you have taken a civil discussion and turned it into an argument... This is the first time I have seen you rear your ugly head in the mapping forum with all of your 77 posts and you are annoying me... believe me, I've been around this mod a lot longer than you - and you are going about the right way to earn yourself a "wanker" label amongst the regulars here.
As for your final statement. I'm not even going to worry about commenting on it, it's not worth the effort.
CHHElvis: you seem to know what you are talking about <!--emo&:)--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'><!--endemo-->
And also, Zazi, Hanz was just pointing out a few innacuracies in you statements, no need to get so riled up about it. A civil conversation need not turn into, well, what it has here.
This is a mature conversation. It got immature when YOU insult my intelligence and call me a n00b. THEN I take it personal. My God, you're just a n00b with an attitude. Thats all. I remember at least six or seven people in the chan last night saying the EXACT thing. Know your place, man. All I did was made a few corrections and you start insulting me. Whats this? <b>I</b> am the one who's three years old? Give me a break.
Use an invisible brush. Its basically the same thing. It still adds to the plane count. Which in turn add to r speeds. Read up on your mapping, and engine dynamics. Its true.
As for number three. I don't even know WHAT to say about that! Do you think I'm retarded again? What the hell?
Serioiusly... grrr... Time for ROTC. Hopefully I won't be as ###### off in a while as I am now. Have a good day. <!--emo&:D--><img src="http://www.natural-selection.org/iB_html/non-cgi/emoticons/biggrin.gif" border="0" valign="absmiddle" alt=':D'><!--endemo-->