Math for VSFX

Updated on March 1  2024

also Houdini Resources


 Overview (pictoral)


copyright © Deborah R. Fowler




Deborah R. Fowler



Start N Stop - Procedural Pause Animation

Posted March 3  2021
Updated May 12  2021 to include video
Updated May 21  2021 added creep example and link to sop solver method as well


Below is a method to procedurally pause an animation with a point wrangle. At the bottom of the page I have also implemented it with a creep sop. You can also use a sop solver. See hints for creep sop.




Also at https://www.youtube.com/watch?v=iX-idLh5J_A

A student was wanting to create the stop and start motion of an ice cream bar machine. Since key-framing is not allowed for this exercise, I created the following example. This will work for any animation where you want a stop and start curve.

https://www.youtube.com/watch?v=aUGixTpMWhc

What you really want is a function that look like this, where it rotates and then pauses, then continues to rotate, then pauses and repeats.

If we isolate the repetitive portion of the curve you can distinguish the static part (horizontal line) and the rising part (sloped line)

Suppose we call the frame range where it is horizontal, static and the sloped part, rising. It can be determined that this graph can be created using the following code - either pointwrangle or hscript as pictured below to achieve the animation seen in the gif.
The variable rate is just how many degrees it spins during the slopped phase. So in this example 15 frames are static, then 15 frames are rising. The reason I set static and rising in this example both to 15 and 15 is because of the speed of the mechanism coming down with the cookie layers.

@F - int(@F/period) * period is the portion of the graph at a specific frame in the sloped portion of the graph - think of it as the current position. If the frame is in the static range, the temp value is zero.

In the sloped portion the value (temp - static) is the red portion and (period - static) (or rising) is the green portion shown above - this will vary from zero to one - we then multiply by period.
The angle is the temp or "currrent" position times the rate/period + rate * int(@Frame/period)





Creep Sop Procedural Pause

This can be used with a creep sop as well. The key is to ensure your values are in numbers expected by the translate parameter. Otherwise the code is identical. The point wrangle is stand-alone (in Detail mode). The value of angle is referenced using a detail("../pointwranglePause","angle",0) and divided by 360 expression.




In addition, orientation vectors (tangentu, N, up) can be easily calculated by the code in either calcNormal1 or calcNormal2 - one does the next point, the other the previous point (seen below). See the orient to a curve section on the tips and tricks page as well.