Bone blending

Posted By: picoder

Bone blending - 01/27/10 17:30

Hi,

* ent_blend function works only for "my" entity. If you add Entity parameter to this function, we can use it for other entities.
Code:
ent_blend (ENTITY* entity, STRING* scene, var anim_percent, var blend_percent);



* When ent_blendpose function interpolates between 2 different bones pose, it use only vertex positions of mesh.
Optionally, ent_blendpose can use bones angles rather than vertex positions for blending. Because, it might cause some problems.

For example, I attached a sword to hand bone of my character. (by vec_for_bone and ang_for_bone functions)
When I use ent_animate function for my character, sword moves always in hand of my character.
But when I use ent_blendpose function, sword doesn't move exactly in hand of my character.

Thanks
Posted By: Rei_Ayanami

Re: Bone blending - 01/27/10 17:33

For the first, i already mentioned that, but my response was:

set the entity to me.*

for the other, don't kmow
Posted By: jcl

Re: Bone blending - 01/28/10 17:10

The first wish can be easily fulfilled, the second is not so easy.

Bones are not angles but transformation matrices. They interpolate linear, not along a curved line. There are mathematical tricks for overcoming this, but they only work when bones don't have any scaling or translation. In short, it would be a lot of work with many restrictions and has to wait for a future engine version.
Posted By: Helghast

Re: Bone blending - 01/28/10 18:41

that first one would be nice.
But how does that handle with external animations from a different file?
anything on that, because last time i tried (a quick test, so i might've done wrong as well) that didnt work with the current ent_blend.
Maybe we need an ent_blendfrom as well?

regards,
Posted By: jcl

Re: Bone blending - 01/29/10 08:10

The function will be named ent_blendframe and will use two entity pointers for the animation target and source.
Posted By: picoder

Re: Bone blending - 02/03/10 13:28

Thanks jcl for this quick update
© 2024 lite-C Forums