Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tutorial for Mesh interpolation?

2 views
Skip to first unread message

BionicTuna

unread,
Dec 17, 2000, 10:36:46 PM12/17/00
to
Hello all, my college is having a "video game" class in which were going to
make simple 3-d games using a open-gl engine/wrapper a graduate student has
coded. I plan on having some models animated in the old quake method (a series
of different meshes cycled.)

I'd like for the engine to have the ability to interpolate between the meshes
to make the animation nice and smooth but I can't find any info on how to do it
(on the various open gl sites)
Any idea on where to look...(and it's it that difficult to implement)?

thanks for your time,

jw

Pablo de Heras Ciechomski

unread,
Dec 17, 2000, 11:26:16 PM12/17/00
to
If you have enough meshes linear interpolation should be sufficient. You
could ofcourse do a spline based solution just to impress :)

If you want to go a step further than mesh animation the biggest hypo factor
is bone animation. It will give you namedrops such as quaternions, inverse
transforms, parametrical animation... you name it.

/Pablo


BionicTuna

unread,
Dec 17, 2000, 11:59:39 PM12/17/00
to

I'm not going to be programming but rather doing the meshes. Bones would be
cool but it's really not neccessary for what we plan to do... any idea/links
how to do just plain' ol model interpolation?

thanks,
jw

Marcus Lindblom

unread,
Dec 18, 2000, 2:03:24 AM12/18/00
to

"BionicTuna" <bioni...@aol.com> wrote in message
news:20001217235939...@ng-fs1.aol.com..

> I'm not going to be programming but rather doing the meshes. Bones would
be
> cool but it's really not neccessary for what we plan to do... any
idea/links
> how to do just plain' ol model interpolation?

For plain ol model interpolation, just output a full mesh for each
animation frame. (quake stores animations with 10 fps IIRC)

How you do this with your modelling app is a whole other thing,
perhaps that is what you're asking.. if so, you're in the
wrong newsgroup.

/Marcus


Pablo de Heras Ciechomski

unread,
Dec 18, 2000, 9:15:58 AM12/18/00
to
You want a modeller? Take a look at

http://www.swissquake.ch/chumbalum-soft/index.html

It's a very small modeller/importer/exporter for the most used game model
animation formats. You could roll your own and check out how for example how
Half-Life did their models. I'm quite sure there is a MD2 exporter for quake
2 and even an MDL exporter for quake. There are very many models in
circulation. Pick one and modify it.

/Pablo


BionicTuna

unread,
Dec 18, 2000, 7:24:50 PM12/18/00
to
>
>You want a modeller? Take a look at
>
>http://www.swissquake.ch/chumbalum-soft/index.html
>
>It's a very small modeller/importer/exporter for the most used game model
>animation formats

I've used milkshape and it's pretty cool. What i'm asking about it how to code
the interpolation that smooths the transition from one say, "walk_01" mesh to
"walk_02" mesh. On the chumbalum site there's a MD2 viewer. When watching the
the model animation you toggle interpolation on and off. Without interpolation
it justs cycles throught the models embedded within the .md2. When you turn
interpolation on it smooths the animation out...kind've adds inbetween frames
on the fly...

sorry I haven't been able to explain myself better.

again thanks for your time,

jw

Pablo de Heras Ciechomski

unread,
Dec 19, 2000, 8:19:01 PM12/19/00
to
> >You want a modeller? Take a look at
> >
> >http://www.swissquake.ch/chumbalum-soft/index.html
> >
> >It's a very small modeller/importer/exporter for the most used game model
> >animation formats
>
> I've used milkshape and it's pretty cool. What i'm asking about it how to
code
> the interpolation that smooths the transition from one say, "walk_01" mesh
to
> "walk_02" mesh. On the chumbalum site there's a MD2 viewer. When watching
the
> the model animation you toggle interpolation on and off. Without
interpolation
> it justs cycles throught the models embedded within the .md2. When you
turn
> interpolation on it smooths the animation out...kind've adds inbetween
frames
> on the fly...
>

To quote myself

"If you have enough meshes linear interpolation should be sufficient"

Linear interpolation

0<=t<=1

v' interpolated value
va starting value
vb stop value

v'=va*(1-t)+vb*(t)

va is a vertex in mesh walk_01 lets say vertex with index 42
va=(vax,vay,vaz)
vb is a vertex in mesh walk_02 and it is also index 42
vb=(vbx,vby,vbz)

That is you interpolate on a straight line between vertex va and vertex vb.
Do this for every vertex in the mesh pair and you'll see how they walk from
one place to another in space. To get a full animation you simply do it for
every mesh pair.

At time t <MeshSamplingTime
walk_01->walk_02
At time MeshSamplingTime< t <MeshSamplingTime*2
walk_02->walk_03

I hope it is clear. There are many tutorials on this.
/Pablo


BionicTuna

unread,
Dec 20, 2000, 4:30:11 PM12/20/00
to
>That is you interpolate on a straight line between vertex va and vertex vb.
>Do this for every vertex in the mesh pair and you'll see how they walk from
>one place to another in space. To get a full animation you simply do it for
>every mesh pair.
>

>/Pablo

Wow, thanks alot! I couldn't find any tutorials on it..
Hopefully it shouldn't be too hard to implement.

Thanks again!

jw

Jeff Lander

unread,
Dec 29, 2000, 2:00:06 PM12/29/00
to
I have a demo of mesh vertex morphing in opengl on my website along with a
PDF article explaining the linear interpolation technique.

www.darwin3d.com/gamedev.htm

----------------------------------------------------------
Jeff Lander Game Technology Seminars
Darwin 3D Jan 30 - Feb 2, 2001
www.darwin3d.com www.techsem.com


"BionicTuna" <bioni...@aol.com> wrote in message

news:20001220163011...@ng-fe1.aol.com...

Jeff Lander

unread,
Dec 29, 2000, 2:07:37 PM12/29/00
to
Should have said specifically in the 1998 section at

http://www.darwin3d.com/gdm1998.htm#gdm1298

----------------------------------------------------------------------------


-----------
Jeff Lander Game Technology Seminars
Darwin 3D Jan 30 - Feb 2, 2001
www.darwin3d.com www.techsem.com

"Jeff Lander" <je...@techsem.com> wrote in message news:Wa536.472
$Dn1.2...@dfiatx1-snr1.gtei.net...

0 new messages