PDA

View Full Version : animating a "non-animatable" parameter


Aearon
01-10-2005, 10:05 PM
Hi guys, i hope you can help me with this probably simple problem i have

what i need to do is animate the time offset on the point cache modifier, which doesn't have any controller on it and doesn't seem to be intended for animation

my first thought is to animate a slider manipulator, and write the value for every frame to the offset value. i basically need a bezier float animation on the offset parameter.

my first try was to put a custom attribute with a float script on the slider, and basically put the slider value on the start_time parameter of the point cache modifier on my object,. this solution seems very flaky though, and it only work in the viewport, not at rendertime or in a preview...

is there a smart and stable way to do to do this?

Wahooney
01-11-2005, 05:17 AM
Your best choice would be a scripted controller that relies on either another animated parameter or the current time to modify the Point Cache offset.

I'm not quite certain if anything else would work.

galagast
01-11-2005, 09:24 AM
i guess u cud try using this:
registerTimeCallback <fn>
then just run the script that wud change the offset of the pointcache..
:)

Aearon
01-11-2005, 10:59 AM
galagast i just tried your idea, i transfered a sphere's Z position onto another sphere... it works great in the viewport, but at rendertime or in an animation preview nothing happens :(

any other idea?

Aearon
01-11-2005, 11:34 AM
ok guys, found something...

in case anyone without maxscript knowledge (like me) needs something like this, here's the script

it now does a preRenderFrame callback, works great

macroscript rtimePtrans category:"Aearon Scripts"
(
callbacks.removescripts id:#ptrans

txt = "$Sphere02.modifiers[#Point_Cache].time = $Slider01.value\n"
callbacks.addscript #preRenderFrame txt id:#ptrans

)



macroscript rtimePtransOff category:"Aearon Scripts"
(
callbacks.removescripts id:#prans
)

Aearon
01-11-2005, 11:44 AM
and.... it still doesn't work on the renderfarm :cry:

i guess you need to register the script on every single machine.....

do you guys have any other ideas?

Aearon
01-11-2005, 04:38 PM
ok now it really does work, on the renderfarm as well

i now animate the point cache start time offset using the z-position on some dummies. i have 6 instances of a character, each with the same point cache on them, first following the original body, then getting 'left behind' on certain frames, and finally catching up with the main body again.

macroscript rtimePtrans category:"Aearon Scripts"
(
callbacks.removescripts id:#ptrans

txt = "$ron_body01.modifiers[#Point_Cache].time = $delayDummy01.pos.controller.Z_Position\n"
txt +="$ron_body02.modifiers[#Point_Cache].time = $delayDummy02.pos.controller.Z_Position\n"
txt +="$ron_body03.modifiers[#Point_Cache].time = $delayDummy03.pos.controller.Z_Position\n"
txt +="$ron_body04.modifiers[#Point_Cache].time = $delayDummy04.pos.controller.Z_Position\n"
txt +="$ron_body05.modifiers[#Point_Cache].time = $delayDummy05.pos.controller.Z_Position\n"
txt +="$ron_body06.modifiers[#Point_Cache].time = $delayDummy06.pos.controller.Z_Position\n"
callbacks.addscript #preRenderEval txt id:#ptrans persistent:true
)

macroscript rtimePtransOff category:"Aearon Scripts"
(
callbacks.removescripts id:#prans
)

CGTalk Moderation
01-20-2006, 10:00 AM
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.