Git Product home page Git Product logo

Comments (3)

viniciusgerevini avatar viniciusgerevini commented on June 14, 2024

Thanks for the suggestion. I did test trimming before and it didn't bring any real benefit when it comes to file size.

It happens that transparent pixels do not take much space and the extra bytes required to define the regions ended generating resources with same and sometimes even bigger sizes.

It also doesn't work well with AnimatedSprites, as there is no way for defining regions there and the resulting animation aligns all frames by the center.

Even though trimming could mitigate the problem with big files, it doesn't really solve it, so the trade-off didn't seem worth it.

from godot-aseprite-wizard.

KeyboardDanni avatar KeyboardDanni commented on June 14, 2024

The main benefits I see are texture dimensions and VRAM usage. I know that this is an ongoing issue with #32, and given that a lot of GPUs don't support 16k textures, and many (particularly integrated ones) have a performance penalty when using 4k or larger, it makes sense to try and keep the dimensions low.

It also doesn't work well with AnimatedSprites, as there is no way for defining regions there and the resulting animation aligns all frames by the center.

In such a scenario, the AnimatedSprite can be animated over region_rect and offset. This would be a departure from the current method of animating over frame, hence why I think it should be offered as a separate mode/option from the existing row/column grid.

from godot-aseprite-wizard.

viniciusgerevini avatar viniciusgerevini commented on June 14, 2024

I think you are referring to AnimationPlayers and not AnimatedSprites, as an AnimatedSprite always rely on setting the frame in a SpriteFrames resouce. Having said that, there is also a region property in the frame resource which is already currently used by the plugin. It's just not considering the padding, which is why trimming currently doesn´t work.

I'm not against this contribution as long it's well tested for regressions, but I honestly don´t see much value on this change as of now. As we are talking about pixel art, which is generally way smaller than regular high res art, this feels an edge case and maybe a premature optimisation.

Also, this doesn't really solve cases like the one on #32, as trimming has little effect on that due to the naturally large art. The proper solution for that is giving the option for splitting the frames in multiple textures, which I think is a better time investment.

By the way, I'm not trying to discourage you from contributing or giving suggestions. It just that as of now I don´t see it as high priority so it's likely something I won´t be focusing in the near future. Thanks for the suggestion and for bringing these issues to my attention. I hope this is not a deal breaker for your projects. Cheers.

from godot-aseprite-wizard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.