Page 1 of 1

createMeshWithTangents with animated meshes

Posted: Mon Oct 25, 2010 12:00 pm
by Kernle 32DLL
Hi there,

I have a specific question about the IAnimatedSceneMeshNode, and the IAnimatedMesh class. There is one major problem I have, concerning using Shaders with them. Is it possible to use the MeshManipulator->createMeshWithTangents() with animated Meshes somehow? I thought of using getMesh() to retrieve the frame meshes to use them with the function, but this seems rather slow for large animations, and impossible to re-implement the created meshes into the animation.

Alternatively, I thought of using the idea above (retrieving frame meshes and using the function on them), and writing a custom animation node for using an array of the new meshes. As I already have an animation system, I would only need to write the code for determination which mesh to show. Problem is, I would need to create an ISceneNode for every frame, which kind of defies their use, and hide/show the needed node.

Any ideas how to tame that beast?

So long,
Kernle

PS: The best way of course would be to make my meshes the way that I don't need to use the function above, but how the heck do I do that?

Posted: Mon Oct 25, 2010 3:48 pm
by hybrid
Which file format is your mesh stored in?

Posted: Mon Oct 25, 2010 8:40 pm
by Kernle 32DLL
Currently I used .x and .b3d files, but I'm not dead-set for one fileformat. I use Milkshape3D as my model program, since it's good for creating low-poly stuff and it exports into nearly any format.

Posted: Tue Oct 26, 2010 11:05 am
by hybrid
Hmm, looks as if this is indeed not that easily possible. The formats only use lightmap meshes, not tangent meshes. This might require something like the texture loading parameter mechanism. I.e. telling Irrlicht to load the next mesh with tangent vertices regardless of the actual data contained in the file.

Posted: Mon Nov 01, 2010 6:20 pm
by Kernle 32DLL
Whew, any hint how to do so? I'm not that familiar with Irrlicht yet, still getting used to it. Anyway, what format uses tangent meshes then? Google turned nothing useful up for me :/

Also, any comment on the way I described, splitting the animation into several meshes, and somehow sewing it into an animated mesh again?

By the way, reading you mentioning texture things, is there any way to prevent Irrlicht from automatically loading textures for meshes? As I use a custom animated texture system, this is wasted load time.

So long,
Kernle