ndee85 / coa_tools Goto Github PK
View Code? Open in Web Editor NEWCOA Tools is a 2D Animation Suite for blender. It offers a 2D cutout animation workflow similar to programs like spine or spriter.
License: GNU General Public License v3.0
COA Tools is a 2D Animation Suite for blender. It offers a 2D cutout animation workflow similar to programs like spine or spriter.
License: GNU General Public License v3.0
First congratulation for this brilliant addon.
I have some serious usability issues to successfully cut-out the contour of the mesh in edit mode.
Hope these problems get ironed out from a great beta version, maybe it's me missing something?
edit: (I'm using the latest version here on github and I've tried with both 2.76b and 2.77rc2)
This is again on this version with blender 2.77a but I'm not sure when it changed. The preview takes a few seconds to generate (even with a small number of frames) and then only shows the first frame, even when I'm currently on a different frame index.
If I have an animation selected, then create an ortho camera, then render the animation, it looks great.
If I then select a different animation from the Cutout Animation Collections, select the same camera, and render the animation, only one or two sprites show up in the output. Also, just after selecting the different animation, the view only shows one or two sprites, and I have to click on 2D view again, even though it's already selected. This fixes the view, but rendering afterwards still only shows the same one or two sprites.
Resetting the camera size doesn't help. Only deleting and making a new camera and putting it in the exact same location seems to make rendering work again.
I hope I'm not making a dumb question, but I tried both the example project and rolling one on my own, and I seem unable to see the save button that appears on the videos. Am I doing something wrong or is this something that changed recently?
Thanks for your time.
Edit: I meant export button, not save button.
I get error then i try to reset camera resolution on blender 2.76
And leaves you in a object edit mode limbo state. Maybe you can hide the button in edit mode if you don't want people to click on it. :)
Currently it's set to XZ which could make sprites clip with each other by changing Z order when stretching would be high.
Just a feature suggestion to make it easier to re-render :)
Steps:
I.e.:
As you can tell, this can really mess with your work...I guess I'm a bit crazy trying to do animations that involve so many rotations. Maybe I have to rethink my game, or try to go 3D, but that's a whole new thing for me, too.
Hi, thank you so much for this tool. It will literally save me hundreds of hours of time!
Apologies if this has already been reported, but I've noticed that the weights that are created when you parent bones to a mesh change depending on the y-axis depth of the mesh. For example, in my .blend file I have a character with an arm in front of the body and another arm in back. I draw the same number of bones over each arm and parent them in the same way, but the weights for the arm in back are different, and the mesh deformation is not correct, whereas the arm in front is. Let me know if you would like me to provide a .blend file showing the end result.
Thanks!
Hi,
I'm a Blender noob, so maybe this isn't coa-specific, but somehow after just starting out with the armature, I went finish, made a sprite invisible, then went to edit again, and from that time on, the aimer follows the cursor but with an offset:
How can I get it reset to normal? Is this a bug or a Blender gaffe?
Thanks,
Gimmicky
Hi,
I'm hoping you can help me with this one, I don't know what I might have done differently this time, but I reverted all my changes due to #19 and kept on normally with my existing sprites. The problem I am suddenly encountering and cannot figure out why nor a workaround, is that when I hit Alt+A everything looks right (or if I move to any individual frame manually, also good) but when I render animation, the resulting frames are missing at least half of the sprite sheet swap-outs. (Like if I selected a different face and made a new keyframe, it's different in the preview, but in the render it stays the same.)
An OpenGL render of the animation looks fine (except for the spare crap everywhere that's normal for an OpenGL render :) )
Any idea how to handle this?
Thanks,
Gimmicky
Hi,
I'm wondering if this is something built in or made easier by CoaTools...I don't have Photoshop so I'm waiting on the Gimp exporter, but I may not be able to use it before my project deadline. So, how does what you might call Z-order in a 2D context work in Blender's 3D context? From http://www.robotsandchocolates.com/2015/04/2d-cutout-animation-in-blender-written.html I gathered that it's Y, not Z, that we might need to change, which seems to be the case. However, if I change the Y value by holding G+Y on a sprite, it flickers crazily and does not seem to land in the right order I would like.
I also tried right-clicking a sprite to select it, then changing the Y value manually in the Translate panel. But then it immediately selects whatever I had selected previously, and visually the Z-order does not change.
Is there a simpler way?
Thanks,
G.A.
Hello Andreas,
first of all, THANK YOU for the amazing Add On!! I was waiting for something, what could speed up my workflow, very very long time. I love Blender, it has so many possibilities and 2D animation is fun to do there too!
I am learning how the futures are working, and I found during creating new bone shape, this issue, when I select bone in pose mode and then press "draw bone shape/create bone shape/new shape/ok":
I am not a programmer, so I unfortunatelly do not understand, where could be the problem...if you find some free time, could you please have a look?
Thank you very much and just the best for you :)
I'm not sure with what version of coa_tools I could rename still, but with the latest on blender 2.77a, whenever I've tried double-clicking to rename a collection, like the mouseover tooltip says, instead of allowing a rename, my laptop's fans spool up for a couple seconds, blender claims an additional 200 MB of RAM, and nothing else happens. I tried it four times over the last minute, and blender is now sitting on 1.6 GB and will need a restart to continue working much longer (at least, this is how it seems to be on my system. I only have 4 GB to begin with.)
200 MB is also the amount it takes adding a new collection.
We all know alpha transparency is broken in the viewport, which is hurting this addon IMO.
The only workaround I've found is to switch to game engine, change the alpha blend to alpha clip, then switch back to internal.
So I think adding a button that automatically switches between opaque and alpha clip for all and/or select materials would be a great addition.
I don't even use the current mesh fill modes. The normal one is unpredictable, and the triangle fill generates way too many unwanted vertices. What I've been doing is using Mesh Fill (MESH_OT_fill), then Project From View (Bounds). This gives a great triangulated mesh, but the textures tend to be inaccurate if there are no vertices on the bounds of the original sprite.
Thus adding a Triangulated Mesh Fill option would be welcome.
Adding the same mesh generation method that Dragonbones uses; triangulating the base bounding box as you add vertices. I don't know if it's possible, but I thought I'd ask :D
Dragonbones import. I don't know if I've been doing it wrong, or if currently the addon cannot import the Dragonbones JSON format. If the latter, adding it would be cool, since there's already an export option. With this, the previous point (Mesh Generation) would be moot, since one could place the sprites and generate the meshes in Dragonbones, and bring it over to Blender for rigging, weight painting and animation. No need to do the same work already done in another program.
First of all let me say that this is an amazing addon. I've been hoping that something like this would come around for a long time!
I'm not sure if this is a bug or a misunderstanding of how to use the tool. I can import my sprites and skin them to a skeleton for a very traditional cut out animation and that is all very easy to do. When I attempt to apply a triangulated mesh to my sprites though, I start getting very strange behavior.
After clicking "edit mesh" I draw a path around the outside of my sprite and then I select only those vertices (excluding the 4 points that make up the image plane) and then click "Triangle Fill". That seems to work, but if I exit "Edit Mesh" and go into pose mode, when I move the bone it leaves behind a "ghost" of underlying sprite. I can not figure out what is happening.
I have uploaded a very simple example blendfile for your consideration. I have applied a mesh to the blue "arm" sprite:
deformation.blend
Here is a screenshot of the behavior:
screenshot
System:
Blender 2.77a running on MacOS X 10.11.3 and on Windows 10.
coa_tools master checkout at commit 69c362e (current as of 6 May 2016).
Blend file (with packed images):
Is this possible to export animation into spriter data format?
Spriter runtime working on many platforms (includin flash for example), so your cool tool will not be limited to GODOT
With the latest version I get some really bad framerate in glsl (about 4 fps with lots of frame dropping and lag). it is skipping the majority of frames, blender lags a lot when I hit play. If I do it for a while, the sprites turn to black squares (some or all) and the framerate becomes normal again.
Switching to multitexture gives me 12 fps, which is still not bearable, but at least better.
For glsl (preferences):
I tried switching image drawing method to glsl and other methods - no change.
I tried switching off vbo - no change.
I tried switching window draw mode to different values - no change.
Only thing I found out is that the framerate is bad in both windows and linux.
I is much worse when in glsl mode than it is in multitexture.
Obviously when I switch to solid view mode and the textures are no longer visible, the framerate gets normal.
I'm probably again doing something wrong, but I tried to follow the video at https://www.youtube.com/watch?v=uoQZV1f_J1s and I'm not getting the same result.
From what I understood, I should go: edit armature, then right-click a bone, then tap (or hold, didn't seem to make a difference) Alt. Red boxes appear around sprites, and I click the one I want to bind to. I go finish armature, tap R, and rotate the sprite...but for me it pivots on the sprite's 0,0 and the bone doesn't move with it.
I suspect this is intentional behavior, but when COA Tools is enabled and I rotate the view, as soon as I press any key the view snaps back to front. There are times when I want to make manual adjustments to the scene and this isn't always possible if COA Tools is enabled (particularly if I want to move something along the Y axis). Can this behavior be disabled or put behind a configuration setting so it can be turned off? Thanks!
The addon is installed and enabled, and the "Cutout Anim" tab appears on the left side. But there's only a "3D View" button on "Cutout Animation Tools" panel. Is there any other requirement to be able to create the root sprite?
I am using Blender v2.76b.
If Z scale is locked on bone transform it can be safely scaled without sprites changing their Z order when animating. :)
Photoshop script won't export sprite sheet from folder.
test.zip
Just what it says--if I add a new face to my faces file, then even after fixing the X tiles value, the face is now skinnier than it was before.
Hello,
to make the alt click binding of bones to sprites work in Linux (in my case Ubuntu) you can change the default shortcut for window movement like explained here: http://askubuntu.com/questions/118151/how-do-i-disable-window-move-with-alt-left-mouse-button-in-gnome-shell
Yes I'm one of those users :D
I intuitively tried to use Left Mouse Butten when I was drawing new bones and assigning sprites to bones and was curious why it doesn't want to work. They I discovered that it's reversed and I've should use Right Mouse Button when rest of the blender is set to LMB. ^^
Just since Blender 2.77a is now out (since April) and promises hundreds of changes (possible regression bait for 3rd-party addons?), it'd be good to know what you're using @ndee85 :)
I had put all my graphics for each character into a folder with that character's name. Now I have one character fully done and want to add the second one to the scene.
So I "Create new Sprite Object", then "Import Sprites" and import the second character's torso.png. It appears correctly, but suddenly, the torso.png from the first character is now a scaled version of the second character's torso.
This is on Blender 2.77 with coa_tools up to date (Mar 22), on Win7x64.
Advantages of implementing a spine json export in coa tools:
Advantages for import:
Advantages:
-You wont have to reimplement and support yet another runtime in all these game engines in order to use coa tools. Currently there is a diplicated effort to support different structured json file formats that do the exact same things in spriter, spine, creature 2d, and so on. This creates needless extra work for all the game devs to make different runtimes and cuts off a lot of the animators from actually using the tool on a game.
Your exporter already writes to a json file, you just have to change the way it structures the information and stub all the missing features that are not supported yet.
This could of course be done as a new exporter and does not have to overwrite the current one.
I wonder how hard would it be to port it over to do a spine json file
EDIT: Now dragonbones can export to spine. Dragonbones is free. However depending on the game engine you decide to use- if the runtime was written by Esoteric, you may have to buy a spine2d license in order to use spine animation in it.
Coa tools can now export to dragonbones and from there you can use the dragonbones editor to convert the file to spine2d
Here is a list of game engines which support loading spine2d animation files and provide their own runtimes, thus NO need to purchase the 300$ spine2d license:
runtimes that need to be researched:
If you think of any others, please post here
In edit armature mode you are meant to be able to quickly parent sprites to bones.
-press "F" for pie menu and choose edit armature
-After selecting a bone and holding done ALt the highlight selection works for sprites but clicking a sprite has no effect on parenting the sprite to the bone.
Am I missing something or is it broken?
Hi, first of all, let me thank you for making this great set of plugins. Our team has recently decided to jump to Godot to make our game and I've been hoping there would be a puppet2d/spline style tool to help animate the graphics for it so I was excited to see you were making the exact tool I was looking for, even better with mesh deform, and even better in blender.
Now with the issue: I've been having some recent trouble acclimating myself with it, I've figured out how to export from photoshop, to blender, to Godot and have had some success but I seem to be having more problems which I'll be happy to scratch up to me being new to this platform.
As you can see from the gif, I want to have the bird flap its wings and created a folder with --sprites that hold them. The first few frames work, but then the next ones seem to not pay any attention to the spritesheet.
I've also been having issues importing bones and animation into godot recently as well. (though not with this file) I've uploaded everything in hopes it can help figure out what's happening. The blender file has all the sprites embedded.
Thanks again for creating a much needed tool, I will donate when I am able, I'm very grateful for the the tools and I know it's going to make a huge difference in our game. (@paroxysmgame on twitter btw)
This came out as a hot topic on the godot facebook group.
Right now the open source community is looking for an open standard json file format that stores animation data in the form of keyframes.
We have an addon for blender that does that already:
https://github.com/ndee85/coa_tools
It is compatible with Godot too!
What are the technical advantages of having game animation stored as a json file+ an image atlas?
What other software can use this technique and export animation data to a json file?
Popular games that use it:
What open source software can do this already?
The problem with the json file format, the game runtime and the lack of one open standard:
The three major competing applications for cut out game animation do basically the same things. However as a means to lock their users to their product, the structure of the json files they output is different. That forces game developers to have to rewrite a new run time for each of the three - that parses the data accordingly. What is worse - they put a license on their runtimes that prohibits anyone else - who does not own the license to their software to use their runtimes.
We need a json file specification that is open - one that can work on all game engines without the need to purchase a license from someone.
Somehow this json specification must be kept compatible in all open source editors or runtimes - so as to not have to duplicate effort to implement new runtimes for each game engine.
Perhaps we need to create a new github/web page for it? One that describes the structure of the specification - and makes it easy for other developers to implement exporters/importers/runtimes.
By default they were set to linear which made frame of sprite switch between two keyframes instead on the second keyframe :)
All animateable integers properties should be auto constant. I have no idea why Blender doesn't do it by default... :B
This is probably a pretty low priority, since using blender with a trackpad isn't exactly a good user experience anyways, but when using the 2D view the viewport still rotates when using two-finger gestures without holding the shift key. Since zooming is done with two fingers it's actually pretty easy to accidentally rotate the view.
Personally, I only use the trackpad if I'm just sort of tinkering, so it's not a huge issue for me, but it's probably something that could be addressed.
what are spine skins:
https://www.youtube.com/watch?v=xY4m3iNtSUQ
what are spriter character maps (in spriter and its runtime):
https://www.youtube.com/watch?v=xSkVu5tMcdc
This is something that needs to be supported both by the software and it's runtime on the engine. Basically it allows the user to very easily swap different types of armor in the editor and in runtime(game). So for example if a sprite contains a set of animation frames (like chest turning), a character map would tell the runtime to replace this set of frames with another set (like armored plate chest turning).
This is also very useful in the editor - for easily reusing the same animation on multiple characters.
I am on OS X. When rendering an animation called "Idle", the render output setting gets populated with a value of "/tmp/Idle_". I'm trying this out with the skip sample files, so I have the project saved as skip.blend
.
When I hit Batch Render, the files get placed in /tmp
, i.e. under the filesystem root, in the tmp directory, when they apparently should be placed in the directory the .blend file is in, in a subdirectory called tmp
.
I have no reference system so I can't confirm if the issue only happens on Macs, but I'd be happy to try and track this down with instructions.
First off, I'm not sure if this is a COA issue or a Godot issue, so if this is in the wrong place just let me know.
Now, onto the problem. When I use the Godot importer to convert a JSON file exported from Blender into a TSCN file for Godot, it works fine at first. However, if I go in to change the TSCN file in some way (usually to add nodes), once I save it, all of the animations in the AnimationPlayer node disappear. In other words, once the file is overwritten by Godot, the animation data is gone (evidenced by the significantly smaller file size after saving, which when inspected shows the lack of animation resources).
Edit: Strangely enough, this only seems to happen sometimes. I was just experimenting, and after changing the root node to a KinematicBody2D, adding some child nodes, and reimporting the JSON file (with the merge option selected), everything was fine.
Edit2: I've also noticed that trying to edit properties in the AnimationPlayer often gives me... well, nothing. Or rather, it shows the list of animations, but no keyframes in them. Which definitely seems like more of a Godot problem than COA problem, so I'll likely need to create an issue on their Github.
As soon as I create an IK bone, the whole body crumples awkwardly. After that, trying to rotate the torso bone in pose mode causes wild rotations with very little mouse movement, and even in 2D mode the sprites and bones are rotating in 3D.
Imported my sprites without position data, so positioned manually. I've tried redoing this a few times now. The first two times, I imported all my sprites at once, then repositioned them. This latest time I imported in parenting order, and not the whole body: torso first, then upper arm, then upper arm patch, then lower arm, lower arm patch, hand. I thought this would help, but the result is the same.
I've also tried doing it exactly as in the video, where the "floor" bone is not connected to anything, then you make the IK bone, then reparent the body and yellow IK bones to the floor bone in Edit mode. The outcome is still the same, except that in this case the "crumple" doesn't happen until I reparent, rather than at the moment of IK bone creation. In the video this doesn't happen. :) What am I doing wrong?
When I quit Blender some console output caught my eye, so I went back to my attempt-number-2 file, with the whole body done with all bones. The root bone was the floor, so I deleted it, and remade it, so it wouldn't be the root anymore but just hanging around. Then I selected the thigh then the foot and created an IK bone. The console said:
startup coa modal operator (this was already here)
Dependency cycle detected: (new output from here down)
IK_Bone.021 depends on Bone.002 through Parent Relation.
Bone.002 depends on IK_Bone.021 through IK Constraint.
If I make folder with --sprite which contains only one sprite/folder and export it. Resulting spritesheet contains my sprite and second empty sprite.
Hey wondering if you have any solutions to these issues I'm having?
-Whenever I try to draw the bones, it doesn't draw at my cursor. It draws several units offset.
-Whenever I try to weight paint - it'll only paint everything read, I can't subtract.
-When I edit mesh and draw/triangulate my own. The original border disappears and won't let me delete the old border.
What version and OS are you using?
Hi, are there any plans for a gimp exporter?
only one png (the first one from all the layers) is created and no JSON file.
it seems that with only one layer the exporter work fine and manage to create JSON file as well.
Farther more, It seems that only the Actively selected layer in photoshop is exported by the Script, and as i said, if one selected it successful but if all are selected, it export only the first png and than stuck (dialog window still on) without creating JSON file.
I'm not sure if this is intentional or not, but with CoaTools disabled, it doesn't happen, so I guess it must be caused by CoaTools: http://blender.stackexchange.com/questions/62134/why-does-my-frame-range-start-automatically-revert-back-to-0-after-i-set-it/62169#62169
If it is intentional, could there be a way to disable it without having to disable the plugin entirely? (For the record, I tried changing CoaTools' own "Frame Start" in the collections pane, but it doesn't seem to have any effect anywhere that I can see.)
I know you said no feature request for now!
But I only put here some ideas. More or less can be implemented in blender to complete your addon.
Procedural motors, bone deformation, ghost and smooth transition:
http://creature.kestrelmoon.com/more_info_1.html
http://www.kestrelmoon.com/creaturedocs/Tutorials_And_Walkthroughs/Quickstart.html
Ubisoft procedural animation research:
https://www.youtube.com/watch?v=V4TQSeUpH3Q
https://www.youtube.com/watch?v=F0FVCrSXA1U
https://www.youtube.com/watch?v=4DyO_VS_3Gk
https://www.youtube.com/watch?v=ifxaDQ7elQE
And this discussion is useful:
https://www.youtube.com/watch?v=d7UZj3T33F8
https://www.youtube.com/watch?v=fsZTdspi2uk
Some other proprietary softwares, only for idea, not for use (I'm in FOSS):
http://esotericsoftware.com/spine-in-depth#Features
https://brashmonkey.com/
Normal map generation ==> I prefer current gimp normal generator!
http://spritebump.kestrelmoon.com/
http://www.snakehillgames.com/spritelamp/
As a collection of new ideas, I put @dkwroot and @herbert123 request and your answer here:
https://youtu.be/NLDHZQEuF0g?t=31s
http://blenderartists.org/forum/showthread.php?381203-Cutout-Animation-Tool-Blender/page3
Krita animation and scripting:
https://krita.org/item/second-animation-beta/
https://community.kde.org/Krita/Scripting
When you edit mesh with multiple sprite sheet and triangulate it... mesh shows whole sprite sheet texture on it ! After that frame index function disappear.
Just a feature suggestion, which would be really handy for z-order editing, especially with multiple characters who are interacting.
It would be great if, when you select multiple sprites, changing the Z-order changes the Z-order of each sprite by that relative amount, rather than resetting all sprites' Z-order to what you tell it.
E.g. I have an arm with patches, and it currently looks right--the Z-depths are set correctly. I want to make it interact with another character, but it should go behind the other character.
Currently I have to change each Z-depth individually for one of the characters for it to work, because changing them as a group sets them all to the same value, which breaks the original z-ordering...I'm having trouble imagining a context where this is exactly what someone would want...but maybe there is one?
The new way I would just select all parts of the arm, set the Z-depth to a very low value, and it would add that Z-depth to all parts of the arm--making them go behind the other character, but still stay correct relative to each other so that patches look right and so on.
Hopefully I explained it well enough. I imagine such a change wouldn't take too many lines of code, but be very useful in some situations. :)
Can you write an exporter plugin for gimp? please!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.