MAXkey tangent Y * 5.25!?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  11 November 2005
MAXkey tangent Y * 5.25!?

This is a weird one. I need to get the Y value of the tangents of my keyframes. For example:

I convert the outtangentweight from (a percentage of the way to the next key) to (an absolute X distance) by multiplying it by the difference in time from one key to the next.

Then, trig tells me that the tangent of the angle (outtangent) = Y/X. So I can find Y by multiplying outtangent * X, with me? But looking at the curve editor, and comparing the value, it's not right. It needs to be multiplied by roughly 5.25 and then it's about right. But I hate being "about right", and the weird part is that sometimes it's a bit more, sometimes a bit less. How does max define the Y value of a key tangent internally? Anyone know?

Maybe this snippet is more clear than my explanation:

  key1 = getKey $Sphere01.position.x_position.controller 1
  key2 = getKey $Sphere01.position.x_position.controller 2
  timedifference = key2.time - key1.time
  key1OutTangentY = key1.outtangent * (key1.outtangentlength * timedifference)
  key1OutTangentY *= 5.25  -- <-- Where does this come from?
-Jeff Gran
Lead Artist
Coccinella Development
My Online Portfolio

Last edited by Jboy : 11 November 2005 at 06:33 PM.
  11 November 2005
It's been a long time since I've used Max. You might want to look at some of my key manager/tangent smooth stuff in my smooth script I have on my site.

If I recall I think the tangent is the slope but as an ANGLE not as y/x. So I think it is in degrees. I may be wrong tho...
Michael B. Comet - - Code Monkey - Pixar Animation Studios
  11 November 2005
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 11:19 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.