- I get input images handed to me that are 853x480. Presumably this is my 720x480 resolution of my motion project, re-scaled to give me a 16x9 frame size. (853/480 is the same as 1280x720). I'm confused, why isn't my input frame the same size as my output frame? Are Motion templates resolution-fixed (except for aspect ratio correction), and if so, how can I make my FxPlugs usable in FCP without having to create a template for every conceivable frame size?
I think you're seeing a bug here. The easiest solution is to make your templates at 1920x1080. All of the templates we ship are at this size and work properly for smaller frame sizes. It appears that when you make a smaller template and attempt to use it at a larger size, some bugs show up. (Feel free to file bugs on this.)
Okay I will try this.
This is a little tricky because we're trying to help you out so you don't have to do the math yourself. For 99% of developers this will help. For you guys, it probably is worse. But the secret is that if you're being asked to render frame n and you want frame n+1, ask for frame n+1 and you'll get the right thing, even though the 2 time bases are different. Behind the scenes we attempt to figure out what you're really asking for and give it to you.
As an example, you create a 1920x1080p30 template that's 10 seconds long in Motion with your effect applied. You bring it into FCPX and apply it to a 20 second interlaced clip. You'll get called to render with frame times like 0.0, 0.25, 0.5, 0.75, 1.0, etc. At time 0.25, you're actually getting the field at time 0.5 in the footage's local time base, but your plugin has no way of knowing that. So if you ask for frame 1.25 by calling the temporal API, you'll get the field at time 1.5 in the footage's local time base.
Woah, so if I ask for frame 1.25 when the current time is .25, I get the next frame in the input? What happens when I ask for frame 1.25 when I'm at frame 35? This automagical solution doesn't allow me to access particular frames on the timeline in a predictable way (and when we are retiming this is all-too-crucial). Is this automagical time adjustment algorithm documented anywhere? (keep reading my next statement below). - Similarly, if you guys do fps related conversion, I still need to get to the next frame of the input sequence in FCP, not the next supposed frame in the motion template based on its number of frames and fps.
I think what I wrote above should help. Does it?
Well, I see where you might think it helps.. Did you see my followup email that if I ask for time 7.0 of a 10:01 duration clip (301 frame, 29.97fps), I get anywhere from frame 72 to frame 42 returned to me depending on where I am on the timeline. So what you are doing to help is not anything I can count on, at least as far as you've explained it so far. Right now it seems you are trying to help us in a way that is not steady and reliable. Any chance you can post pseudo-code about what you are doing internally?
Note, we are considering changing this and giving you FCPX times in the future. We're trying to work out how difficult it will be to do that (more difficult than you'd think), and how badly that will mess up currently shipping plug-ins.
What would be helpful if you can't give us FCPX times, is to give us an FCP X time-step (like in AE) of the amount of time to the next time to render, adjusted of course for the duration differences. Then when I need frame N of the input, I can simply multiply by this time-step before I request an input frame.
Pete
|