x


very odd lighting in my scene

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 : alt text

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?

more ▼

asked May 28 '10 at 08:50 PM

aLucidWorld gravatar image

aLucidWorld
67 14 14 22

Where is the light? You have lens flare in front of the earth, but it appears to be illuminated from behind.

May 28 '10 at 09:05 PM Peter G

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

May 28 '10 at 09:09 PM aLucidWorld

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

May 28 '10 at 09:12 PM aLucidWorld

is it all objects or just that one moon? it might have been modeled oddly or has a different shader than the planet

May 29 '10 at 01:34 AM spinaljack
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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?

more ▼

answered May 29 '10 at 01:46 AM

GODLIKE gravatar image

GODLIKE
469 5 9 20

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)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x668
x427
x28
x13

asked: May 28 '10 at 08:50 PM

Seen: 1663 times

Last Updated: May 28 '10 at 08:50 PM