Motion tweening, B3D

Blitz3D Forums/Blitz3D Programming/Motion tweening, B3D

Jeroen(Posted 2004) [#1]
Hi!

Am I right that B3D doesn't "motion tween" animations, like MD2's? I'd like to implement this, but Blitz seems to ignore the motion tween parameter


Bot Builder(Posted 2004) [#2]
I always thought anims might go a little wierd with render tweening... Anyway, yes, it probably doesn't adjust animation speed as all animation stuff is done in the updateworld command.


Jeroen(Posted 2004) [#3]
but, is it possible to get animation tweening with render tweening?


skidracer(Posted 2004) [#4]
I was thinking a bone per vertex approach may be plausible way of converting md2 to b3d, each vertex simply follows a motionpath which would be described by it's unique parent bone.


AntonyWells(Posted 2004) [#5]
I think a good approach would be automatic clustering of verts.

I.e for say animation 1, each vert generates a 'roadmap' of it's movement. Then group off verts that cross a threashold of similarity. (Say 90%)
Take this group, then average the roadmap of the verts applied to it, and then apply this to the overall limb.
Then any redudent verts are added to the group they most match, even if below the threashold..just to clean things up.

Won't be 100% perfect, but it should in theory(Unless I've had a brain shut down and can't see a glaring problem) work...


Jeroen(Posted 2004) [#6]
huh? I just want the animation to "tween" as described in the Animate command :)


scribbla(Posted 2004) [#7]
as far as i understand it the tween is for the change over between anim cycles

walk...tween...run

not walk1..tween...walk2..tween...and so on


jhocking(Posted 2004) [#8]
Could you be more specific than just saying "tween" again? What is it you want to do? Because the transition parameter (I assume that is what you are referring to) of the Animate command does as tiler describes, and it works great when I use it. That is, to smooth out transitions from one animation sequence to another you set the transition parameter greater than 0 (most of the time I use 3) when calling the Animate command to start a new animation.


Jeroen(Posted 2004) [#9]
sorry, yes, I haven't been too specific.
I mean: the transition parameter in Animate.

With all B3D files, whatever I type, seems to be ignored. It does not transide. Does this parameter only work with M2d's?


Bot Builder(Posted 2004) [#10]
They work with b3ds as well. try somthing like 10. you should be able to notice that. Note that it only does somthing if you transition animations


Rook Zimbabwe(Posted 2004) [#11]
This would be a great feature since every time I try to export my animated crossbow in MD2 I get a BONE... blah blah error! Works fine in b3d though!


Jeroen(Posted 2004) [#12]
still can't get it to work. I use bones.
Does the transition only work with a "non-bone" setup?


jhocking(Posted 2004) [#13]
I am using the transition feature right now on several skeletal animated b3d models. Could you post some code please? If it isn't working for you then you probably are making a mistake in the code.


Jeroen(Posted 2004) [#14]
Hi Jhocking,

First:
ANIM_WALK=1
ANIM_RUN=2
ANIM_BLAH=3
ANIM_SHOOT=4

ExtractAnimSeq p\entity, 190, 200    ; WALK, ID 1
ExtractAnimSeq p\entity, 190, 200    ; RUN, ID 2
ExtractAnimSeq p\entity, 190, 200    ; BLAH, ID 3
ExtractAnimSeq p\entity, 190, 200    ; SHOOT, ID 4
TRANSITION=10


and then later, from a not yet animating entity:

Animate p\entity, 3, 1, ANIM_SHOOT, TRANSITION


ANIM_SHOOT etc are constants to make it more readable.


scribbla(Posted 2004) [#15]
if thats your code from what i can make out you are grabbing the same frames for each cycle...or am i missing something

i use...
idle=ExtractAnimSeq(kid,1,30)
walk=ExtractAnimSeq(kid,33,69)
run=ExtractAnimSeq(kid,72,103)

Animate kid,-1,.4,walk,4
(play cycle backwards)


jhocking(Posted 2004) [#16]
That he's grabbing the same frames for each cycle shouldn't matter for the transition (although it certainly is odd.) Perhaps there is a problem with variable scope. Specifically, is TRANSITION within scope where you call the animate command? If not, it'll default to 0 and thus you won't have any transition.


Jeroen(Posted 2004) [#17]
I found the problem,

When setting the animation to 0 (off) I used speed 0.
The speed value, whatever the mode, should be 1 or higher.


gpete(Posted 2004) [#18]
Just a comment...in general...

With all the discussion of b3ds and animating and bones and such, is anyone willing to post a b3d with bones and example blitz code on animating it? I have Quill3d which doesn't quite have whats needed to animate and this is a major hurdle for a lot of us to understand.


scribbla(Posted 2004) [#19]
heres an early test model i did in lightwave converted to .b3d while learning.. its a bit dodgy but it may help

ZipFile!

note: if you want to grab any bones using findchild{}
then for some strange reason theres a space in front of the bone name$,i think its a lightwave problem...eg: "(space)bonename$"