.Nam Myoho Renghe Kyo.
[Lab] 3D study #01

Since flash is going hardcore 3D in the very near future ( with OpenGL ), i’d like to know more about this subject.
I have used almost all the 3D flash engines out there, but never actually dig into the actual core codes that make the vertices, polygons, faces and scenes. Using the native flash drawTriangles method helps in some way learning the concept, but still it doesnt cover it all. Even some early experiments like SphereStudy06,SphereStudy07 and PixelPrimitives helped me to somewhat understand it but still i felt i was behind no the subject. I also played with OpenGL in Processing but i still had hunger for more indepth knowledge!

Processing attempt (inspired by Joa Erbert )

Pixzor OPENGL Cubes test from Rackdoll on Vimeo.

So i set out to build my own 3D engine to fully comprehend the innerworkings of such applications.

I started out with building simple primitives made from real geometry, polygons and with basic lighting.
My first test turned out great but still had alot of performance issues as i was calculating each vertices rotation / movement completely by hand using sin / cos computations. Digging into my brain, google, away3D and PV3D i quickly realised i needed matrix calculations to pump up the rev and give it some better performance. A nice brain fight i must say. After some learning and alot of yelling i got the beast to work like i wanted.

So here is the first piece of my journey to fully understand 3D and its inner workings.
[SWF], 950,400[/SWF]
Basic primitives (spheres) with basic ambient lighting.

Moving on to the second part i will focus more on the lighting and shading of the polygons giving it a more smooth look. Searching the interwebs i found this very nice and helpfull explaination on this subject. Thus Gouraud / Phong shading will be my lovers for the time to come.
I hope they love me as much as i love them!

Helpfull links to get more insight:
Iñigo Quílez
OpenGL API Docs
Thibault Imbert on MoleHill
Rob Bateman

Comments are closed.