Page 1 of 2

Improving the AS FBF workflow

Posted: Tue Feb 24, 2009 8:53 pm
by synthsin75
I've been think of this for quite some time, and since it's come up again, I thought I might seriously look into it. Just need some input.

There are only a few 'fixes' needed to improve the frame-by-frame workflow.

1. Onionskin is very needed for any serious FBF work. I think this can be done through the scripting interface.

2. In most FBF systems, each drawing (or layer in AS terms) is the same thing as a frame. So as you scrub the timeline, you are selecting through the layers, so to speak.

I think both of these are doable with scripting. The first would be done with a FBF tool, and the second a layer script you'd only need while creating the FBF. Now I don't want to get elaborate here. I just want to see about creating the bare minimum of tools needed to comfortably do FBF work.

If anyone can think of any other absolute bare minimums, I'll see if they are doable with scripting.

:wink:

Posted: Tue Feb 24, 2009 10:04 pm
by Rudiger
Switch layers is already Anime Studio's form of frame by frame animation. Could you not base your scripted enhancements on this feature? Perhaps you could have a mode where a switch keyframe is added at the end of the timeline (according to whether animating in ones or twos, etc) whenever you add a new switch to the switch layer. Perhaps you could also force the keyframe order to match the switch layer order as well.

Posted: Wed Feb 25, 2009 4:13 am
by synthsin75
That's already my plan. You'd create the FBF outside of a switch layer, but then hit a button to transfer the layers to a switch, in layer order with a specified timing.

Posted: Wed Feb 25, 2009 6:07 am
by realsnake
Is it possible to draw a simple shape (1st frame of timeline) and then move to second frame which is already empty with help of LUA script, by only using a single vector layer?

Posted: Wed Feb 25, 2009 6:10 am
by mkelley
Wes,

Before you try a script out, Wes, I'd do a proof of concept that switch layers can handle your purposed load.

I may be dreaming, but I seem to remember someone here on the forum that run into a memory issue when they got to, oh, say, 300 switch layers (might have been more, maybe even a lot more, but they were definitely trying to use them as frame-by-frame animations and had problems).

As to what the problems were -- my old brain can't remember. Might have simply been playback issues, or it might have been something worse (a complete memory crash?). All I am saying is that I'd want to explore just how feasible switch layers could be for this process (maybe 300 is all you need, for example).

Posted: Wed Feb 25, 2009 9:55 am
by Mark Bremmer
Just as a work flow thing, on requests for a frame by frame look I've worked with a studio that animated using the standard computer interpolated method but then simply modified plug-ins while in video production. This provided faster render-to-final output plus the benefit of modifying the "look" without requiring re-rendering. Production houses are slaves to the clock.

Posted: Wed Feb 25, 2009 3:18 pm
by synthsin75
Mark,
I can't say I really understood that.


Mike,

I did some testing, just in case, but I'm assuming that any memory issue would involve using images instead of vectors. Too many or too large of images can definitely cause memory issues, but I'm only thinking of vector layers here.

Realsnake,

No way to use only a single vector layer.

----------------------------------------------------------

I must be going crazy. I thought that onionskin didn't work for switch layers, but they do. So this could be really very simple. (Although I think it will still require a layer script and a tool.)

So all I need is a layer script for the switch layer that will select the active switch for each frame. That way scrubbing the timeline always leaves you at the layer that's active on that frame for editing.

Then the tool will have buttons for creating either a new layer or a duplicate (in case you don't want to redraw the whole thing). This will automatically make this new layer active in the switch. Plus I could put in a place to set the increment (like on two's, etc). So when you hit one of the create layer buttons, it'd automatically jump ahead that number of frames and then make this new layer the active switch.

Just thinking out loud here, but I'm pretty sure all this is doable.

Posted: Wed Feb 25, 2009 3:48 pm
by Mark Bremmer
Ok, I was a little vague there - not enough coffee when I wrote that answer.

It's not uncommon to take regular looking animations and then make them look like FBF using a video plug-ins during video post production.

