animation in jitter opengl?

Tilgino's icon

hi,

as i know it is not possible to play animations in jitter, if yes please correct me.

so a workaround-idea for my thing:
i want to animate a running horse...
so i would build it with 3 different horse models (obj) with 3 differnt poses of runningmovement (legs) each 50 mls the model should swap so i would have the effect of running...
like the principle of a gifanimation, just for 3d...

the resulting object which consists of 3 subobjects should be handled at 1 object for further processing...

whats the best solution and combination of objects for this...

some tipps would be great
greets
peter

bertrand's icon

Hello,

You can create one obj file for each key frame (pose).

And in jitter you load each of them into different jit.gl.model

Then you display them (swap) in correct order ( I'm using "enable 1" or
"enable 0" for that purpose), and with the correct timing.

the objects that are not drawn are not charging the GPU (well I don't know,
but it looks like they don't)

I'm curently using it up to 100 different object, but you can have some
more...

Bertrand

lists@lowfrequency.or's icon

you could also probably use @matrixoutput 1 on 2 jit.gl.model objects,
send each into a jit.xfade object, and then send the output into
jit.render. that would give you a more fluid transition between the
two animation poses, but might give some odd results depending on the
degree of motion.

-evan

vade's icon

an even better way, is to load one model file, but make it such that
each 'frame' is a groupID in a .obj file.

you can do this with programs such as Wings3D (free and opensource).

thus you only need to load one model. you can look at the
jit.gl.model helpfile for an example of this (load mushrooms.obj),
which has different groups.

I am using this functionality to make 'keyframe' style animations.
its basic, but it works.

v a d e //

www.vade.info
abstrakt.vade.info

I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I
LIVE! I LIVE! I LIVE! I LIVE!

You will not be saved by the Holy Ghost. You will not be saved by the
God Plutonium.

In fact, YOU WILL NOT BE SAVED!

vade's icon

note:

you can only use this technique if the number of vertices on your two
models with matrix_output 1 are the same.

jit.xfade can only deal with matrixes that have the same dimensions.
making models with the same num. of verts is a pain.

at least, as far as I can tell this is true, as Ive tried doing it
and gotten errors.

just FYI.

v a d e //

www.vade.info
abstrakt.vade.info

I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I
LIVE! I LIVE! I LIVE! I LIVE!

You will not be saved by the Holy Ghost. You will not be saved by the
God Plutonium.

In fact, YOU WILL NOT BE SAVED!