I've been trying to enable dynamic shadows on a model, and when I add the ShadowVolumeSceneNode, I get the following result:
The code I'm using to load the level and enable the lightning is the following:
scene::IAnimatedMesh* mesh;
mesh = smgr->getMesh("./data/scene.ms3d");
scene::IAnimatedMeshSceneNode*q3node = 0;
q3node = smgr->addAnimatedMeshSceneNode(mesh);
q3node->setMaterialType(video::EMT_SOLID);
q3node->setMaterialFlag(video::EMF_LIGHTING, true);
scene::ILightSceneNode* light1 =
smgr->addLightSceneNode(0, core::vector3df(0,0,0),
video::SColorf(1.0f, 1.0f, 1.0f, 0.0f), 500.0f);
I'm using ms3d (MilkShape) for the mesh and I'm unable to see what I've done wrong. Any suggestion?
Thanks in advance!
Dynamic shadows artifacts
-
- Posts: 33
- Joined: Sat Aug 05, 2006 9:46 pm
Wohoooo,
finally i am not alone.
take a look at this thread:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14952
i also posted it into the bugs forum but none seems to have this problem or none knows a fix.
finally i am not alone.
take a look at this thread:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=14952
i also posted it into the bugs forum but none seems to have this problem or none knows a fix.
under construction
I had already seen your post after using the search, but as I understand (my english is not very good), you only have this problem when you try to use dynamic shadows and parallax mapping at the same time.
I'm not using parallax mapping, and well, on your screenshot it seems there are some shadows rendered correctly.
In my scene, it's difficult to tell, but the lines that appear are the outlines of other parts of the mesh.
Any help?
Thanks
I'm not using parallax mapping, and well, on your screenshot it seems there are some shadows rendered correctly.
In my scene, it's difficult to tell, but the lines that appear are the outlines of other parts of the mesh.
Any help?
Thanks
After messing with the zfailmethod and other parameters, I've managed to get shadows to work in some instances:
First of all, I moved the light to another position, set the zfailmethod to false, and the infinity to 50000.0f.
As you can see, my scene is a building with some terrain. Using the parametrers I said before, when I'm outside the building, the shadows appear correctly, but as soon as I get inside the building, everything gets messed up... I'm unable to tell what I'm doing wrong... any help?
Thanks in advance!
First of all, I moved the light to another position, set the zfailmethod to false, and the infinity to 50000.0f.
As you can see, my scene is a building with some terrain. Using the parametrers I said before, when I'm outside the building, the shadows appear correctly, but as soon as I get inside the building, everything gets messed up... I'm unable to tell what I'm doing wrong... any help?
Thanks in advance!
I've checked it many times. The normals are correct, tomorrow I'll post a screenshot of the problem that will better explain the problem.
Here are the screenshots, sorry for the delay, I could not post them earlier:
This is when I'm far from any wall:
This happens when I get close to or inside the building:
Thanks!
Here are the screenshots, sorry for the delay, I could not post them earlier:
This is when I'm far from any wall:
This happens when I get close to or inside the building:
Thanks!