|
It's like this problem: http://answers.unity3d.com/questions/14070/light-goes-through-terrain-help.html But I'll explain a bit more.. I have in the middle of my level an sphere. (I rotate this sphere (Deltatime)) This sphere has an point light added as a child with an very big range (so it actually simulates the sun). My problem is.. when it's "night" (the sun is UNDER the level), everything gets lit from beneath.. so the light penetrates every object.. The answer in that topic said something about realtime shadows in the pro version, Where do I find this or use this (I got the pro version) as i'm making an minecraft clone (To test my coding skills) and every block gets lit from beneath or sides when the sun is setting or down... (even while in an closed chamber) edit: the lights have cast shadows enabled and i tried both hard and soft shadows also tried all 3 the rendering modes, forward, deferred and vertex, also every object has cast and receive shadows enabled...... nothing helped so far
(comments are locked)
|
|
A solution is to not use point lights, or maybe just changing the lights intensity. Example: A little something like that if I'm sure. it's not what i seek, as the light just (...)s up when it's "day" for example when you're in an house.. the floor is constantly lit from the directional light.. (also every other light) and when it's "night" the ceiling is lit.. i just need to stop light from penetrating objects...
Nov 25 '11 at 10:14 AM
Themperror
(comments are locked)
|

Why not just use a direction light and rotate it for the day/night cycle but when its down set it to turn the intensity down until it is off so it doesn't light stuff up from beneath?
Using a directional light simulates the sun much more accurately than a point light. And yes, light "penetrates" all objects (rather, other objects are ignored when doing lighting calculations); that's how realtime 3D works. Turn the light off when you don't want it to illuminate anything.
but its just plain stupid when your inside an CLOSED house (Minecraft) and then have 1 side of the wall fully lighted.. whether it be the floor,ceiling or wall... isn't there any work around for this? cause this sucks
That's how realtime 3D lighting works, "stupid" or not. Game dev is really just a bunch of smoke and mirrors, nothing works like it does in real life. If you have Pro you can use realtime shadows (but even they are added "on top" of the standard lighting), though that won't work in all cases. As I said, you can just turn the light off at night. It's a good idea to become familiar with how computers and 3D hardware work, so you know what the limitations are and how to work around them.