Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

879706 Posts in 33001 Topics- by 24376 Members - Latest Member: xnothegame1

May 24, 2013, 05:58:42 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Linear interpolation with Matrices
Pages: [1]
Print
Author Topic: Linear interpolation with Matrices  (Read 340 times)
RedKnight
Level 0
***


View Profile
« on: April 24, 2012, 11:09:58 AM »

Currently working with 3d model animation(milkshape)
And I would like to store the joint keyframe's translation and Rotation into one Matrix

So I wonder if it is possible to interpolate (or linear interpolation) with matrices?

 Gomez

Logged
ThemsAllTook
Moderator
Level 8
******


Alex Diener


View Profile WWW
« Reply #1 on: April 24, 2012, 11:43:55 AM »

It'd be possible, but it's probably easier to store joint data as a vector and a quaternion, and interpolate those instead. Doing a simple linear interpolation on each field of the matrix isn't likely to give you the results you want. You might end up getting a quaternion out of each matrix's rotation components, interpolating those, and turning them back into a matrix anyway, so storing a quaternion per joint would actually save you a step.
Logged
zacaj
Level 3
***


void main()


View Profile WWW Email
« Reply #2 on: April 24, 2012, 12:09:51 PM »

Interpolating a transformation matrix will make the vertices move straight between the two matrices (no rotation).  Worked this out on paper when I was like 12 Smiley
Logged

My twitter: @zacaj_

Quote from: mcc
Well let's just take a look at this "getting started" page and see--
Quote
Download and install cmake
Noooooooo
RedKnight
Level 0
***


View Profile
« Reply #3 on: April 24, 2012, 01:23:59 PM »

oooooooh ok.
thanks.
but at least I think I can store the rotations as Quaternions.
Logged
zacaj
Level 3
***


void main()


View Profile WWW Email
« Reply #4 on: April 24, 2012, 01:25:17 PM »

yeah, just store a Quaternion and a XYZ position, much easier to interpolate
Logged

My twitter: @zacaj_

Quote from: mcc
Well let's just take a look at this "getting started" page and see--
Quote
Download and install cmake
Noooooooo
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic