Shadow for IMeshSceneNode

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
jkateva
Posts: 2
Joined: Wed May 13, 2009 8:32 pm

Shadow for IMeshSceneNode

Post by jkateva »

I'm wondering if it is possible to make a dynamic shadow for a IMeshSceneNode? I have following code, that initializes the mesh:

Code: Select all

scene::IMesh* karttu_mesh;
scene::IMeshSceneNode* karttu_node;

karttu_mesh = smgr->getMesh("res/karttu.3ds")->getMesh(0);
karttu_node = smgr->addMeshSceneNode(karttu_mesh);
karttu_node->setScale(core::vector3df(item_scale, item_scale, item_scale));
karttu_node->setVisible(true);
karttu_node->setMaterialFlag(video::EMF_LIGHTING, true);
karttu_node->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
karttu_node->setMaterialType(video::EMT_DETAIL_MAP);
So, how can I get a shadow for the moving mesh that is not animated?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

did you work through the tutorials already !?!?! :roll:
yeah, of course you did, that's why you didn't see tutorial #08.SpecialFX, right ??? :twisted:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Sorry to state the obvious Acki, but stencil shadow method is only possible with animated mesh scene nodes.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

For now, the simple and unproblematic solution is to remove the getMesh(0) and just go on using animated mesh. There's no performance drawback implied. Better solutions have to wait for better shadows.
Hirte
Posts: 73
Joined: Sat Apr 01, 2006 1:32 pm

Post by Hirte »

Does that mean that you plan to improve shadows?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, that's definitely on the schedule, but no times yet fixed.
Post Reply