Jump to content

Spriter for Unity 5.0


Dengar

Recommended Posts

Ok I tested the texture swapping , and it is AMAZING XD that is exactly what i had in mind and does everything i needed in my projects , you r a beast! XD very easy to use.

 

regarding the issue of Sprites with no bones, when I examined the prefab i found them in the hierarchy "Not Enabled" , in every project thats the case, i have no clue what is causing that. but when enabling them manually , they fuction as excpected.

 

other than that hmmm the alpha channel still issue for me , and i'm defintely using the alpha channels on sprites not on bones. I'll look into it more myself and see what i come up with.

Link to comment
Share on other sites

As for your "boneless sprite" problem, I'm not sure why it does that, although I probably know WHEN it does it. It's part of something that I originally thought of when thinking about "Sprites that aren't present on the first frame of the first animation.". I'll turn that feature off for now during the next update because I probably will be taking a different approach.

 

As for your alpha thing, I really don't understand what's up. It works fine on my end. If you've tried various things and the problem still persists, would you mind sharing your scml file so I can take a look?

Link to comment
Share on other sites

I sent you in private message an example of a test special monster that I've been working on , the project has sprites without bones in some animations (XPpattern animation for example at the end key frames) , and in last animation LeafStorm all alpha channels on the 4 storms remain as alpha 1 for me.

feel free to use this SCML project to test converter ^^ since it has alot of translation movments , rotation , alpha channels tweaking and multiple animations

Link to comment
Share on other sites

lol, I tried to import your .scml file and all of the sprite's locations are completely out of alignment. I wonder why that is. O_o

 

The alpha channel VALUES actually do change. It's just that for some inexplicable reason the texture remains visible.

 

This is going to take some time to figure out but I will eventually.

 

EDIT: Ohhhhhh.... There is now one thing I get! I haven't solved the alpha problem yet, but I do have a hunch about why all your sprites are out of alignment. My importer does not actually take irregular pivots into account. :o In my own testing scenarios, all of the textures just had the pivots in the center.

 

This requires some thinking. I believe this is fixable. Maybe I can use the same mechanic that sets the texture import type to sprite to set the pivot.

Link to comment
Share on other sites

ooooooh XD all of my SCML files are out of alignment coz I always start by changing the pivots of my sprites. I Kept silence and did not report it becuase you said previously :

 

 

 

, Spriter uses different values for things like position and rotation, so I'm going to have to come up with some translation algorithms (probably based on the original Spriter2Unity).

     

so I thought thats why all of my alignments are wrong , and I thought you had the same issue as well lol:P 

Link to comment
Share on other sites

Oh no I fixed that a long time ago. Position x/y values are 100 times smaller in Unity than they are in Spriter. Likewise, Spriter's rotation uses euler angles whereas Unity uses quaternions. Also, animation time in Unity is measured in seconds whereas in Spriter it's measured in milliseconds.

 

EDIT: https://github.com/Dharengo/Spriter2UnityDX/raw/master/Packages/Spriter2UnityDX.unitypackage

 

Sorry for the delay. I had work this afternoon so no time to work on it.

 

For the time being, no longer disables any of the parts. This means that there might be an excess of sprites at certain times.

 

Anyway, try it out. Import package, re-import your .scml. Note that it might take a few seconds to modify all the different Sprite assets, but once it's done, all the sprites should be where they belong. Also it only needs to go through this process once unless you change the pivots again.

 

I also did some thinking about your "alpha issue" and I'm starting to believe that this might not have anything to do with the alpha directly, but rather the way the animations are "completed". I'll look into this some more later.

 

There also seem to be some issues with the sprite swapper, but I think for now I should actually be focusing on dealing with different animations using less/more sprites.

Link to comment
Share on other sites

https://github.com/Dharengo/Spriter2UnityDX/raw/master/Packages/Spriter2UnityDX.unitypackage

 

Yet another update. You're going to love this one.

 

Now only shows the body parts that are actually used in the current animation, and hides the ones that aren't.

 

Please tell me if your "alpha issue" is still a thing. Because now that the screen is less cluttered with unused body parts, I can actually see some alpha activity.

 

I'm fairly sure I haven't worked out all of the issues yet but we're getting there now.

Link to comment
Share on other sites

