combining alpha+color JPGs into PNG?
Monkey Forums/Monkey Programming/combining alpha+color JPGs into PNG?
| ||
Is a tecnique I use with my current framework, using the opensource lib JCC. In practice it takes a PNG and splits it into two .JPGs, one containing the alpha mask and another with the base image. Then it's combined at runtime into a transparent texture. I was wondering if is possible to do something like that in monkey? it would save HUGE amount of disk space which would be cool especially for web/mobile platforms... :) |
| ||
I was wondering if is possible to do something like that in monkey? No, it is currently NOT available in mojo. That said, mojo is capable of doing this, but I wish the library were written in a way that we could write a custom extension without hacking the base code for everyone to enjoy. |
| ||
Thanks, well I hope maybe Mark himself will add this, since is a very useful command. I can compress PNGs to about 25% of the size and you can't notice any loss of quality :) For big games you can save lots of MBs of space! |
| ||
being able to set an image's alpha mask with another image? That's a +1 from me. I'd even settle for being able to set the clipping region (scissor) to a non-rectangular value with a point array. Anything to give me that flexibility, since it has a lot of practical applications beyond OP's usage. Many graphical effects could be done with proper masking/region support. |
| ||
Let's hope Mark add this in a future update! :) |
| ||
I would like this very much myself. Constraints of mobile devices make graphics hacks of various sorts very valuable and I wish there was more in there, like image filled polygons. Instead I have to write external tools to do this and bake polygons onto a transparent rectangle for use as a hard asset. Would make things much easier if this could happen on the fly. |