Page 1 of 1

Lighting Problem

Posted: Mon Oct 23, 2006 8:45 pm
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?

Posted: Mon Oct 23, 2006 8:50 pm
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? :?:

Posted: Mon Oct 23, 2006 11:34 pm
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.

Posted: Thu Oct 26, 2006 9:14 pm
by xtheagonyscenex
your light radius is 100.0 float thats too big scale it to maybe 20 you should see a difference