TextureMat.texture.invalidateContent(), BitmapData.draw() & BitmapData.copyPixels() extremely slow on iPad-Retina

Software: Away3D 4.x

Vbot, Newbie
Posted: 15 June 2012 02:39 PM   Total Posts: 10

Hello,

bin doing some testing with the new iPad (Away 3D 4 & AIR 3.3).
TextureMat.texture.invalidateContent(), BitmapData.draw() & BitmapData.copyPixels() seem to work extremely slow on it.

Anyone experienced the same?
After hours of testing & web-research, I guess it’s a general CPU/GPU-Power-Problem (no solution), but still, may be wrong…

Thanks for sharing!

   

Vbot, Newbie
Posted: 15 June 2012 10:54 PM   Total Posts: 10   [ # 1 ]

Hello,

I just want to share some new realisations on the subject mentioned above.

The performance of mentioned methods is highly dependant on the texture-bitmapdata-dimensions. On the ipad3 wie need rather big textures because of the retina-display. I’ve got some decent performance with a 512x512 texture (or below). Everything above that was way to slow, more than a second (nearly two) for a BitmapData-Update (draw) & updating the TextureMaterial (applied to a simple plane).

Please let me know, if you know some good trick in order to speed up this process -> updating TextureMaterial (dynamicly, not with per-rendered Images).

Thanks.

   

Richard Olsson, Administrator
Posted: 16 June 2012 10:41 AM   Total Posts: 1192   [ # 2 ]

What are you trying to achieve? Updating a texture is always slow on GPUs, because the entire texture needs to be uploaded from CPU-accessible memory to GPU-accessible memory. If you’re trying to make an animated material, you might be out of luck, unless you can pre-process the animation and upload all frames at once (as part of a texture atlas or as several separate textures.)

   

Vbot, Newbie
Posted: 16 June 2012 05:15 PM   Total Posts: 10   [ # 3 ]

Hi Richard,

What i tried to achieve is projecting a 2d movieclip to a 3d plane (on enterframe and single event). I’ve also been testing the speed of the methods above in general. But as you’ve already mentioned, this process seems to be very slow (bottleneck). I mean, it IS possible, just a “littlebit” slow depending on the texture size you need to update. A single 512*512 texture-update takes something around 250ms, a 2048*2048 texture-update nearly 2 seconds! So if I want to do something like mapping a dynamcly changed movieclip to a plane in full retina-resolution in order to smoothly spin it out of the screen in 3d-space, this action would be too unresponsive. I also think that Away3d materials like VideoTexture are of no use on the new iPad.

By the way, these things work much better on a desktop, but are still a performance-killer heavily dropping framerates.

I just hope these bottlenecks will vanish with better technology soon…

Thanks for your reply!

   

Richard Olsson, Administrator
Posted: 16 June 2012 06:34 PM   Total Posts: 1192   [ # 4 ]

I’m not sure what you mean by “smoothly spin it out of the screen in 3d space”. Can’t you just map it to a plane and then spin the plane out instead?

Don’t count on this getting any better. There are few use cases where extremely fast upload from CPU-space to GPU-space is necessary, so I doubt that graphic chipset manufacturers are spending much time on trying to improve that.

   

Vbot, Newbie
Posted: 17 June 2012 08:53 AM   Total Posts: 10   [ # 5 ]

Hi Richard,

I meant just that, to map it on a plane and spin (or any other animation) it out of the screen. One possible scenario would be a simple highres-page-flip in 3d-space using dynamicaly generated movieclips + changing texture on a plane if the movieclip changed. I programmed this already, the only problem is the responsiveness of the whole thing on the new iPad. The performance drop on a desktop is also significant, but doesn’t affect the responsiveness as much as on the iPad3 (15-30 times slower). So I believe there is some space for technical improvement, especially on the iPad3 (faster CPU in future). Anyway, this is NOT an Away3d-Bug! smile

Greets.

   

rich, Newbie
Posted: 25 July 2012 11:07 PM   Total Posts: 17   [ # 6 ]

Hello,

We are currently creating a Flex Mobile + Away3d 4.0 mobile app for the IPad3.  I was wondering how you got your app to run at full Retina-resolution.  Our app works pretty good but lines can still be pixelated in the display.  Any help/ Sample code would be greatly appreciated.

Thanks in Advance.

   
   
‹‹ Skybox visible not working

X

Away3D Forum

Member Login

Username

Password

Remember_me



X