Poll: Do you use ATF texture atlases?

I completed the ATF(ETC2) texture test on a Samsung phone, not on Adobe AIR mobile.

Ah nice work @oni. I’d been fiddling around with that but hadn’t had any luck yet. I’ll have a go with what you’ve shared, thanks :smiley:

On iOS, I like practical ASTC textures:GitHub - rainyt/hx-astcenc: Create ASTC format texture file. And OpenFl Target ASTCBitmapData.
This applies to direct use of OpenFL.

I used Adobe’s official atftools to create ATF files, and I believe the alpha channel of the ATF (ETC2) created by this tool has a problem. Flash runtime will automatically use ATF (JPEG-XR) on devices that do not support ATF (ETC2). If targeting platforms other than Flash, I suggest using ASTC instead of ETC and BPTC (bc7) instead of DXT.

What container are you using for ASTC and BC7?

I managed to get success with ETC2 on my Android phone, with the following code adjustment:

@Bink

succeed?
Have all systems and goals been supported?

I can confirm that in my testing, I now have ETC2 support under the Android with the html5 target.

I have not tested iOS.

In theory though, if this is fully successful, it should provide GPU texture compression supporting alpha, to a wide range of desktop (via existing DXT) and mobile devices (via now supported ETC2).

I don’t have the means to widely test this though, so it’s best to remain reserved about how successful this might be for now.

@Bink

How did you achieve it? Have you modified the internal code of ‘openfl’? Will this lead to other issues?

I modified openfl.display3D.textures.TextureBase. You can place that file in your project under src\openfl\display3D\textures\TextureBase.hx and it will override the native OpenFL TextureBase.hx file, if you’d like to try it.

I’ve submitted this as a pull request to the project, but keep in mind, that pull request is still subject to scrutiny and testing, and may not be accepted.

At the very least though, the issue has been flagged, so hopefully a resolution eventuates, one way or another.

Feel free to test and provide feedback :wink:

@Bink

Good morning, may I ask if you have resolved the method of using “ATF” on all systems and targets?

What I sought to resolve above in my PR, was absent checks for ETC2 support. Some wider testing will hopefully confirm if that’s worked for a broad range of devices, including iOS devices. I’ve only tested on my Linux desktop against native and html5 targets, and Android phone against the html5 target. Please feel free to give it a go and report your findings.

I would suggest that all going well with that fix, ATF should hopefully work (with alpha) on all systems and targets that support DXT5, PVRTC and ETC2. For any device made within the last decade, I suspect that’s a safe assumption.

  • DXT5 is supported by Windows desktop since 2002 and OSX since 2009.
  • PVRTC support was supported by iOS devices since their beginning in 2007.
  • ETC2 support was introduced to Android in 2013 and iOS in 2014.

Keep in mind, for the widest range of support from a single web application, you’d need to include all of those formats in your ATF. I’d suggest that in most instances, DXT5 + ETC2 is probably sufficient unless you want to also support very old iOS devices.

I’ve not mentioned ETC1 because of it’s lack of alpha, which I expect you’ll need.

Yes, ‘alpha’ is necessary

No idea if relevant or useful but hxRectPack2D supports some TexturePacker.

and JustGraphix my collated lib should have this now or in time.
Very sorry if I am not following detail etc.. my day job currently is more practical these days ( construction industry ) as found getting back into code as an ‘old-y’ hard when flash died. But lets be clear texture packer is not rocket science it is better open, lets keep solutions and perhaps even tools as optionally opensource.

@Bink

I have a question. Since ATF has advantages, why do modern game engines use PNG instead of ATF

ATF is a format developed by Adobe for Flash Player and AIR. I doubt that Adobe put any effort into promoting it for the wider game development community. Especially since they aren’t working on enhancing the ATF format anymore. Many in the wider game dev community are probably completely unaware of ATF.

However, it’s also worth mentioning that there are other texture container formats that are similar to ATF. For instance, KTX:

As @joshtynjala mentioned, ATF is Adobe’s proprietary container format. It’s in the name: Adobe Texture Format. The format is not an open one, so it wasn’t widely available, or adopted (except via Flash’s once upon a time wide adoption).

The texture compression formats it can contain though are widely adopted and used by modern game engines: DXT1/5, ETC1, ETC2, PVRTC.

The difference is the container used. So it’s not typically ATF, but it would be something that achieves a similar thing, such as DDS (DirectDraw Surface), or KTX @joshtynjala mentioned, which is arguably the most similar to ATF (KTX v1 at least) and is an open format (see my PR here).

@Bink
@joshtynjala

Thank you for your answer. Is there a recommended texture compression format for openfl? Require support for all systems and all objectives

By the way, do you still need to release goals for “Flash Player” and “Air” now?