wow, great tutorial youme
i just wonder, who is your go-to-guy if you run into problems? robin walker?
Code:forcetextureshadow models/props_gameplay/security_fence_big01.mdl forcetextureshadow models/props_gameplay/security_fence_big02.mdl forcetextureshadow models/props_gameplay/security_fence512.mdl forcetextureshadow models/props_gameplay/security_fence512_lower.mdl forcetextureshadow models/props_gameplay/security_fence512_skybox.mdl forcetextureshadow models/props_gameplay/security_fence256.mdl forcetextureshadow models/props_gameplay/security_fence32.mdl forcetextureshadow models/props_gameplay/security_fence64.mdl forcetextureshadow models/props_gameplay/security_fence64_lower.mdl forcetextureshadow models/props_gameplay/security_fence80.mdl forcetextureshadow models/props_gameplay/security_fence_section01.mdl forcetextureshadow models/props_gameplay/security_fence128.mdl forcetextureshadow models/props_gameplay/security_fence128_lower.mdl forcetextureshadow models/props_gameplay/security_fence256_gate01.mdl forcetextureshadow models/props_gameplay/security_fence256_gate02.mdl forcetextureshadow models/props_gameplay/security_fence256_lower.mdl forcetextureshadow models/props_farm/haypile001.mdl forcetextureshadow models/props_farm/tree001.mdl forcetextureshadow models/props_farm/tree001_skybox.mdl forcetextureshadow models/props_gameplay/door_grate001_bottom.mdl forcetextureshadow models/props_gameplay/door_grate001_top.mdl forcetextureshadow models/props_gameplay/door_grate002_bottom.mdl forcetextureshadow models/props_gameplay/door_grate002_top.mdl forcetextureshadow models/props_gameplay/door_grate003_bottom.mdl forcetextureshadow models/props_gameplay/door_grate003_top.mdl forcetextureshadow models/props_foliage/bramble001a.mdl forcetextureshadow models/props_foliage/bramble001a_skybox.mdl forcetextureshadow models/props_foliage/corn_plant01.mdl forcetextureshadow models/props_foliage/shrub_01a.mdl forcetextureshadow models/props_foliage/shrub_02a.mdl forcetextureshadow models/props_foliage/shrub_03_card.mdl forcetextureshadow models/props_foliage/shrub_03_card_skybox.mdl forcetextureshadow models/props_foliage/shrub_03_cluster.mdl forcetextureshadow models/props_foliage/shrub_03_cluster02.mdl forcetextureshadow models/props_foliage/shrub_03_cluster_skybox.mdl forcetextureshadow models/props_foliage/shrub_03a.mdl forcetextureshadow models/props_foliage/shrub_03b.mdl forcetextureshadow models/props_foliage/shrub_03c.mdl forcetextureshadow models/props_foliage/shrub_04a.mdl forcetextureshadow models/props_foliage/shrub_04b.mdl forcetextureshadow models/props_foliage/tree01.mdl forcetextureshadow models/props_foliage/tree02.mdl forcetextureshadow models/props_foliage/tree_pine01.mdl forcetextureshadow models/props_foliage/tree_pine01_4cluster.mdl forcetextureshadow models/props_foliage/tree_pine01_8cluster.mdl forcetextureshadow models/props_foliage/tree_pine01_8cluster.mdl forcetextureshadow models/props_forest/shrub_03_cluster.mdl forcetextureshadow models/props_forest/shrub_03b.mdl forcetextureshadow models/props_forest/shrub_03c.mdl
forcetextureshadow models/props_foliage/tree_pine_huge.mdl
forcetextureshadow models/props_foliage/tree_pine_small.mdl
forcetextureshadow models/props_foliage/tree_pine_extrasmall.mdl[B][/B]
Further explaination of -staticproplighting:
OK, so I've mocked up a little scene that might happen in any TF2 map, I've used the corrugated metal sheets because they illustrate what -staticproplighting does well because they have a high poly desnsity for their size as well as the fact they are a common problem for lighting and something people often get wrong when finding a fix.
My scene looks like this:
So here's what it looks like ingame, not very good is it?
So why does it look so terrible?
well, The two metal sheets on the sides are both facing outwards and lighting is taken from their origin. These two things combined makes sure they're black in this instance. The front one's origin is right behind the wooden beam so the light is being blocked, making it dark. The back one's origin is facing away from the light source and since it's only a one sided prop it gets no light on it.
So what can we do about it?
Well the first thing to do is to make sure all the origins are facing the lightsource so that they get light falling on them. Here it is again with the far sheet rotated 180 so the origin is facing the other way (you can tell in hammer which way it's facing because there is a little yellow line once you select the prop, the direction of that line tells you which way it's facing)
But you can see there that whilst we've fixed the back sheet the front sheet is still dark even though its origin is facing the light. We could use an info_lighting (info_target actually since info_lighting is broken) to 'move' it's origin so that it is in the light, but we can do one better than that.
In the first post there are three extra commands, -staticproppolys -staticproplighting and -textureshadows. The first and the last deal with taking shadows from the props exact outline rather than the collision mesh (great for props with no collision mesh like the payload tracks!) and taking shadows from props with alpha textures(great for chainlink fences). The middle one, -staticproplighting works out the lighting on props based on each vertex instead of the origin, so one side of a prop might be in light and lit nicely whilst the other side might have the light blocked to it so it will be dark.
Here is what it looks like with -staticproplighting on:
As you can see that looks much better because the metal sheets are now light where the light hits them and darker where the wood is blocking the light and casting shadows. Admittedly the resolution is a little low because the points at which lighting is done are fairly far apart and the dark patches are quite dark (that's because I don't have much ambient light in this scene) but I think you'll agree it looks much better than the first or second compile.
Here it is again showing the back of the front panel, it shows how the wood blocks the light from both sides of the sheet. and how the panel on the floor has a shadow across it in the same place the ground would if the metal sheet were not there.
This method will also help any props that have their origin embedded in geometry, since all the prop that is outside of the geometry will be lit properly - great for those large rocks which usually have their origin below a displacement.
I'm pretty sure valve uses this, they developed it in episode 2 to deal with the trees in the forest road sections. Thanks for the tut though, I'll have to finish a map first.
You'll find that as of the orange box, valve haven't once not-used it. THIS is the standard for the source engine yet, they just didn't make hammer do them by defult yet.
It's not enabled by default merely cause it's meant to be a finishing pass. If I had to sit through a static prop compile each time I compiled my map, I'd probably kill myself.