Hello Guest

Author Topic: Animation and image independence from Sprite collection  (Read 4555 times)

kenshin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Animation and image independence from Sprite collection
« on: December 28, 2013, 12:07:36 pm »
Hi,

I couldn't add some new suggestions at trello so I suggest something at this thread: Image Independence from sprite collection.

 When I change my images from collection to collection, I have to change my animations also. If images are not depend on a collection then, it would be very flexible.

I change images from collection to collection, because I  must arrange atlas usages, draw call count etc. if you make image (used in 1 animation frame) independent from collection then you can make atlasing dynamically and optimizing programmatically! I mean better fill rate, minimum atlas count, animation independence from sprite collection.

Another suggestion may be atlassing independence from sprite collection. This time, animations won't be effected again because of changes for atlas wastage or draw call count optimization..

« Last Edit: December 28, 2013, 12:15:16 pm by kenshin »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Animation and image independence from Sprite collection
« Reply #1 on: December 28, 2013, 07:48:58 pm »
This won't solve some fundamental issues - eg. what to do if an image exists in multiple collections? But even more than that -
I agree there should be a better way to this, but I can't think of any proper solution to this within Unity - The ideal solution would be a weak / not automatically loaded reference to the source image and the ability to pick from one of the loaded atlases to source the image at runtime, but thats not possible in unity.

There is a way to get a close enough result, but will be really prone to breaking with metadata mismatches. Looking at Unitys 2d solution, it doesn't look like they've solved this either...

kenshin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Animation and image independence from Sprite collection
« Reply #2 on: January 01, 2014, 12:02:01 pm »
Thx for answer.

 If image name is unique in all collections, then it will be solved. I insist on that you can manage atlassing independence from animations and collections.

Another solution: you have references and know which collections would be used in scene I mean they are already in memory, you can then optimize atlas wastage through reorganizing atlases from sprite collection to new atlases.

I think dicing will be very helpful here. Do dicing this time on atlases (like used in images)
one more time then you optimize all sprite collections in run time on new atlases. Then you get optimized atlas space and independence from animations...

I love tk2d, so i insisted on. it is very helpful in my projects, and teached me a lot of think. So I feel that it will be done without breaking existing entity relations...

Thanks for providing such a good product.



unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Animation and image independence from Sprite collection
« Reply #3 on: January 02, 2014, 12:02:53 am »
All possible, but the terrible memory management in Unity makes stuff like this stupidly hard. Trust me we've tried :)
The next tk2d version will likely have some data driven atlas / animation generation system, which might make things a lot easier for you.

kenshin

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Animation and image independence from Sprite collection
« Reply #4 on: January 03, 2014, 12:00:54 am »
Ok thank you ... I am looking forward to see. Bb.