- Home /
preventing animation from tweening
i have a character that uses an animated bone exported from maya to animate its texture for facial aniamtions. I already have a script that gets the value from its position and animates the texture and all that hard stuff, the problem i am having is that between the point where the animation is exported from maya and its played in game, all my step curves (called constant curves in unity) are converted to flat curves and even when manually convert those curves back in the unity the values im getting from the bone position seem to be tweening again. Is there someway that i can set the animation to not tween at all, or do you have a better idea on how i can get texture position values from maya.
any help would be greatly appreciated, since i need to get this out to a client in 2 days, and will have to rework my pipeline if i cant get this to work.
thanks
ps. i tried setting the animation's import settings to compression off and baked and it doesnt make a difference.
Could you post your animation (or submit a bug with animation attached)? because const/linear curves should work on position (but not scale or rotation).
It appears that step values can be exported from maya, but with how our rigs are built and how we are loading the animations at runtime i couldn't really use step curves. It ended up beco$$anonymous$$g easier to build an xml file that holds the values and frames that texture changes occur and set those as animation events when we add the animations to the character, similar to what Vicenti recommended...
Answer by Loius · Oct 26, 2010 at 02:32 AM
Set frame 1 = position 1, frame 9 = position 1, frame 10 = position 2, etc
Basically just create your own step animation. It'll still tween between frame 9 and 10, but it should be much less noticable. You might could set your animation frame rate to extremely large number of frames per second to reduce that too. You can set animation frame rate in Blender, I know, and Unity respects its settings, but I don't know if there's an equivalent ability in Maya.]
the current animation im working with right now thats giving me the most problem is set like frame1 = (2,0) frame2 = (5,3) frame3 = (3,1) frame4 = (5,3) frame5 = (2,0), the problem being that im getting values between those animated frames that tells the code to snap to a different frame on the texture. So between frames one and two id get a couple of frames of values like (3,1),(4,2) making the animated frames look fluttery
What you might could try is setting animation["name"].speed = 0, then calculate the exact time of the frame you need and set the animation["name"].time = thatTime. That should get you the exact positions etc you're looking for.
Your answer
Follow this Question
Related Questions
Unity4.5 AnimationCurve - Is the property "_MainTex.rotation" valid ? 0 Answers
2d animation from texture 2 Answers
EDITOR: How to Change Animation Curve Colors 0 Answers
Texture not moving correctly 0 Answers
"getcurve" from a gameobject 0 Answers