Irrlicht lighting model

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
s0rcer0r
Posts: 11
Joined: Wed Nov 03, 2004 10:48 pm
Location: Bucharest

Irrlicht lighting model

Post by s0rcer0r »

Hi
I'm having the following problem.
Right now I'm developing an application that has two parts: a scene editor and the real world application part for which I use as engine Irrlicht.
The development for the scene editor was started many time before we decided to use Irrlicht for the other part. The scene editor is done entireley in OpenGl and now is a little bit too complex ant too late to switch the rendering to Irrlicht in the editor. And here comex my problem with the lighting model...it seems that I'm not having a simmilar effect for the objects illuminated in the editor and in the engine where they appear more darkened. I use for the power/radius of the light the same method that I saw Irrlicht uses...the lineat attenuation which is the radius for the SLight in Irrlicht so I don't understand why I;m not getting the same effect. I messed with the Irrlicht source code but til' now I didn't find anything that seems to be done in another way for the lighting model...please anyone can help ?
I'm linking 2 pics to show the difference, the first one is in the scene editor and the second one is in Irrlicht.
http://193.231.143.252/irrlicht/pic1.jpg
http://193.231.143.252/irrlicht/pic2.jpg

Thanks
Guest

Post by Guest »

If you apply a gamma correction to the second picture of about 2.0, you get about the same result as with the first picture.
I don't know if the editor you're using uses gamma correction, but as far as I know, Irrlicht does not.
In any case, it looks like the light is being applied.

The object may be showing up so dark because the ambient lighting which is "black" by default, or because the light luminance is too low.
There's a difference between SColorf and SColor. The first uses values between 0 and 1 (which I presume is what you're using), the latter uses values between 0 and 255.
s0rcer0r
Posts: 11
Joined: Wed Nov 03, 2004 10:48 pm
Location: Bucharest

Post by s0rcer0r »

I use the same light luminance and ambient lighting values in both. I use also values between 0 and 1 in the editor and I use SColorf in Irrlicht.
Any idea ?
Post Reply