Thinksquirrel Posted May 8, 2012 Report Share Posted May 8, 2012 Spriter Data API Overview The Spriter Data API is an object model in C# that follows the SCML (Spriter Character Markup Language) specification. It abstracts reading from an SCML file, allowing developers to easily integrate Spriter into their own applications. This version of the API is written for the Unity game engine (http://unity3d.com). The plugin passes all of Timpart's Spriter Test Suite version 0.2. Demo NGUI/Spriter Demo This demo shows the "Monster" example, with varying pivot points between animations and bone animation used. Downloads Spriter Data API NGUI Implementation for the API - NGUI required (the free/evaluation version also works great) Download both of the above repositories and place them into the Assets folder in your Unity project. NGUI Free vs NGUI Full To use the full version of NGUI, open "Spriter-NGUI\Editor\SpriterDataNGUI" and comment out line 34. Make it look like the following: //To use the full version of NGUI, comment out the following line.//#define NGUI_FREE Usage Make sure the Spriter project you're importing is inside the Assets folder. Whilst there's nothing stopping you selecting another directory it's likely to break the plugin. Unity should now have a "Spriter" menu option, to the left of "Window" and "Help". In here you will find "[NGUI]Create New Character". This will create the character using Unity's legacy animation system. From here there is no reliance on any of the scripts in this project beyond the colour helper. Future Goals Automating the import process when the .scml file is updated. Extending the project to work with 2DToolkit and/or ex2D. Adding a (non-recommended) mode of operation with no toolkits Known Issues Sprites are sometimes a few pixels off from where they should be. I'm investigating this but haven't found the cause. Opening the example scene might cause sprites to flicker when they change. Re-importing solves this. Half the commit messages were written with "R3" compatibility. I meant "B3". Whoops. SCML Version Current SCML Version: Beta file format Acknowledgments Special thanks to: [*:9nw3g1x7]Michael Lyashenko of Tasharen Entertainment for help with scripting support for NGUI[*:9nw3g1x7]The ex2D devs for guidance in the atlas creation process.[*:9nw3g1x7]Mike and Edgar of BrashMonkey for support, as well as making both Spriter and the SCML format.[*:9nw3g1x7]CptDefault for doing a lot of work to update the API for compatibility with the latest Spriter version. License The Spriter Data API is licensed under the MIT License. Quote Link to comment Share on other sites More sharing options...
filharvey Posted May 23, 2012 Report Share Posted May 23, 2012 I have spriter now working for Orthello2d inside of Unity3d. Quote Link to comment Share on other sites More sharing options...
Thinksquirrel Posted May 27, 2012 Author Report Share Posted May 27, 2012 Nice! Would love to see a demo =) I've been holding off on this for a bit until the new file format is finalized, since it will require some restructuring. Once it is, I'd like to get it working with even more 2D systems. Quote Link to comment Share on other sites More sharing options...
MetaMythril Posted June 9, 2012 Report Share Posted June 9, 2012 You are truly awesome! I hadn't had time to continue my development and as I came back to check on the file format changes I found this thread. I love that you added support for NGUI as I just recently purchased it when it went on sale about two weeks ago. Congratulations on a job well done and thanks for releasing it! :mrgreen: Quote Link to comment Share on other sites More sharing options...
Fabian Schempp Posted August 5, 2012 Report Share Posted August 5, 2012 @Thinksquirrel Thank you for the great plugins. I tried both your plugins, the ex2D and NGUI Version. NGUI works fine. But ex2D produces some errors. First it seems, that there was some NGUI code left in the ex2D script (I was able to fix that). Second, the animation looks strange as if the objects anchorpoints were wrong or something. I would like to use the ex2D version for a project, so it would be nice, if we could get it to work. Quote Link to comment Share on other sites More sharing options...
Thinksquirrel Posted August 7, 2012 Author Report Share Posted August 7, 2012 Hey Fabian, I've had this on hold for now until I get a chance to work on supporting the new Spriter file format - I haven't been able to test out the ex2D implementation too much as of yet. Feel free to open up a more detailed issue on GitHub though, and I can check it out. There's also a known bug that seems to affect rotations for either the first or last frame (causing jitters in loops sometimes). Not sure if it affects the ex2D version, but in the NGUI version I've had to do some manual tweaking after import. Quote Link to comment Share on other sites More sharing options...
Fabian Schempp Posted August 9, 2012 Report Share Posted August 9, 2012 @Thinksquirrel Thanks for the reply, I hope we will get some example files for the new Spriter file format soon. As you suggested, i added the two issue on GitHub (hope i did it right). I will keep testing as soon as you got a chance to update the code. I don't recognized the jitter bug on first and last frame you mentioned on NGUI version, but I will look for it in the ex2D version as soon as the character parts are in the right place. Quote Link to comment Share on other sites More sharing options...
Copywright Posted September 7, 2012 Report Share Posted September 7, 2012 I'm really hoping the Unity version of this has the same or more features as Smooth Moves, like playmaker support, skinned meshes, and low draw calls. Quote Link to comment Share on other sites More sharing options...
Thinksquirrel Posted September 7, 2012 Author Report Share Posted September 7, 2012 I'm really hoping the Unity version of this has the same or more features as Smooth Moves, like playmaker support, skinned meshes, and low draw calls. The API itself is actually only input/output and doesn't have many features on its own. It's meant to be used in tandem with other Unity plugins, for the most part. I'm working on the rewrite for the new SCML version as I get the time - I can look into importing from Spriter into Smooth Moves. Quote Link to comment Share on other sites More sharing options...
fimmfingur Posted September 18, 2012 Report Share Posted September 18, 2012 any update on the Spriter-2D Toolkit submodule? looking forward to that one And good job on this Quote Link to comment Share on other sites More sharing options...
MetaMythril Posted September 24, 2012 Report Share Posted September 24, 2012 Looking forward to the update! :) Quote Link to comment Share on other sites More sharing options...
Thinksquirrel Posted September 25, 2012 Author Report Share Posted September 25, 2012 Hey guys, Work has finally cooled down somewhat so I finally have some time for this. Here's the current roadmap: Initial work [*:32bi4ykf] Create a set of base classes and different I/O modules - similar to the current setup, but simplify methods to make more "sense"[*:32bi4ykf] Shared SCML read/write - getting this to work correctly is the #1 priority Modules - this work can be done concurrently by multiple parties. We want to focus on modules which have already been created (with the exception of the default) [*:32bi4ykf] Default I/O module - creates a hierarchy, atlas, and a skinned mesh. [*:32bi4ykf] Wizard/GUI[*:32bi4ykf] Progress bars, visual indicators [*:32bi4ykf] NGUI module update [*:32bi4ykf] Wizard/GUI[*:32bi4ykf] Progress bars, visual indicators [*:32bi4ykf] ex2D module update [*:32bi4ykf] Wizard/GUI[*:32bi4ykf] Progress bars, visual indicators [*:32bi4ykf] 2D Toolkit module [*:32bi4ykf] Wizard/GUI[*:32bi4ykf] Progress bars, visual indicators [*:32bi4ykf] Other modules Since I can't currently devote as much time as I would like towards this project, I will be looking for contributors/maintainers for the various modules once the core system has been rewritten. If interested, please check out the associated GitHub issue here. Feel free to ask any questions or offer suggestions as well. Quote Link to comment Share on other sites More sharing options...
MetaMythril Posted September 26, 2012 Report Share Posted September 26, 2012 Marked myself down for helping with the NGUI module on github since I use it in my current project. Quote Link to comment Share on other sites More sharing options...
Nekete Posted October 8, 2012 Report Share Posted October 8, 2012 I would like to know if there is any probability of having a unity animation save file option. Thank you :) Quote Link to comment Share on other sites More sharing options...
Thinksquirrel Posted October 8, 2012 Author Report Share Posted October 8, 2012 I would like to know if there is any probability of having a unity animation save file option.Thank you :) Hey Nekete, The current version actually exports to native Unity animations already - I will be making a default module for the new version that doesn't require any plugins and makes an animated skinned mesh, though. These will also use native Unity animations. Quote Link to comment Share on other sites More sharing options...
Pnikosis Posted October 8, 2012 Report Share Posted October 8, 2012 I would like to know if there is any probability of having a unity animation save file option.Thank you :) Hey Nekete, The current version actually exports to native Unity animations already - I will be making a default module for the new version that doesn't require any plugins and makes an animated skinned mesh, though. These will also use native Unity animations. This is awesome. I'd love to help somehow, but I'm quite new to Unity, so... well maybe testing in the meantime. Quote Link to comment Share on other sites More sharing options...
MetaMythril Posted October 9, 2012 Report Share Posted October 9, 2012 Quick question, using this API, what would be the best way to do things like texture swaps (i.e. weapon/armor changing) as I want to be able to "upgrade" items. I haven't looked at Spriter in a while so there may be something in the newer versions that help support this, just asking as it would be nice to know once I get back to working with it. Thanks again for your support in developing this awesome API! Quote Link to comment Share on other sites More sharing options...
Thinksquirrel Posted October 9, 2012 Author Report Share Posted October 9, 2012 Quick question, using this API, what would be the best way to do things like texture swaps (i.e. weapon/armor changing) as I want to be able to "upgrade" items. I haven't looked at Spriter in a while so there may be something in the newer versions that help support this, just asking as it would be nice to know once I get back to working with it.Thanks again for your support in developing this awesome API! Texture swaps are best handled through character maps, which basically allow remapping of one image (can be atlased or not) to another. Creating character maps would be done on the Spriter side (once it's available), and I have plans to support them with the default Unity implementation. Quote Link to comment Share on other sites More sharing options...
MetaMythril Posted October 9, 2012 Report Share Posted October 9, 2012 Texture swaps are best handled through character maps, which basically allow remapping of one image (can be atlased or not) to another. Creating character maps would be done on the Spriter side (once it's available), and I have plans to support them with the default Unity implementation. Yeah, texture swap was the wrong phrase to use. I definitely prefer my character be compacted into an atlas that has its parts all mapped. Looking forward to it! :) Quote Link to comment Share on other sites More sharing options...
fimmfingur Posted November 4, 2012 Report Share Posted November 4, 2012 I'd love to help any way I could with the 2D Toolkit module. Just let me know how i could help :) Quote Link to comment Share on other sites More sharing options...
MetaMythril Posted November 7, 2012 Report Share Posted November 7, 2012 Just wanted to ping and see how things were going on the main components of the API. :) Quote Link to comment Share on other sites More sharing options...
Nekete Posted November 7, 2012 Report Share Posted November 7, 2012 I would like to know if there is a example project to start with or some kind of API documentation. Thank you :) Quote Link to comment Share on other sites More sharing options...
Thinksquirrel Posted November 7, 2012 Author Report Share Posted November 7, 2012 Hey guys, No example project just yet. The main API for reading SCML into generic objects is done (including bones), but none of the implementations. I'm currently working on shipping an update to a different product of mine - after this I should have some time to get back to Spriter work. Quote Link to comment Share on other sites More sharing options...
Blackburnart Posted November 12, 2012 Report Share Posted November 12, 2012 I'm having some difficulty understanding how Spriter works with unity and what I need to have and do to get whatever functionality it has. I was under the impression spriter made sprite sheets and from then on you were on your own, but apparently it creates a file that can be in your assets and then Unity can understand this to make your animated sprites? Quote Link to comment Share on other sites More sharing options...
greywoods Posted November 13, 2012 Report Share Posted November 13, 2012 The newest spriter file format, 4a, has no means, currently, for being transported into unity. :((((( Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.