Really Dark Lighting

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
vroomhenderson
Posts: 6
Joined: Mon Jan 05, 2015 5:44 pm

Really Dark Lighting

Post by vroomhenderson »

So, all of my models are really dark. The sky is supposed to be a darker color, but I'd like to add some light to the maze so that people can actually see what they're navigating. Here's an image of what it looks like currently:
Image

As you can see, the models are visible, but can't be navigated without turning my screen brightness up to full. Here's what I've tried to solve the problem:
  • Adding a point light.
    Changing the ambient lighting (but it's already at the max).
    Disabling lighting for the maze node.
    Disabling stencil buffers.
I have Irrlicht running in OpenGL mode. I can post my code as needed. I've been stuck on this issue for a week or so and have gotten nowhere.

Thank you!
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Really Dark Lighting

Post by hendu »

Are irr examples also like that? If so, update your drivers.
vroomhenderson
Posts: 6
Joined: Mon Jan 05, 2015 5:44 pm

Re: Really Dark Lighting

Post by vroomhenderson »

The compiled irr examples look good. My drivers are up to date.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Really Dark Lighting

Post by mongoose7 »

It looks like a problem with your models. Your UVs look baa in any case, but this wouldn't account for the darkness. Check that your materials have diffuse set to white and maybe that the vertex colours are white.
vroomhenderson
Posts: 6
Joined: Mon Jan 05, 2015 5:44 pm

Re: Really Dark Lighting

Post by vroomhenderson »

Yeah... I really need to work on the UVs, but I need to actually be able to see the model first! :? I tried setting the material diffuse to white, but there was no effect. I'm not sure how to set the vertex colors.

I got point lights to work (but they're still pretty dim at full brightness.) Ambient lighting is even dimmer.

Code for ambient lighting:

Code: Select all

device->getSceneManager()->setAmbientLight(video::SColor(255,255,255,255));
Code for material diffuse:

Code: Select all

this->object->getMaterial(0).DiffuseColor.set(255,255,255,255);
Thank you for the help! I know this must sound pretty trivial.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Really Dark Lighting

Post by mongoose7 »

I think you have to set the ambient colour on the material as well. They are probably multiplied together.
vroomhenderson
Posts: 6
Joined: Mon Jan 05, 2015 5:44 pm

Re: Really Dark Lighting

Post by vroomhenderson »

Yep! That fixed the ambient lighting! Point lighting is still quite dim. Is there something that I might be forgetting to set with that? I can see the lighting effect with the point lighting, but even at full brightness, it's hard to see with ambient lighting off.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Really Dark Lighting

Post by mongoose7 »

Did you follow the advice in the header regarding radius and attenuation?
Post Reply