This let's the video house interactively control what the FBF style looks like without requiring re-rendering of the original animation.

Mark

Posted: Wed Feb 25, 2009 4:27 pm
by synthsin75
So basically just making it snappier by not interpolating every frame? But what I'm talking about is actual FBF.

Posted: Wed Feb 25, 2009 4:28 pm
by heyvern
Just to help put this in perspective I did a few tests... I don't want to rain on the parade but I feel this may not be practical without changes to AS from the developers side.

I am not shooting down the idea. I just want to let you know what I know about massive layer counts and multiple complex vector layers.

--------
Layer Count and Performance
I did a quick test and found that after adding about 800 layers or so to an AS document (not in a switch, just ungrouped layers) it slowed AS down so much it was unusable. It took several seconds to select and deselect points. Moving points was slow and very choppy. It would be extremely frustrating to use with that set up.

The good news however, is that putting those layers inside a switch or turning them all off but the few you are editiing increased performance back to normal. Just as fast as if there was one layer. If that many layers are all visible AS slows down a lot. If only a few layers are visible then the speed increases. This is something to consider for onionskin. Onionskin is a real performance hog.

Another slow down occurs when keying a layer in a switch layer. It took several seconds on my PC waiting for the key frame to be inserted. Hopefully a scripted solution might be faster but it's hard to say without testing.

Playback also suffered dramatically. Forget about real time play back with that many layers in a switch. Scrubbing was very slow as well. Very sluggish.

800 "frames" or layers is small beans. In reality even a short segment might be 2 or even 3 times that amount. Maybe more.

File Size
My test file with 800 layers in a switch and a modest vector layer was over 50mb! You could easily end up with AS files 100's of megabytes in size. My test file was just a simple face on one layer. Not many points. Points in vector layers add tremendously to the file size. Imagine the resources required to have a 200 or 300 megabyte file open in AS.

Time Line/Frame/Layer Navigation
Now here's another wrinkle... time line navigation and editing. This I think would have to be handled with a new tool. You would need a way to automatically "select" the switch layer that is active on that frame. I tried to find a layer in the switch with 800 layers.... yikes!!! Scrolling and scrolling. This will need a special button or tool to select the active layer on a frame. Maybe as you scrub through the time line the layer is selected. Of course this means the switch layer with 800 layers will have to be open.

Another issue was right clicking on the switch to see which layer is selected... or to change it. ALL those layers are visible in the drop down box. So if the screen is not large enough or the layer palette isn't expanded to show them all they get cut off and you can't see all the layers. This is not an issue for a scripted solution since you would probably never want to right click on the switch anyway. You could use the frame number to know which layer it is but... if you change things along the way the layer numbering will be hard to fix.

From your description it sounds like a good idea to start with creating layers OUTSIDE of a switch and then use a script to load them in. However this will need to be done in "batches" so you can "hide" layers and improve performance. From what I've seen in testing this it may take a very long time to put 800 layers into a switch and key frame them. It took nearly 3 to 4 seconds just to set a new switch key.

Layer Editing and changes.
First off using this technique eliminates any possibility of using multiple layers for a single character. Unless you try to have multiple switch layers.... aaaaahhhhhhggggg! I don't even want to think about that ;).

Suppose you need to add new frames or make changes? This could involve changing keys for the switch in large batches. You must also rename the layers so they match the frame number. That should be an easy script function. I think this would be a must have feature. If you are on frame 0 and want to change frame 456 you just select it.

Also, will layers/frames be edited or modified on frame 0 or the frame the appear? This would need to be part of the script possibly. A special point tool that doesn't key on the frame but keys on frame 0. This is easy enough to do. You drag points on frame 489 but the special tool only modifies the points on frame 0.

File saving - Wait for the file to be saved!
A new wrinkle I just discovered... saving the file. AS has little "feedback" during a save. It's hard to see when it's done.

Normally this is not a problem, however I think I discovered what causes those corrupted files people have been getting every so often...

I hit save on my 800 layer file and it took... uh... it took a while. It took so long I wasn't sure if it was finished and I started clicking around on the file before it was actually finished. Later while the file was still open, I checked it on the hard drive and it was only 3mb.

