Archive for July, 2012

Procedurally-Generated Shape Collection

Today’s article presents a collection of procedurally-generated 3D shapes for Stage3D. In addition to spheres and cylinders, I’ve added circles, pyramids, cubes, and quads to the mix and refactored them all to inherit from a new Shape3D class. Read on for the full source code for all of these as well as a demo app.

Read the rest of this entry »

Tags: , , , , , , , , ,

5 Comments

Procedurally-Generated Cylinder

A couple of weeks ago I presented a procedurally-generated sphere for Stage3D. Today I have one more procedurally-generated model for you: a cylinder. Cylinders are useful for a variety of purposes, especially during debugging. For example, you can use them to show the direction a player’s gun is pointing or to construct a simple X, Y, Z axis display. Read on for the source code and a demo app!

Read the rest of this entry »

Tags: , , ,

1 Comment

Stage3D Picking: Mouse and Touch Interaction

Virtually every 3D app or game will need to support mouse or touch interaction with the 3D scene. Consider a real-time strategy game like StarCraft where clicking on units is essential to the gameplay. Check out the Stage3D API and you’ll quickly realize that there’s zero functionality to handling mouse or touch events. So how do all of these games handle it? The answer is a technique called “picking” and this article will show you how to implement it.

Read the rest of this entry »

Tags: , , ,

10 Comments

Procedurally-Generated Sphere

The most common way to obtain the geometry of a 3D model is from a file output from a modeling package like 3D Studio Max, Maya, or Blender, but it’s not the only way. In the case of simpler forms of geometry it is practical to generate it yourself using AS3 code. When you do this you eliminate the needed download and gain the flexibility to scale up or down the complexity of the model on a whim. Today’s article shows some AS3 code to generate spheres for all kinds of uses: planets in space simulators, placeholders for debugging physics simulations, and whatever else you can dream up.

Read the rest of this entry »

Tags: , , , ,

1 Comment

No Article Today

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

No Comments