• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

texture uploading with callback

Advocate ,
Jan 23, 2014 Jan 23, 2014

Copy link to clipboard

Copied

Hi,

Why uploadCompressedTextureFromByteArray allow report "complete" state and other don't allow to do this? Should I open feature request for this or I will be duplicate?

I mean we want use complete events also for BitmapData and ByteArray callback

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 23, 2014 Jan 23, 2014

Copy link to clipboard

Copied

Anton - uploadCompressedTextureFromByteArray is the only one that's asynchronous.  The other two operations (uploadFromBitmapData and uploadFromByteArray) are synchronous, so they block and upload, and they're complete before the next line of code executes.

That said, it would be nice to allow asynchronous upload for the other types -- perhaps this is exactly what you are asking for?  I assume this is very non-trivial, because if it was easy it would have been built that way.  Asynchronous texture upload (especially if it doesn't block the UI) is definitely preferrable.

Best,

-Jeff

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 23, 2014 Jan 23, 2014

Copy link to clipboard

Copied

Yes, I mean we need asynchronous uploading. Internally there is no differnce what to upload. ATF or BitmapData because it's decodes in CPU and than uploads to GPU. ATF can't be used for interfaces because it have big artifacts. Using asynchronous we can inform users about "loading" state without CPU hogging, because uploadng 4096x4096 on iOS (Adobe Air) it's long process and only asynchronous can help

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 31, 2014 Jan 31, 2014

Copy link to clipboard

Copied

Hi Anton. Why you don't use  uploadCompressedTextureFromByteArray if you require async upload? ATF textures can be used without blockbased compression so you won't get ugly rendering artifacts. The upload and decoding speed is much better then creating textures from bitmapdata. If the filesize hurts you, you can still enable lossless JPG-XR compression. But this will increase decoding time again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 31, 2014 Jan 31, 2014

Copy link to clipboard

Copied

Hi Dominik 😉  Yes, I know about uploadCompressedTextureFromByteArray. It's work fine for me. But just generate ATF atlas where I have the same game unit in different viewpoint (pseudo-3d) - OGL8888 as I see artifacts. So this why using BitmapData I don't see any artifacts... Also for reducing artifacts many developers apply small noise in photoshop to PNG before converting it to ATF. This remove small artifacts. With alpha near 0.1-0.3 without noise ATF make some blurring on thin image edges... So this why a lot of users still love BitmapData to GPU uploading...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 31, 2014 Jan 31, 2014

Copy link to clipboard

Copied

Hi Anton, i see your problem. A workaround for it can be uploading smaller textures tiles bitmapdata so you can track progress and have no blocking of the ui. After uploading draw them to a dynamic texture atlas (rendertexture)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 31, 2014 Jan 31, 2014

Copy link to clipboard

Copied

I have small DirectX background and I remember that you can't upload directly any atf, bitmapdata and etc data formats 😉 so this files anyway must by preprocessed. So why simply not add some small callback method for this and make it async ) May be there some deeper and hard things that I don't understand. But on the fast view looks like it's possible and not to hard.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 20, 2014 Feb 20, 2014

Copy link to clipboard

Copied

LATEST

Hey Anton,

If you wouldn't mind, please file a bug on this (the artifacts in uploadCompressedTextureFromByteArray -- please include an example SWF) at http://bugbase.adobe.com, and send me the number.  I'll get it escalated to the Graphics team to see if we can provide some pain-relief in that area.  That seems like it would yield the best outcome.

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines