Notifications
Clear all

[Closed] animating a "non-animatable" parameter

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?

6 Replies

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.

i guess u cud try using this:
registerTimeCallback <fn>
then just run the script that wud change the offset of the pointcache…

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?

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
"
    callbacks.addscript #preRenderFrame txt id:#ptrans
    
  )
  
   
  
  macroscript rtimePtransOff category:"Aearon Scripts"
  (
    callbacks.removescripts id:#prans
  )

and… it still doesn’t work on the renderfarm

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

do you guys have any other ideas?

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
"
    txt +="$ron_body02.modifiers[#Point_Cache].time = $delayDummy02.pos.controller.Z_Position
"
    txt +="$ron_body03.modifiers[#Point_Cache].time = $delayDummy03.pos.controller.Z_Position
"
    txt +="$ron_body04.modifiers[#Point_Cache].time = $delayDummy04.pos.controller.Z_Position
"
    txt +="$ron_body05.modifiers[#Point_Cache].time = $delayDummy05.pos.controller.Z_Position
"
    txt +="$ron_body06.modifiers[#Point_Cache].time = $delayDummy06.pos.controller.Z_Position
"
    callbacks.addscript #preRenderEval txt id:#ptrans persistent:true
  )
  
  macroscript rtimePtransOff category:"Aearon Scripts"
  (
    callbacks.removescripts id:#prans
  )