flump
flump copied to clipboard
Feature Request: Assign a Scale Factor on a per asset basis
One of the great features in Flump is the ability to scale the resulting Texture assets, allowing content creators to optimize their video memory and file size usage.
Unfortunately, with a single scale applied to all assets in a project, it somewhat cripples this benefit. It would be awesome to be able to tweak the scale on a per asset basis, because sometimes you can drop your scale by a tiny bit and then get that asset to fit into a smaller texture profile.
The individual scale would be stored in the flump project file and multiplied on top of the Base Scale and Additional Scale Factor to determine final scale for export.
Thanks!
Hmm. I think my motivation for the above request was a bit misguided. However, it would still be useful in my usage to be able to set a scale factor (essentially the base scale factor) independently for each asset, because my source assets (the leaf node graphics/images) were not all created at a consistent scale. Alternately, if the target scale could be inferred/read from the .fla file somehow, that would work for me, too.
Let me know if you have any suggestions. Thanks for all the help!
+1 After implementing a quite complex art asset we realized that we cannot use scaling. (only at the price that textures will be blurry or they will take up huge space)
If it helps, I implemented a way to do this in my fork of the flump depot. The way it works is you create a symbol in the same flash file as the asset you wish to scale. Set up this symbol to export as a flump Movie called "scale". In this symbol, on Layer 1, Frame 1, place any one of your flump Image symbols and apply a scale to it. The exporter will read the scale you set on this symbol and apply it during export time to all of your textures.
If you would like to use this, merge: https://github.com/kpatelPro/flump/ branch "library-scale-proper" into your copy of the depot and rebuild your flump exporter.
Thanks for the tip, sounds like a good fix for my broken asset. I've been trying to fix it properly: When constructing the texture atlas measure all instances of a given asset and export it with the biggest scale. Then go back to the movie descriptors and adjust the scaling of the instances to this biggest asset. Sadly this seems to be a very difficult change, it looks to me that I'd need to refactor most of the exporter logic to accomplish this.
@kpatelPro I've implemented real scaling, its in my fork: https://github.com/funkypandagame/flump/commit/85d6f48126018169c6c79614a74b209c4637e086 Now the exporter will export each asset at the biggest size used, thus nothing will be pixelated.
Note that I've removed .xfl support (I had to refactor the parsing logic quite a bit to understand it) and its likely broken for flipbooks.