[Solved]Shaded objects in Tutorial 8

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
Lunacore
Posts: 18
Joined: Sun May 30, 2010 4:01 pm
Location: Berlin (Germany)

[Solved]Shaded objects in Tutorial 8

Post by Lunacore »

I read the tutorial 8 about shadows and try to use it on my own. But something is different:

Image
Picture above shows dwarf.x and player.ms3d

While the lightnode is behind both, the dwarf is getting a little bit darker in front, but my Player and all other objects gets black on non lighted sides.
I put the same texturefile from the dwarf on my Player, but it's still the same problem. How could it be and how can I change it, so the Player gets only darker, but not black?

Code: Select all

//Code for import both
IAnimatedMesh* MeshModel0 = smgr->getMesh("./media/player.ms3d");
MeshModel0->setMaterialFlag(video::EMF_NORMALIZE_NORMALS ,true ); //Doesn't change anything
Player[0] = smgr->addAnimatedMeshSceneNode(MeshModel0); 

IAnimatedMesh* MeshModel5=smgr->getMesh("./media/dwarf.x");
Player[1] = smgr->addAnimatedMeshSceneNode(MeshModel5);
The code is still the same, so what's the different? What is particularly on dwarf.x?

€dit:
After some trying i get the problem. I have to put the emissive color lighter in my model designer. Now, i gets only a little bit darker.
What a fault by me... :?
jibblesmgee
Posts: 42
Joined: Thu Jan 06, 2011 9:12 am

Post by jibblesmgee »

there must be more code refering to the dwarf. I think it's
->setShadowColor(something,0,0,0);
whereas, your node doesn't add any alpha to the color so it's just black

something = a value greater than 0 and less than 255 by the way
[edit] lol, I missed the SColor Identifier, should be
setShadowColor(SColor(something,0,0,0));

my bad dude
Post Reply