Posts Tagged texture

When getSize() Lies

Tags: , , , , , , , , , , , ,

flash.sampler.getSize() is a handy tool for figuring out how much memory a class instance uses. However, it is often flat-out wrong. Today’s article tries it out on a variety of classes to find out which ones it works on and which ones it doesn’t.

Read the rest of this article »

4 Comments

Easily Create Power-of-Two Textures

Tags: , , ,

In almost all circumstances, Stage3D requires you to provide textures with power-of-two dimensions. This is often inconvenient as most images are not already sized that way. Today’s article provides a simple class to easily build a texture with power-of-two dimensions. An example app is also provided.

Read the rest of this article »

6 Comments

From DisplayObject to Stage3D Texture

Tags: , , ,

Flash makes it pretty easy to use any DisplayObject as a Stage3D texture. This is a great feature since you can use powerful, traditional classes like MovieClip, Sprite, TextField, and Shape to build a texture—often with vector graphics—and then use Stage3D‘s GPU hardware acceleration to render them with maximum performance. But this path is fraught with subtle problems, any one of which could result in poor rendering quality that’s quite hard to debug. Today’s article takes you through the process step by step to make sure you end up with great results.

Read the rest of this article »

1 Comment

System RAM and VRAM Explained

Tags: , , , , , ,

I’ve mentioned the concept of VRAM (video memory) in a few articles, but I still find constant confusion among readers of this site as well as coworkers and colleagues in day-to-day work with Stage3D. Today’s article will hopefully clear up the differences, dispel some myths, and help you make the best use of both of them.

Read the rest of this article »

8 Comments

Using ATF Is Harder Than You Might Think

Tags: , , , , ,

Using Adobe’s new compressed texture format should be as simple as replacing some PNG and JPEG images with ATFs their tools created, but it’s not. If you don’t know what you’re doing, the process can be pretty confusing. Today’s article walks you through the steps to upgrade a Stage3D-using app to make use of ATF textures.

Read the rest of this article »

16 Comments

Compress ATF Textures By 95%

Tags: , , , , , ,

ATF textures already contain a lot of compression: DXT, ETC, or PVRTC texture compression plus JPEG-XR and LZMA for good measure. What more can we do? As it turns out, we can drastically reduce the file size by simply applying Zlib or LZMA compression to the files. Read on for some samples with file size breakdowns.

Read the rest of this article »

13 Comments

ATF Texture Compression Image Quality and File Size Samples

Tags: , , , , , , , , , ,

Adobe’s newly-released ATF tools have introduced an all-new image file format: ATF, the Adobe Texture Format. It’s not every day we get a new image format. After all, PNG was introduced in 1996 and JPEG in 1992. For various reasons I discussed last week, you probably have good reasons to use this new image format. So let’s dive into it a bit and see what kinds of images it produces.

Read the rest of this article »

5 Comments

Compressed Stage3D Textures With ATF

Tags: , , , ,

Adobe has recently released tools to allow us to use compressed textures with the Stage3D API via their ATF tools. What are these compressed textures? Why would we want to use them? How do they work? Today’s article is an overview of compressed textures covering these questions and more.

Read the rest of this article »

10 Comments

Stage3D Post-Processing Special Effects

Tags: , , , , ,

If you’ve ever used Instagram, you know about post-processing: full-screen effects applied just before the final image is shown to the user. With Stage3D, we can do similar effects in real time with our 3D or 2D scenes! Today’s article will introduce you to the basic concepts behind post-processing effects and show the code for a few simple post-filters. Read on!

Read the rest of this article »

6 Comments

Use Any Sprite As a Stage3D Texture

Tags: , , , , , , ,

Textures are usually simple bitmaps, but what if you wanted to use something more dynamic? How about a SWF you’ve created in Flash Professional? How about a Sprite or MovieClip you’ve created in code? Today’s article will show you how to do just that.

Read the rest of this article »

1 Comment