Layers messed up after vector export

Hi there,

we’re about to try using vector image sequences like SWF instead of PNG for our game, since Unity can handle SWF just fine (we already tried TB’s Unity export but that’s outdated and doesn’t work).
But there seems to be a positioning issue concerning the layers.
Everytime I choose Export → SWF to render my sequence, it results in a total mess.
It always makes my layers lose their positioning entirely, so it’s not even looking like a character at all.
PDF won’t make any difference.
Editing the composite and changing bitmap to passthrough or vector won’t either.

I did notice that there are various issues concerning vectorized animations, but I haven’t read about wrong positionings yet, which lets me hope there is a solution.

Thanks you!

I’ve had a similar problem and it turned out due to layered cutters and layer channel selectors. After I removed the use of layer channel and instead used color overide i was able to export swf sequence correctly. Still if you have an example project file you can share it here and we can take a look.

Hi vrexus,

here’s a download link to my project file:

However, it’s a simple and short take animation without any cutter- and/or color-/channel-modules, so I don’t know what else could cause the problem.

Thanks a lot for taking a look!

I took a look, the problem you’re having is that your rig is a trainwreck. You have drawing layers plugged into peg layers without having pegs themselves and other problems left and right. Because your drawing layers are plugged in as peg layers and controlling the layers bellow in that fashion when you’re exporting it out to swf the data impacting the swf render gets completely broken up and things scale/move to the layer peg locations of the above layer instead of a proper layer.

For this swf export to work youll have to completely rebuild this rig and have pegs on every drawing layer as individual an then master group pegs. There is nothing that can be done to export to swf properly with what you have right now (and yeah it does seem to look like it works inside of toonboom, but it cant work in swf export format).

Try this for how to build a proper rig:

Edit: also you’re using keyframes and making new drawing layers, you don’t need to do that as it makes endless copies. Change the F6 shortcut to just make a keyframe instead of a new drawing layer.

As a test i took your head and separated it out and put proper pegs above every drawing layer as well as master peg for entire head. After exporting out to swf the head shows up without any problems.

Thanks for the great explanation, I’m really glad it’s not a hopeless case.

So in particular I’ll need my layers set up like this?

Will try it out later that day.

Yep that’s how i did it.

Also: don’t make everything be connected to one composite. Go into the properties of composite, set it as pass through. Then copy the composite and paste it, and connect all the drawing layers to the new composite for say head, and then connect that composite to the master composite at the bottom. Also get rid of all the scale stuff under the composite.

Alright, taking a look right now.

But do you think I can achieve this by adding the pegs without having to rebuild the entire animation?
Would be a lot of work to start from scratch and lose all of my animations…
I wouldn’t mind rearranging the z-axis for example (because now after adding some pegs, the head is overlapping the mouth etc.), but I mean it should be possible to keep the way the body parts are rotating etc. shouldn’t it?

The crop and scale output modules were added because we’re working with different resolutions and I didn’t want to export a 3840x2160 canvas for a single character animation.
Do these modules really interfere with the SWF export?

I’ve just read the whole tutorial, watched the videos and thought I’m getting it.
But then I added a peg to each drawing and always added a master peg above each section just like in the videos and for any reason it’s still chaotic in the SWF preview.

So would you mind sending the project back to me with the updated head section so I can take a look at what you did?
I must have missed something, so that might help me a lot.

And another edit:
Got a bit further, but I just figured that it’s mainly the Z-axis which messes things up. When every single drawing is set to Z = 0 (which is default), the SWF preview is fine.
But no matter how slightly I nudge a drawing forwards or backwards, it immediately breaks the SWF preview and I end up where I was at the beginning.
How can that be, since nudging a drawing is an essential feature? I can’t create drawings, let alone animate them, without it.

Btw it makes no difference whether I nudge the actual drawing or the peg.

This is annoying me so much today. So, thanks again for your help, I really appreciate it.

I don’t see a way to fix this without repegging everything and redoing the animation. Alternatively you could put what you have in a symbol, make a new system with the pegs and then copy the animation by hand on top. You’re supposed to animate only on the pegs, not move the drawing layers animation (i have the ability to move drawing layers with keyframes completely disabled in my TB). The peg z-depth moving should work with no issue, you can test it by making a new file and putting a peg on a layer then shifting it behind/front of another and exporting out to swf.


Concerning the z-depth.
I just created a new file with brand new drawings and pegs for testing purposes.
Problem persisted, but then I finally found my mistake.

What I figured was that it depends on how far I nudge a drawing.
I’ve been used to use integers for the z-depth since it’s easier and faster to type in.

That means -1 screws it up and -0.001 doesn’t.
Technically it might be the same effect whether you use -0.001, -1 or -10, but the higher the value, the worse it gets.

That also saved my previous animations as I don’t have to redo everything.
Instead, I only need to fix my z-depths.

Makes sense, great to hear. Still for future rigs do it the other way with pegs, it will save you a lot of headaches!