http://irrlicht.sourceforge.net/forum/v ... 50#p271250
Probably this is the proper subforum for this thread, so please delete older one.
I'm trying to use IAnimatedMesh to get shadows. As you now, this is not working so fast, but that is not my point (I hope, that this will be improved eventually).
I have some bug and don't know if it's my fault, or bug in engine.
This is SS
As you can see, there ale shadow lines from spheres.
How I add spheres:
Code: Select all
SAnimatedMesh * AMesh = new SAnimatedMesh();
AMesh->addMesh(irrScene->getGeometryCreator()->createSphereMesh(TRadius, 32, 32));
IAnimatedMeshSceneNode* Node = irrScene -> addAnimatedMeshSceneNode(AMesh);
Node->setMaterialFlag(video::EMF_BACK_FACE_CULLING, true);
Node->setMaterialFlag(EMF_LIGHTING, true);
Node->setMaterialFlag(EMF_NORMALIZE_NORMALS, true);
Node->setMaterialTexture(0, irrDriver->getTexture("rust0.jpg"));
Node->addShadowVolumeSceneNode();
Code: Select all
ILightSceneNode *light = irrScene->addLightSceneNode(0, vector3df(0,100,0), SColorf(1.0f, 0.6f, 0.7f, 1.0f), 500.0f);
if (light)
{
light->getLightData().Attenuation.set(0.f, 1.f/500.f, 0.f);
ISceneNodeAnimator* anim = irrScene->createFlyCircleAnimator(vector3df(0,150,0),250.0f);
if (anim)
{
light->addAnimator(anim);
anim->drop();
}
}
//Edit 1:
Boxes work fine.
I've already downloaded 1.7.3 and nightly rev 4288. I'll check them if there was and still is this problem.
//Edit 2:
For Irrlicht 1.7.3 it's working in proper way, but... It is so laggy. For 50k triangles it's barely working...
For Irrlicht rev 4288 it has this bug. But it's quite fast. About 70fps (I have ~95fps lock).
//Edit 3:
Last screen with all shadows turned on.