• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to change bezier interpolation to linear in .mdl file?

Status
Not open for further replies.
Level 8
Joined
Aug 2, 2006
Messages
346
Hi, whenever I export anything with the dexport script for gmax, it always tries to use bezier interpolation in my animation. But I have a special case where I NEED it to be purely linear. (I'm trying to make an elevator shaft by having textured walls move past the viewer, but that doesn't work if they keep slowing down and speeding up again!)
 
Level 8
Joined
Aug 2, 2006
Messages
346
Ah! I figured it out!

In the last few lines of code, change this:
Code:
Translation 2 {
		Bezier,
		0: { 0.0, 0.0, 0.0 },
			InTan { 0.0, -0.0100711, 230400.0 },
			OutTan { 0.0, -2.09815e-006, 48.0 },
		960: { 0.0, -1.04907e-005, 240.0 },
			InTan { 0.0, -8.39259e-006, 192.0 },
			OutTan { 0.0, 0.0100606, -230160.0 },
	}

to this:
Code:
Translation 2 {
		Linear,
		0: { 0.0, 0.0, 0.0 },
		960: { 0.0, 0.0, 240.0 },
	}
 
Are you sure you are using lastest version of dex?

Anyways, you can make a bezier act as linear in specific keys by making the tangents linear. It's simple: Select your bone/object and open the curve editor/track view, then select the keys, and click the button "make tangents linear", the button has a line and one point at the end.
 
Status
Not open for further replies.
Top