ambient light

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
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

ambient light

Post by pera »

I have small issue with ambient light...

I want object to be pretty dark in absence of light, so I set ambient light to pretty low value, but then in the presence of really bright light source, shaded side of the object is pitch black, and I would want it to be pretty lighten all around.

Setting ambient value on material of the object in blender doesn't seem to have any effect in the game when exported as X format.
codetiger
Posts: 103
Joined: Wed May 02, 2012 9:24 am
Location: Chennai, India
Contact:

Re: ambient light

Post by codetiger »

I doubt if the material properties in blender are exported in .x format. Factors affecting the node's brightness: node Material ambient color, light ambient color, scene ambient color and the diffusion color in the node.
IrrNaCl - Irrlicht Port for Google Chrome Native Client - Demo

Iyan 3D - Make your own 3d animation using your iOS Device
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: ambient light

Post by ACE247 »

Try exporting static scene geometry as Obj maybe? Irrlicht supports it far better with regards to material parameters.
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

Re: ambient light

Post by pera »

There is material ambient color in X file, but I don't see it affect the node, its the same for value 1 and 0, just scene ambient light works.
Im using older irrlicht (1.6.1) so take that into consideration if investigating.

I really don't want to go through all the trouble with another mesh format :D
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: ambient light

Post by hybrid »

You need to be really careful what effect the light materials have. The material settings only define the interaction factor with the external lights. So AmbientColor setting will define the modulation that is applied on top of the ambient light. Thus, you have to enable light and have at least the ambient light set. However, ambient light modulation is handled differently in the usual case. I assume the the light mode used here is 'diffuse and ambient taken from vertex colors'. You can change the light color mode, though, and only get diffuse color from vertex colors. IIRC, the memeber is called ColorMaterial and uses the ECM_ enums.
Post Reply