Directional light + normal maps?

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
squisher
Competition winner
Posts: 91
Joined: Sat May 17, 2008 2:23 am
Contact:

Directional light + normal maps?

Post by squisher »

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?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, correct. A bug ticket already exists, might be fixed in the future.
squisher
Competition winner
Posts: 91
Joined: Sat May 17, 2008 2:23 am
Contact:

Post by squisher »

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.
zillion42
Posts: 324
Joined: Wed Aug 29, 2007 12:32 am
Location: Hamburg, Germany

Post by zillion42 »

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
squisher
Competition winner
Posts: 91
Joined: Sat May 17, 2008 2:23 am
Contact:

Post by squisher »

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
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!!!!
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Regarding directional lights in shaders, the tracker item is here.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply