So. AGAL.
I started working with AGAL at Marcel with a coworker of mine a couple weeks ago. We’ve all seen what amazing stuff Stage3D allows to do, and maybe you went for the Away3D examples and compiled them.
While working with Away3D for my first experiments, I felt disappointed because I wasn’t able to go behind cubes, and spheres an other primitives because of an obvious lack in 3D modeling skills.
Then came Starling and ND2D, and we started to realize that Stage3D was also a wonderful tool to go for hundreds of sprites, particles, and animations.
But you have to face it : if you really want to understand how those thing works, either to improve them or to use those tool in the best way you can, you need to go deeper (krkrkr) and start using the Low Level API that Adobe gave us with Stage3D.
Like a lot of people, I start with a simple Hello Triangle example. But then, nothing. So we had to digg on our own.
In the next 3 or 4 posts, I will explain the principles and basics of Stage3D, and try to go a little behind the 3 colors triangle exercise.
Let’s start coding for Flash Player 11
First of all, we need to be able to compile something for Flash Player 11. I am using FDT, so you may have to adapt my explanations for some other IDE like Flash Develop or Flash Builder.
A lot of people already covered the subject so simply follow the example according to your IDE.
- Flash CS5
- Flash Builder
- FlashDevelop
- FDT
All links were found on Regart.net website
Make sure you can compile something with a dependency to Context3D before going any further.
Stage3D : What it is, and what it’s not
I feel that a lot of flash developer have been disappointed when looking at Stage3D. Adobe told us they were bringing true 3D to the platform, and now, all you get is this AGAL stuff, some numbers to write, no camera, no Scene3D, not even a z property on some Mesh object. Well.
Stage3D is only doing one thing, but it does it well. Stage3D only allows your to upload to your graphics card, or GPU, some data, textures, and a program to run. And that’s all.
What Stage3D is not is a 3D engine. A 3D engine allows you to work with Meshes, and Materials, and Lights, Cameras and tangible objects just like that. A lot of 3D Engine have been build on top of Stage 3D like Away3D 4.x, Alternativa 3D, Minko, Epic Game’s Unreal Engine or the Unity 3D Engine.
OK, you got it but now you want to learn actual things ? OK, go on then.
Basic 3D vocabulary
Like in Every domain, there is some specifics words you may want to know before going any further. I will keep it to the minimum, and explain later what is not absolutely fundamental.
GPU : Graphical Processing Units. In other word, your graphic card, or more precisely, your graphic card processor.
V-Ram : Video Ram. Your graphic car memory.
Buffer : Allocated space inside your V-Ram
Vertex : A Vertex is a point in a 3D space.
Fragment : Let just say it’s the color of a pixel right now
Shader : A Shader is a part of a program. Shaders come in two types : Vertex Shaders and Fragment Shaders. Fragment Shaders are also called Pixel Shaders.
Program : The combination of a Vertex Shader and a Fragment Shader.
That’s all for now !
In the next part, we will code our first triangle only using Stage3D, and try to understand the structure of a Stage3D program.
Pingback: Stage3D / AGAL from scratch. Part III – Hello Triangle | Norbz's Dev Blog
Pingback: 从头开始学 AGAL. 第一部分 – 基础 – LivingStone
nice work on these articles
Thanks a lot !
Looks like these articles won’t just teach me Stage3D and AGAL but also 3D concepts, looking forward reading all of your content! Great job!
Thanks. It is helps a lot.
so basic
Pingback: [AGAL个人笔记]第一篇:AGAL基础(译) | 影箜技术小站-ShadowKong.com