[Solved] Mesh Tangent and B3D Animation

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
almondega
Posts: 37
Joined: Sat Jun 21, 2008 2:14 am

[Solved] Mesh Tangent and B3D Animation

Post by almondega »

Hi, I was fallowing the per-pixel-light tutorial, and worked fine for static meshes.

Then, i tried to use this effect on Animated Meshes.. but it didn't work..
main problem is: createMeshWithTangents from meshManipulator only returns a IMesh, and I need a IAnimatedMesh

Ok, then i found another function in meshManipulador, called createAnimatedMesh

So, the current pipeline is:
mesh = createMeshWithTangents
animatedmesh = createAnimatedMesh(mesh)

but, the animations didn't work
the second param in createAnimatedMesh is the type of the animation, wicht can be:

Code: Select all

EAMT_UNKNOWN
EAMT_MD2
EAMT_MD3
EAMT_OBJ
EAMT_BSP
EAMT_3DS
EAMT_MY3D
EAMT_LMTS
EAMT_CSM
EAMT_OCT
EAMT_SKINNED
No B3D.. i tried some of these formats, but got some crashes..

The question is: how to use animated B3D models with tangents to get per-pixel-light effect?

Blender don't exports with tangents.. the only way is using meshManipulator..

edit
found two topics about bump/normal and animations
they say animated models cant have normal mapping effect, since the tangents needs to be recalculated every frame

but, i saw in another topic that the new version of animation in irrlicht supports it. am i right?

edit and solution
just navigating at the forum to see stuffs.. and i found the solution u_u
from: http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=36637

Code: Select all

IAnimatedMeshSceneNode heroMesh = smgr->getMesh(meshPath); 
((scene::ISkinnedMesh*)heroMesh)->convertMeshToTangents(); 
Post Reply