Dengaaaaaaaaaaaaaaaaaaaar XD I know you want to hear good news(so was I , I've been waiting for your update since morningXD) but your update ..... It is kinda scary lol :P

 

ok 1 very good news and 1 small bad news , which one you prefer to hear first lol ?

very Good News :My alpha Issues , the values from 0 to 1 that I had has been solved!! I can see the effects of my attacks now which is amaaaaaaaaazing.

 

small Bad News: Hmmm the converter now has issue finding/displaying the sprites at folder ID = 0 , seriously watch this image

 

prolblem1.png

 

No monster ! just his effects loool XD when I examined the prefab , every single Sprite from folder with id 0 is Missing! and that is in every project , and other image in any diffrent folder is being improrted fine
problem_2.png

 

but I think the solution to that should be very easy XD i hope lol ,I think either he is not finding the correct path , or he finds the correct path but RESETS the sprites to null somewhere(i did not look at the code yet but just guessing w ), try deleting your prefab and reimport it , see if you get same issue

 

again , amazing job on the alpha channel , it works like a charm now .I Appreciate your hard work making an converter with high potential even though you arevery  busy working on other stuff ^^

Link to comment
Share on other sites

I didn't DO anything with the alpha channel. I just removed unused sprites from the equation, so the alpha mutations are actually visible now.

 

As for your problem. I'm not sure what to tell you. I cannot replicate it. I even deleted the prefab and reimported the .scml file, and I'm not getting the problem you describe.

 

EDIT: After deleting your whole project and reimporting it all, I was able to replicate the problem. I was acidentally setting the sprite MODE instead of the sprite ALIGNMENT.

 

https://github.com/Dharengo/Spriter2UnityDX/raw/master/Packages/Spriter2UnityDX.unitypackage

 

This version shouldn't do this anymore. However, I don't think it will fix the current state of your textures. You can do two things:

 

Manually: Go to each texture, set the Sprite Mode to "Single" and the pivot to "Custom". That should fix it.

Automatically: Make sure to have the textures (without the associated meta files) somewhere outside your Unity project. Then delete the textures from your project, then re-add them. Then re-import the .scml file.

Link to comment
Share on other sites

hmm Dengar buddy , the problem still here , could you kindly try do the following? ^^

1) create new project

2) import your new Converter

3) import the SCML project

 

the issue stays the same , all sprites are missing, if you go to sprite renderer in each component you find (Missing sprite) and if you click on the list you will find that every image in base folder was NOT loaded  >< I'll go eat breakfast fast and try to see what part of code causing that

Link to comment
Share on other sites

Wow O.o Ok these are huuuuuuuuuuuge improvments than before ^^ like 1200% better XD!!! so Yup , I'm in love with it ^^ a little more push and It will be safe for me to switch from the old Spriter 2 Unity to this one for sure 

this is how it looks for me now 

 

Edit : this is the first time I see my Sprites running properly using the coverter so i'm excited XD seriously man , you are a life saviour , waza waza arigatou gozaimashita :)

Link to comment
Share on other sites

Are there any wishes you have for the converter in order to finally make the switch? Is there still any unexpected behaviour?

 

Also, would you say about the tool's extensibility? I haven't really written any of the comments because I was focused on making it work, but if I was to provide some comments here and there, would you say the code is easy to work with?

Link to comment
Share on other sites

 

 

Also, would you say about the tool's extensibility? I haven't really written any of the comments because I was focused on making it work, but if I was to provide some comments here and there, would you say the code is easy to work with?

 

 

This tool is way easier to play with than the previous one ( the level of difficulty here is decent , the other one level of difficulty is complex), and I prefer to work with this one than the other one 100%. as for extensibility, it would be better if edgar or mike gave a look into it because they have clear vision of the future of spriter and its future's features. so you might send one of them a message to have look at the tool. as for me , I believe well documentation + 100% well construction of the "AnimationBuilder" class is a core factor for this tool  since features like skinning , entities animations,  Triggers etc all of them occures there. And you need a second opinion of course since I don't spend that much time on programming as i spend on animating and drawing :P

 

Also yesssss I'd appreciate it if you documented the your code to make working with it easier

 

-----

 

 

Are there any wishes you have for the converter in order to finally make the switch? Is there still any unexpected behaviour?

 

wishes:

 if you were a genie in a lamb then I wish for "Collision Boxes" To be implemented (Box2Collider > as trigger > change of width , height , rotation , position in key frames) as well as for "Triggers" (Add animation event that stores a value and a name, the person will manually will add scripts and choose the method he likes and use the stored value and name based on his custome script) and last but not least I wish that you become a human and be free from your lamb prison genie :P

 

Box colliders can help with improving the AI, Make parts of a monster harder to damage, immune to damage , parts of teh monsters that we can climb , parts that triggers and event etc etc . the possibilities are endless

Triggers are times savior, instead of adding AnimationsEvents Manully and lose them if we make changes and need to re-import the SCML file and add them again , loading trigger keyframes from scml file and add them as AnimationEvents should save us at least half the time.

 

but these are only selfish wishes of mine , I believe others have diffrent wishes like Skinning or IK or any feature of sprite i've yet to know of , but had to share my thoughts at least :P and even if you can't implement them , I do believe it is possible to be added later with this tool

 

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

Unexpected behavior :

Unexpected behaviours are the ONLY reason for me now to not switch to this new tool. the unexpected behaviours that I noticed so far:

1) Scaling of Sprites instead of bone scaling distort the Images horribly (from negative value to positive and vise versa), for example (changing the values from x=-1 to x=1 inside spriter) yields in weiiiird behaviors (for example I'm trying to flap a wing and i need to change the values from negative scaling to positive , the result is that I can't see the wings 90%of the time). maybe I should send you a SCML file for this weird issue better