This means it hadn't saved properly. My "clicking" or other activity must have aborted the save and squashed the file. I went back and saved again... waited at least 15 to 20 seconds before the cursor became "active". The file size on the hard drive went back to 50mb which was the original saved file size.

That size by the way is proportional to the number of frames. 400 layers in my document was 25mb. Double those layers/frames it is 50mb etc etc. A 1200 frame animation would be 75mb

In Conclusion - I'm a pessimist ;)

Don't let me put you off the idea. I only did this so you don't end up being disappointed by unrealistic expectations. Obviously a better computer than mine will have better performance.

I would however, DEFINITELY do some tests to find out what AS can handle as far as layer count. Find the maximum number of layers in a switch that AS can handle without a performance or file size hit.

-vern

Posted: Wed Feb 25, 2009 4:55 pm
by synthsin75
Thanks for doing all that leg work, Vern.

I have to admit that I never expect this to be a proper full scale FBF. My only uses for it would be the rare occasion that I actually need to animate between two extremely different shapes. I wouldn't try to use FBF in AS for a whole character, but possibly for a transition here and there (in which case a character can be done on one layer).

I know the layer count limitation. I run into that in regular projects all the time. I had no idea of the file size relative to the layer count though.

Mmm, I may let this idea go until MC adds in hardware acceleration. It's not like I don't have other things I'm working on. :roll: :wink:

Posted: Wed Feb 25, 2009 7:36 pm
by heyvern
synthsin75 wrote:Thanks for doing all that leg work, Vern.

I have to admit that I never expect this to be a proper full scale FBF. My only uses for it would be the rare occasion that I actually need to animate between two extremely different shapes.
That would work very well I think. It isn't a bad idea either for "turn" solutions or transitions.
I know the layer count limitation. I run into that in regular projects all the time. I had no idea of the file size relative to the layer count though.
I was shocked at how big the files got. I've seen some large multilayered documents and have a few myself. Although in many cases each layer is a small piece of a larger character. The file size is based on the same points on every layer. A layer with just an arm, or eyes isn't going to take up so much space.
Mmm, I may let this idea go until MC adds in hardware acceleration. It's not like I don't have other things I'm working on. :roll: :wink:
I have to agree with that one. If AS had acceleration there wouldn't be as much of an issue regarding performance... need better performance? Faster real time playback? Get a fast video card.

----

On a side note... sometimes these types of things can lead to other tools. Sort of like NASA. Because of NASA we have... Tang, personal computers, freeze dried food... etc. ;)

I would love a took that I could use to jam a bunch of layers into a switch layer, or use to select the layer in a switch on a frame, or to only edit the points of a switch layer on frame 0. THAT would be a cool tool.

-vern

Posted: Wed Feb 25, 2009 8:04 pm
by synthsin75
Yeah, I may still do some of this. I like the idea of automatically selecting the active layer in a switch as the timeline is scrubbed/played. At least it might be helpful for tweaking lip-sync.

Posted: Thu Feb 26, 2009 2:28 am
by slowtiger
Thx vern for this explanation! When I said I'd like to have FBF I thought of doing maybe 12 frames in a scene of one minute, but I didn't think that once the ability is there, people naturally would try to do the whole minute FBF in AS.

Some info about file sizes. In TVPaint I had a project with about 3000 frames which was a 9 GB file on the drive (because of 40 layers, in HD). Took some time to load, and more than 5 minutes to save, but navigating and drawing was unaffected and as fast as ever. So it's not a general problem to work with files even bigger than the available RAM, it just needs very clever programming from the beginning. I guess that's possible because bitmaps are faster to load and save because the application doesn't have to render the view from vectors.

Posted: Thu Feb 26, 2009 5:42 am
by mkelley
Wes,

Vern's experience was the kind of thing I had read about before and that was why I was cautioning you.

It's too bad, but I don't think that AS can handle FBF without some modifications on Mike's part, unless we're talking just very tiny sequences like ST says.