I was trying to get shadows working in my game.
When I ran the Game with the shadow test the Shadow rendered in an exact 90 degree angle
What can cause this?
Shadow Troubles
Re: Shadow Troubles
No idea. Do you do anything special with the nodes? Also can you make a screenshot? (you can post it to imgur if you don't have a webserver)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
MilitantGolf
- Posts: 4
- Joined: Fri Dec 13, 2013 11:25 pm
Re: Shadow Troubles
Here is The node code Is there anything needed to render shadows?
This somehow renders the shadow inverted rotation from the mesh
Code: Select all
mesh = smgr->getMesh("Bin/swd.x");
if (!mesh)
{
device->drop();
return 1;
}
node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
auto sh = node->addShadowVolumeSceneNode();
//node->setMaterialType(E_MATERIAL_TYPE::EMT_SOLID);
node->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
node->setScale(vector3df(1,1,1));
auto ab = node->getPosition();
ab.Y += 10;
node->setPosition(ab);
node->setMaterialTexture( 0, driver->getTexture("Bin/swdtxt.png") );
smgr->setShadowColor(video::SColor(150,0,0,0));
}Re: Shadow Troubles
Can you try modifying example 08 and just replacing the dwarf by your model? Are the shadows then also inverted?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm