Model Lighting Problems

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
AlexL
Posts: 184
Joined: Tue Mar 02, 2004 6:06 pm
Location: Washington State

Model Lighting Problems

Post by AlexL »

I have two problems here, one of which being the lighting/shading of the sphere. I have a light souce that is 10feet behind and above it. It's shading it in blocks even though it isn't set to flat shading. If I move the light source around the shading still apears in blocks. The yellow color on the ball is also supposed to be the dominate yellow that is on the GUI iamges :( Below is the code that is being used to handle the mesh along with a screenshot of my problem.

Code: Select all

scene::IAnimatedMesh* playerNode = smgr -> getMesh("rb_player.3ds");
if (playerNode)
{
	scene::IAnimatedMeshSceneNode* playerMesh = smgr -> addAnimatedMeshSceneNode(playerNode);
	if (playerMesh)
	{
		playerMesh -> setMaterialTexture(0, driver -> getTexture("rb_tex.bmp"));
		playerMesh -> setPosition(core::vector3df(0,0,0));
		playerMesh -> setScale(core::vector3df(0.5f, 0.5f, 0.5f));
		playerMesh -> addShadowVolumeSceneNode();
	}
}
Image

The second problem is the frames per second, with so little on the screen I am only getting 20fps, but if I run either the TechDemo or the SpecialFX demo I'm getting 30fps :?
AlexL
Posts: 184
Joined: Tue Mar 02, 2004 6:06 pm
Location: Washington State

Post by AlexL »

Is anyone able to offer some help on this matter?
yin nadie
Posts: 43
Joined: Wed Mar 31, 2004 1:03 pm
Location: Seville, Spain
Contact:

Post by yin nadie »

I'm having a similar problem with the lighting. Could you post the source code you used to create the lights?
AlexL
Posts: 184
Joined: Tue Mar 02, 2004 6:06 pm
Location: Washington State

Post by AlexL »

I used this bit of code to make the light.

Code: Select all

scene::ISceneNode* lightNode = smgr -> addLightSceneNode(0, core::vector3df(-10.0f, 7.5f, 0.0f), video::SColorf(1.0f, 0.75f, 0.5f), 600.0f);
Post Reply