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.
jkateva
Posts: 2 Joined: Wed May 13, 2009 8:32 pm
Post
by jkateva » Wed May 13, 2009 9:18 pm
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 » Thu May 14, 2009 2:42 am
did you work through the tutorials already !?!?!
yeah, of course you did, that's why you didn't see tutorial #08.SpecialFX, right ???
BlindSide
Admin
Posts: 2821 Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!
Post
by BlindSide » Thu May 14, 2009 5:29 am
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 » Thu May 14, 2009 7:47 am
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 » Tue Jun 02, 2009 10:00 am
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 » Tue Jun 02, 2009 3:48 pm
Yes, that's definitely on the schedule, but no times yet fixed.