No Article Today

Sorry, but there will be no article today. Stay tuned for more articles starting next week!

Stepping Through The Stage3D Pipeline

My article Stage3D Pipeline in a Nutshell is a conceptual journey through the phases of the 3D pipeline, but today I’m going to talk about the practical side. What code do you write if you want to transform points and vectors from one space to another? This article will show you how to do that.

Read the rest of this article »

Stage3D KIL Command

Flash Player 11’s Stage3D gives you only a few opcodes to do conditional logic and none of them are as effective as the good old if in AS3. The most unique one of all is the KIL opcode that discards the pixel being drawn. How does it work? How does it perform? Today we’ll find out!

Read the rest of this article »

Utility Function: indexedTrisToString

This week’s article offers another useful utility function: indexedTrisToString. This function is especially useful when dealing with 3D engines such as those based on Context3D.drawTriangles or Graphics.drawTriangles. It helps to untangle the complicated indices/vertices format that these API functions require into something much more readable and, therefore, debuggable.

Read the rest of this article »

Utility Functions: joinN and joinNLabeled

It’s been a while since I’ve posted a utility function, but today I’m breaking the streak and posting a couple of related functions I frequently find useful in debugging: joinN and joinNLabeled. These functions are like Array.join and Vector.join, but they group elements of the array to make the resulting string much easier to read.

Read the rest of this article »

Stage3D Pipeline In A Nutshell

Amazingly, everything you see in a Stage3D scene is one of two very basic elements: the solid background color and a triangle. Yes, realistic portrayals of human avatars, fantastical renderings of futuristic spaceships, and every special effect you’ve ever seen are nothing more than cleverly-processed triangles. Just how are they so cleverly processed to get these effects? Today’s article takes you through the journey these triangles take from lowly three-sided shapes to building blocks of immersive experiences.

Read the rest of this article »

Speed Up Alpha Textures With Stage3D By 4x

Now that we know how to use textures with an alpha channel in rendering Stage3D scenes, let’s see if we can cut the performance cost so we can use them more often. Today’s article will show some tricks to optimize your rendering loop.

Read the rest of this article »

Using Alpha Textures With Stage3D

Stage3D makes a lot of common tasks more complicated. One such task is using a texture/image that has alpha on it. With classic 2D Flash, this is done automatically for us. With Stage3D, we must resort to some obscure tricks. Today I’ll show you those tricks so you can use alpha textures in your Stage3D-accelerated Flash app.

Read the rest of this article »

Sorted Array

AS3 gives you arrays and a way to sort them, but no easy way to keep them sorted as you add elements to them. Today’s article discusses an easy way to do just that: build a sorted array and keep it sorted. As a bonus, the array provides very fast searching for the elements it contains.

Read the rest of this article »

Better Ways To Check Class Inheritance

If you want to check if one class inherits another without actually having instances of those classes, you may have read my article on Checking Class Inheritance. However, as the many comments quickly pointed out, the methods of checking this may have some flaws. There were also additional methods posted in the comments that should be added and tested. Today I’m adding them, testing them, and checking all of their validity to find the ultimate approach to check class inheritance.

Read the rest of this article »