Hi folks,
I'm trying to get stencil shadows and my scene have normal maps applied to it.
I see that addShadowSceneNode() works only with AnimatedMeshSceneNodes, but if I create my objects with AnimatedMeshSceneNode I cannot have normal maps on them.
Is there any way to get shadows from objects which have normal-maps applied to them? (i.e. for nodes created with OctreeSceneNode or MeshSceneNode)
Thanks for any help.
/regards
shadows with normal-maps?
-
- Posts: 219
- Joined: Fri Feb 19, 2010 4:03 pm
- Location: Estonia
shadows with normal-maps?
to live, is natural; to die, is not!
-
- Posts: 39
- Joined: Mon Sep 06, 2010 5:09 pm
- Location: Italy
Not with standard irrlicht, because, as you've pointed out, you can use stencil buffer shadows only on AnimatedMeshSceneNodes, but for normal maps you need to create a mesh with tangent with createMeshWithTangents(), which requires an IMesh and that's incompatible with the addAnimatedMeshSceneNode() function.
But you could use this shader posted here:
http://irrlicht.sourceforge.net/phpBB2/ ... p+animated
It allows to apply normal maps to animated meshes and stencil buffer shadows (at least theorically).
EDIT:
Tried it and works perfectly.
But you could use this shader posted here:
http://irrlicht.sourceforge.net/phpBB2/ ... p+animated
It allows to apply normal maps to animated meshes and stencil buffer shadows (at least theorically).
EDIT:
Tried it and works perfectly.
-
- Posts: 219
- Joined: Fri Feb 19, 2010 4:03 pm
- Location: Estonia
Thanks RuggJack93, I had seen this before actually but pity it works only with OGL and I need a DX version. Sadly I'm a total noob when it comes to shaders so cant really do the conversion.RuggJack93 wrote:Not with standard irrlicht, because, as you've pointed out, you can use stencil buffer shadows only on AnimatedMeshSceneNodes, but for normal maps you need to create a mesh with tangent with createMeshWithTangents(), which requires an IMesh and that's incompatible with the addAnimatedMeshSceneNode() function.
But you could use this shader posted here:
http://irrlicht.sourceforge.net/phpBB2/ ... p+animated
It allows to apply normal maps to animated meshes and stencil buffer shadows (at least theorically).
EDIT:
Tried it and works perfectly.
Thanks for reminding me of it though. I've written into that thread and hoping someone could comeup with a DX version of it
cheers!
to live, is natural; to die, is not!