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?
Lighting Problem
-
- Posts: 131
- Joined: Fri Jun 03, 2005 7:26 pm
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?
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."
"How quickly I forget that this is meaningless."
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.
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.
-
- Posts: 131
- Joined: Fri Jun 03, 2005 7:26 pm