createMeshWithTangents with animated meshes

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
Kernle 32DLL
Posts: 10
Joined: Thu Oct 21, 2010 9:18 pm

createMeshWithTangents with animated meshes

Post 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?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Which file format is your mesh stored in?
Kernle 32DLL
Posts: 10
Joined: Thu Oct 21, 2010 9:18 pm

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Kernle 32DLL
Posts: 10
Joined: Thu Oct 21, 2010 9:18 pm

Post 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
Post Reply