|
I have setup a single directional light for a sun, a planet and two moons. The lighting works perfectly for the planet, but it's acting very strange for the moons. Here is a screenshot :
The lighting for the Earth is perfect, but the moon seems to have the complete opposite (shadow on completely wrong side). I have the 2nd moon (not shown in the image) set to orbit and rotate, but the moon in the shot is not moving (thought maybe that was causing the odd light effects for some reason). Is light being reflected off the planet or something?
(comments are locked)
|
|
I'd bet on a bad texture for normal maps. Also, in your screen from comment it looks like the moon is not being lighted at all. Did you put the right shader on it? I swapped textures and the lighting works.. no idea how the combination of a texture and a bump map could do that, but I don't know a whole lot about them and I downloaded both the texture and bump map files, so the creator must have set it up so that there is always a "dark side of the moon"
May 29 '10 at 11:53 PM
aLucidWorld
Normal maps can be very tricky... they can have inverted red and green channel and look a bit odd, but if they have wrong blue channel then you'll have ODD looking :D I can only suggest you to check around what type of configuration Unity uses and stick up to that (I think it's +X +Y +Z but don't take it for gold). To explain it easy, when you see the normal map in paint program: - cyan should be on top of elevated areas - light violet should be on right of elevated areas - blue should be on left of elevated areas - dark violet should be on bottom of elevated areas.
May 30 '10 at 12:54 AM
GODLIKE
Here, I added a simple Photoshop file with a layer that will reveal immediately to you if normal maps are ok for Unity. If after that layer it looks like light is coming from TOP-RIGHT then your normals should be ok, otherwise you have to invert one or two channels! http://dl.dropbox.com/u/858716/normal_map_revealer.psd
May 31 '10 at 04:29 PM
GODLIKE
(comments are locked)
|


Where is the light? You have lens flare in front of the earth, but it appears to be illuminated from behind.
from the camera that took the picture, if you travel through the earth and continue on for a pretty long distance you will reach the light... it is on the other side (light side) or the earth. the moon is about 100 times closer to the earth than it is the sun
here is the same scene with objects moved around.. as you can see the dark side of the moon is exactly 180 degrees from where it should be
http://www.epicarc.com/screenshot2.png
is it all objects or just that one moon? it might have been modeled oddly or has a different shader than the planet