"baking" animated entity?

Blitz3D Forums/Blitz3D Programming/"baking" animated entity?

Gillissie(Posted 2007) [#1]
I have an boned animated entity. I would like to copy the entity at a particular frame of animation, but I don't want the bones and animation data in the copy.

In my particular example, when the character dies, I want to change the character entity into a non-animated mesh entity, but in the currently animated pose.

Does anyone know if this can be done?


Chroma(Posted 2007) [#2]
No idea man. Hopefully someone will help out. :(


Mortiis(Posted 2007) [#3]
Then why do you post Chroma? If everyone post messages like "I dunno" that would be a forum to see.

@Gillissie: Why do you want this effect? Will you freeze the enemies or will they turn to stone before death?


syntax(Posted 2007) [#4]
cant you just export a new file from the animating software as the last frame and place it at the exact same place the animated one was at and then delete the old animated one?


Ricky Smith(Posted 2007) [#5]
If you copy an animated entity it will always appear as the default pose - so no you can't.
However, it is not necessary - just use :
SetAnimTime(model,(AnimTime#(model,[anim_seq]))
to "freeze" the model to the current animation frame,[anim_seq].
You only need the anim_seq parameter if you are using extracted sequences i.e non-zero.


syntax(Posted 2007) [#6]
what i was suggesting is have two different files one animated and one not with the latter being in the same position as the final frame of the animated. load them seperately and hide the normal one till you need to place it.


Ricky Smith(Posted 2007) [#7]
That would work but its a lot more preparation, requires loading 2 models and you would have to determine beforehand which animation frame would be the frozen one. Using SetAnimTime() only requires one model and you could freeze the model at any frame - even a tween - which is important - beacause you can't be certain that the "death" will occur exactly at the predetermined frame - the model may be tweening when its kiiled i.e. between key frames. If it suddenly jumps to a static model based on a key frame there will be a noticable visual glitch.
It really depends on the requirements and what Todd actually wants to achieve.
I suppose it all depends on what you want to do with the frozen model once its ..er..frozen


syntax(Posted 2007) [#8]
oh. i thought he was wanting the model to animate a final death animation and after that, while he is dead on the ground, for the benifit of memory to get rid of all the animation data he would just have the model as a static.... model that is in the same position as the final frame of the animated one. kinda looked right over the whold FROZEN part there...


Gillissie(Posted 2007) [#9]
syntax is the closest to explaining what I was looking for. After the character has died and finished the death animation, the character Type is converted to a standard map entity Type, since it is just like another lifeless entity on the map at that point.

The original reason I was asking for this is because I wanted to do some mesh transformation stuff like MoveMesh, RotateMesh, etc. but that doesn't work properly on a boned mesh, since the bones are still affecting it.

In the end, I am using the final pose of the boned animation, but am not doing any mesh tranformation functions. Hopefully this will continue to satisfy my requirements.


Matty(Posted 2007) [#10]
Could you perhaps then have the death animation, in its final frame, as the first frame of the character's first animation sequence. Basically your 'default pose' for the model would be the death animation's final frame. So when you load it using loadmesh instead of loadanimmesh it will load in the default 'death' pose.


syntax(Posted 2007) [#11]
ok well i know using milkshape3d that what i suggested will work but it might not due to what you said about the bones still being effected in blitz3d. so first off: what animation software are you using?


Gillissie(Posted 2007) [#12]
I've been using Pacemaker for animation.

If Matty's idea works, that might be acceptable.

I have just come across another reason for doing this. Apparently, when your boned mesh is deformed into some pose other than the base pose, polygon pick mode is not accurate. It seems to be picking where the original poly's were, not where they currently are in the pose. Has anyone experienced this before?


Matty(Posted 2007) [#13]
That is correct, picking animated entities does so against the initial frame/default pose.

There is a slow way of getting around this which I've used although rather inefficient. That is to take a snapshot of the entity with another camera with the camera placed at the position the linepick starts from and pointing in the direction of the linepick (align to vector command is useful here), make your entity a color such as rgb 255,0,255 and check the pixel colour at the centre of the image captured with the camera render.