flame_channel_parser
DESCRIPTION:
Includes a small library for extracting, parsing and baking animation curves made on Discrodesk Floke/Inflinto, also known as flame. Thanks to Marijn Eken, Philippe Soeiro and Andre Gagnon for their support and advice.
FEATURES/PROBLEMS:
-
All extrapolation and interpolation methods are supported (yes two keyframes with tangents across 2000 frames will do!)
-
Expressions on channels won’t be evaluated (obviously!)
SYNOPSIS:
To just bake a specific channel, use the bake_flame_channel binary.
$bake_flame_channel --channel Timing/Timing -e 123 /usr/discreet/projects/BZO/timewarp/s02_tw.timewarp > /mnt/3d/curves/shot2_tw.framecurve.txt
If you just need to process a timewarp, use the bake_flame_timewarp which autodetects most of the settings by itself and gives you a nice .framecurve.txt file
$framecurve_from_flame /usr/discreet/projects/BZO/timewarp/s02_tw.timewarp
This will create a framecurve file called s02_tw.timewarp.framecurve.txt next to the setup
To use the library:
require "flame_channel_parser"
# Parse the setup into channels
channels = File.open("TW_Setup.timewarp") do | f |
FlameChannelParser.parse(f)
end
# Find the channel that we are interested in, in this case
# this is the "Timing" channel from any Timewarp setup
frame_channel = channels.find{|c| c.name == "Timing/Timing" }
# Grab the interpolator object for this channel.
interpolator = frame_channel.to_interpolator
# Now sample from frame 20 to frame 250.
# You can also sample at fractional frames if you want to.
(20..250).each do | frame_in_setup |
p interpolator.value_at(frame_in_setup)
end
REQUIREMENTS:
-
Ruby 1.8.6 and above
INSTALL:
-
gem install flame_channel_parser
LICENSE:
(The MIT License)
Copyright © 2011 Julik Tarkhanov
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.