EntityBlend on Animated Mesh

Blitz3D Forums/Blitz3D Programming/EntityBlend on Animated Mesh

Scherererer(Posted 2009) [#1]
I have a mesh, which when I import into B3D as a static mesh (LoadMesh), I can use EntityBlend meshname, 3 (or 2 for that matter) on it just fine, however when I import it as LoadAnimMesh, EntityBlend has no effect. I opened up the sample for the LoadAnimMesh (which pulls from a .3ds file) and applied an entity blend to it, and that did not work either.

When I opened up the Dragon sample demo, which used an MD2, EntityBlend worked just fine on its animation.

Any ideas?.. I know my worst case scenario at this point is "find an MD2 exporter" for my animation software


Gabriel(Posted 2009) [#2]
When you load a mesh with LoadAnimMesh, a hierarchy of meshes is created, usually with a pivot as the parent of everything. The handle you get back from LoadAnimMesh actually points to the pivot in that instance, not the entity you got with LoadMesh.

If you want to get the handle of the entity, you'll need to use CountChildren() and GetChild() to recurse through, or you should be able to use FindChild() if you know the name of the entity. I think there is code in the archives which will recurse through the hierarchy of an animmesh, and print all the names out. So if you don't know it, you can probably find it with that. If memory serves, I think JFK wrote it.


Scherererer(Posted 2009) [#3]
Thank you very much! It's been a long time (years) since I've been around here, glad to see everyone's still kicking :)