[solved]color near light wrong

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
zprg
Competition winner
Posts: 30
Joined: Tue Jul 31, 2012 12:29 pm
Location: Germany

[solved]color near light wrong

Post by zprg »

Hello,
sounds like a question that comes often but i found no other thread:
in the near of the lightnode the colors are wrong - green is yellow, beige is white. whats the problem please?
Last edited by zprg on Sun Feb 24, 2013 1:43 pm, edited 1 time in total.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: color near light wrong

Post by Mel »

The normals of the objects seem to be being larger than 1 unit. Try Normalizing the normals of your meshes setting NormalizeNormals on the materials to true.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
zprg
Competition winner
Posts: 30
Joined: Tue Jul 31, 2012 12:29 pm
Location: Germany

Re: color near light wrong

Post by zprg »

@mel, thank you for reply!
i added

Code: Select all

node->getMaterial(0).NormalizeNormals=true;
but no change in the near of the lightnode the green is yellow, is this the correct command please?
zprg
Competition winner
Posts: 30
Joined: Tue Jul 31, 2012 12:29 pm
Location: Germany

Re: color near light wrong

Post by zprg »

and added

Code: Select all

testnode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS   , true);
also no change
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: color near light wrong

Post by Mel »

Then, check the intensity of the lights, maybe they are too bright?..
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply