Lighting Problem

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
gavicus
Posts: 16
Joined: Fri Aug 25, 2006 2:19 pm

Lighting Problem

Post by gavicus »

I have a couple of .md2 models in my scene. I made these models using Blender.

I tried to place a light in my scene, but with or without the light, my models are full-bright and unaffected by any light I add.

I used the commands...
material.Lighting = true;
and
sceneNode->setMaterialFlag(EMF_LIGHTING, true);

...to no avail.

I'll post my code if asked to, but can anyone come up with an obvious mistake I'm making?
xtheagonyscenex
Posts: 131
Joined: Fri Jun 03, 2005 7:26 pm

Post by xtheagonyscenex »

you need to adjust the light it might be to close or to big so i would scale it down using

lightnode->setScale
just like a mesh and it might blackout then you know its just the light
also could i see the snippet of code for the light? :?:
"Held in Your arms but too far from my heart." "These thoughts will carry me through the darkest nights...while your eyes rest in mine."
"How quickly I forget that this is meaningless."
gavicus
Posts: 16
Joined: Fri Aug 25, 2006 2:19 pm

Post by gavicus »

ILightSceneNode* light = 0;
float radius = 100.0f;
light = smgr->addLightSceneNode( 0,core::vector3df(worldScale*1.2,0,0),video::SColorf(1,1,1,1),radius);
float ltScale = 1.0;
light->setScale(core::vector3df(ltScale,ltScale,ltScale));

I've used 1.0f to 1000.0f for radius and 1.0 to 100.0 for ltScale. I've even commented out the light entirely, and in any case, all my objects are full bright.
xtheagonyscenex
Posts: 131
Joined: Fri Jun 03, 2005 7:26 pm

Post by xtheagonyscenex »

your light radius is 100.0 float thats too big scale it to maybe 20 you should see a difference
"Held in Your arms but too far from my heart." "These thoughts will carry me through the darkest nights...while your eyes rest in mine."
"How quickly I forget that this is meaningless."
Post Reply