Directional light + normal maps?
Directional light + normal maps?
Simple question, seems like directional light doesn't work at all with normal or parallax maps, is this true or am I doing it wrong?
Ok, I've been lighting my scene with a yellow point light (sun) and a dim, blue directional light so you can see things that aren't facing the sun.
if I put a normal map on an object, the half that isn't facing the sun is pitch black.
I've been using the directional light because my scene is outer space, very large, with few sources of light. As far as I know, point light is the only thing that will work, not even ambient light shows.
Does anyone have any suggestions?
Edit: Erased my additional comments regarding bugs. They weren't bugs, I fixed my code.
Edit 2: I'm accomplishing "directional light on normal maps" by making a point light that is very far away, and moving it as the player moves, instead of messing with attenuation.
if I put a normal map on an object, the half that isn't facing the sun is pitch black.
I've been using the directional light because my scene is outer space, very large, with few sources of light. As far as I know, point light is the only thing that will work, not even ambient light shows.
Does anyone have any suggestions?
Edit: Erased my additional comments regarding bugs. They weren't bugs, I fixed my code.
Edit 2: I'm accomplishing "directional light on normal maps" by making a point light that is very far away, and moving it as the player moves, instead of messing with attenuation.
as soon as you'll rotate your planets (in OpenGL) you'll see that normapas dont react on rotation either. It iwill be as if day becomes night and the dark side of the moon will be lit, even though it faces away from sun...
There should be a ticket for this on the tracker already...
EDIT:
Apparently that has been fixed... happy happy joy joy !
http://sourceforge.net/tracker/?func=de ... tid=540676
There should be a ticket for this on the tracker already...
EDIT:
Apparently that has been fixed... happy happy joy joy !
http://sourceforge.net/tracker/?func=de ... tid=540676
Wow, I was *just* about to make a post with that exact bug. I had made a demo app and everything. Downloaded the latest code from SVN, and it works beautifully now. YAY IRRLICHT DEVS!!!!zillion42 wrote:as soon as you'll rotate your planets (in OpenGL) you'll see that normapas dont react on rotation either. It iwill be as if day becomes night and the dark side of the moon will be lit, even though it faces away from sun...
There should be a ticket for this on the tracker already...
EDIT:
Apparently that has been fixed... happy happy joy joy !
http://sourceforge.net/tracker/?func=de ... tid=540676
Regarding directional lights in shaders, the tracker item is here.