[Sidefx-houdini-list] Did you know? Time vs. frames in animation tools

Andy Nicholas andy at andynicholas.com
Sat Apr 25 09:11:53 EDT 2009


Thanks for that Andrew, that explains a few oddities I experienced on a
past project.

Cheers

Andy



> Had to share this one - for anyone writing animation related tools:
>
> Time 0 = frame 1 in Houdini.
>
> Naive conversion from frame to time returns wrong answer:
>>>> 1392/24
> 58 seconds
>
> SESI supplied method returns correct result:
> hou.frameToTime(1392)
> 57.958332061767578 seconds
>
> See also:  hou.timeToFrame()
>
> ------
>
> This kind of ties in with the CHOPs and the clip format - where index =
> frame-1
> In a clip file, the start value is the start index - not the start frame.
> ie:
>
> eg. A clip file storing current frame number as data :
>
> {
>    rate = 24
>    start = 1000
>    tracklength = 3
>    tracks = 1
>    {
>       name = frameNumber
>       data = 1001.0 1002.0 1003.0}
>    }
>
> ------
>
> This has caused me headaches lately. Hopefully other will be spared now.
>
> Cheers
>
> --
> =======================================
> Andrew D Lyons | Digital Artist | http://www.tstex.com
> =======================================
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>





More information about the Sidefx-houdini-list mailing list