2) Not all Placments are correct , it is often that I'd find a single sprite in a position diffrent than excpected but with correct behavior . I'll send you a SCML file that has this issue XD.

3) rotations issues , some sprites gets very weird rotations . for example the Project that I did send to you , leaf storm , all storms are rotated in weird way + in wrong positions , I believe that is because of number 2

Sorry for talking alot but I did not want to give you half baked answers :P thery are not over cooked either though so lol. Anyway , I'll be sending you a file that has issues 1 and 2 I talked about , issue number 3 you should be able to see it for yourself from the previous SCML file

Link to comment
Share on other sites

https://github.com/Dharengo/Spriter2UnityDX/raw/master/Packages/Spriter2UnityDX.unitypackageTry again, I think you'll be pleasantly surprised.

 

As I said, the issue had nothing to do with whether or not the sprites are connected to any bones. It was a parenting mismatch. Basically I wasn't very thorough in caching the transforms. I thought I was using identifiers that were unique, but they actually weren't. I updated the code to use (hopefully) truly unique identifiers.

 

As for the resizing issue. That's Unity getting derpy with negative Scale values. I need to think about how to handle the math. Maybe I can search the original S2U for inspiration.

Link to comment
Share on other sites

Thanks for the thanks. I do get a lot of personal gratification out of this stuff too. I've been wanting to play with Spriter2Unity for a long time, but I always kept this stance of "I'm not gonna be doing any active work on this" because the source code was so difficult to work with. Writing it all from scratch has been rather liberating. ^^

Link to comment
Share on other sites

Alllllllllllllllllllllllllllllllllllllllllrighty this one works like a Beast XD  all of my ground based monsters SCMLs all had 100% proper positioning ^^   thats very very solid converter :DD thats it , shall the issue of Scales value be fixed i'm switching immediately to this converter! seriously this one is better , in the previous one i had tons of Z values issues , This one is very solid when it comes down to it! ^^ 

btw , thanks for the documentation <3 and i wish you a good night , been awake since forever and I have no clue what is infornt of me right now XD 

 

 

Link to comment
Share on other sites

Ok, so before I jumped the gun and started trying to translate negative scale to rotation, I just went into unity and tried to scale the wings myself. (want proof of this, check the "storm" sprites)

 

Negative scaling actually isn't a problem in Unity, so the wings disappearing has to be caused by something else.

 

.... I see it now. The wings are being scaled along one axis only aren't they? Apparently Unity then defaults the axis values to 0. That's what's causing it to "disappear".

Link to comment
Share on other sites

Hi, I just wanted to say that I really appreciate your work, Dengar. While I bought Spriter PRO long ago I wasn`t really using it as integration with Java (libgdx) was very poor at that time. Now, when I switched to Unity I was happy to discover that it is so much easier to use Spriter - thanks to you.

Link to comment
Share on other sites

Thanks for the support, but I have to give credit where it's due: Malhavok, Mythgarr, Bonus2113 and alaa-eddine did most of the work on the previous version (or currently-active, since my version isn't done yet). That being said....

 

https://github.com/Dharengo/Spriter2UnityDX/raw/master/Packages/Spriter2UnityDX.unitypackage

This should be like, the "final test" version. After this, all of the basic features should be complete.

 

I fixed that scaling issue, so boind, your wings should appear correctly now.

 

I also added a final feature I felt that it needed: The Entity Renderer Component. This is a component that's added to the root GameObject, it allows you to control all of the Spriter Entity's renderers simultaneously. There may be a bug or two in it that I haven't found yet though, so feel free to play with it as much as you want and tell me about any irregular behaviour.

 

Oh, one thing I should mention: Disabling the EntityRenderer component will also disable all of the Renderers. Enabling it will enable them again.

Link to comment
Share on other sites

I tried deploying the latest lib to android , it works like a charm :)))) so far not many issues in my project , just few code changes in my part and everything should be functional flawlessly

 

just 1 thing though! Sorting layer has some issues 
using the new Class you made , it does not affect the the layers at all! if i try to write a class that access every sprites renderer @ change it start up only , it only access the game objects that are active only and ignores the not enabled ones.

I shall try tonight to deploy it to andoid and see how it will go

Link to comment
Share on other sites

I tried deploying the latest lib to android , it works like a charm :)))) so far not many issues in my project , just few code changes in my part and everything should be functional flawlessly

 

just 1 thing though! Sorting layer has some issues 

using the new Class you made , it does not affect the the layers at all! if i try to write a class that access every sprites renderer @ change it start up only , it only access the game objects that are active only and ignores the not enabled ones.

I shall try tonight to deploy it to andoid and see how it will go

 

Maybe it's because I'm tired but I had a difficult time trying to understand that. But from what you are saying that the Entity Renderer only affects active GameObjects. This should not be the case. In fact, I tested it earlier. It works on inactive renderers as well.

 

UNLESS you are talking about the layer dropdown. I quickly ran a test and it appears it does not work quite the way I thought it would. Lemme quickly write a fix.

 

Aaand it's fixed.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...