Shadows through masked material problem. I have a poly plane with a material that is masked… a spot light aims through it to cast shadows… works fine with dynamic light, but building as a static mesh gives odd terrible results. See the screenshots… what is wrong here?
Here is what happens when i lower the source radius… so i can make the mask sharper except the shadow on the edges doesnt cast quite right… u see it still is a round circle with the spotlight… even though it should be boxed out because the spot light extends past the masked invisible part… so what gives?
Hey kurylo3d,
So looking at your image, I believe you might have a bit of misconception on how static lighting works. Firstly, if you want the masked material to cast a clean shadow on the ground, you will want to pull the light source away from the plane. The next thing you will want to fix is the source radius, because although this will soften your shadows when set at the right value, you are aiming for crisp shadows, so that will produce the opposite effect.
The final and probably most important thing you need to remember when using Static lighting, is that everything is going to be baked into a lightmap/shadowmap. Therefore, you want to make sure the lightmap resolution of your object receiving the shadow from the light source (in this case, the floor) has a high enough resolution to produce a crisp shadow.
See the below image from my example and notice the differences between a low resolution lightmap/shadowmap and a high resolution one.
Low Lightmap Resolution Surface (64)
High Lightmap Resolution Surface (512)
Let me know if you have further questions or need additional assistance.
Cheers,
Actually none of these were really the issue.
You see for whatever reason the source radius was actually causing hte problem… and what i mean by the problem i dont so much mean the blurry boxes from the mask… i mean the light that extended past the geometry even though the geometry should have been covering up the edge of the “cone” of the spot light… as in the cone never went past the edge of the geometry and yet light was still being cast outside that … when i set the source radius of hte light to 1 the problem wasnt there… which basically means for whatever odd reason the cone must extend itself past its visual representation if u put the source radius higher… or something along those lines…