View Full Version : help with Fake spring !!
06 June 2008, 05:33 AM
iīll try to achive a quick "Fake Spring", starting here.
Ppos = $Pt_lookAt_end.pos.controller.Zero_Pos_XYZ.controller
at time (F - 1)
06 June 2008, 05:52 PM
iīm looking inside on Transform Delay Script : http://forums.cgsociety.org/showthread.php?f=98&t=344485&highlight=delay+position
Yellow box (script from Transform Delay Script):
at time(F-1) Sphereoffset =$Box01.pos - [0,0,0]
mypos=[-20,0,0] + Sphereoffset
at time(F-1) mymy = $Box01.transform
mymy.pos = mypos
Blue box (position script) :
at time (currentTime-1)
dragPos = $Box01.pos.controller.Zero_Pos_XYZ.value
Red Box as master, just animate.
work well in objects independents, wich have no Hierarquy......when inside a chain, totally falls apart and guess it happen double tramsforms.....Oo
perhaps the MASTER must be outside of hierarquy....
06 June 2008, 04:39 AM
NOT REALTIME, but update when changing time slider...
animate the "Dummy" to get the effect....
06 June 2008, 01:19 AM
i couldnīt think how to get the "fake" when you drives only the "MASTER dummy" (parent of entire chain)........
guess dependsOn can do this, but iīm tring to avoid it....
06 June 2008, 01:31 AM
anyone can help me how to write variables of OldPos and NewPos ???
OldPos = [0,0,0]
at time (currentTime - 5)
AnimObj = $.pos.value
AnimObj - OldPos
i just couldnīt think how to force objects to back to standard pose after some frames of animated point stops......
06 June 2008, 12:30 AM
Here is an example of constrain transforms, it's something i dont really see people doing here - but its great for facial animation etc.
first store the transform space of the target 'point03' relative to its constraining objects,
tm1 = $point03.transform * inverse $Point02.transform
tm2 = $point03.transform * inverse $Point01.transform
Once these are store, keep them as a constant. For this test just comment them out as they've become a global. But for real use a CA to store these.
Then make a viable for your blend,
t = 0.5
Then we make two new variables holding the transform space multiplications.
nm1 = tm1 * $Point02.transform
nm2 = tm2 * $Point01.transform
We then grab the blend of positions of these spaces,
pm = ((1 - t) * nm1.pos + t * nm2.pos)
And then the rotation,
rm = slerp nm1.rotation nm2.rotation t
We build a final matrix using the rotation,
fm = rm as matrix3
and amend the last row using the position 'pm',
fm.row4 = pm
This is final transform for our point,
$point03.transform = fm
06 June 2008, 12:30 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.