19
Aug/08
1

3D Engine V0.2

Added face rendering and a material management system to V0.1, still a lot to do though. I’d like to do more pre calculation, a few classes for the primitives, textures and a lot of performance increase by backface culling, and not calculating items behind you. Demo:

The navigation is still somewhat ackward for the sake of simplicity;

  • W,S let you move along the z-axis
  • A,D let you move along the x-axis
  • Numpad 2 and 8 let you move along the y-axis
  • Left and right arrow keys let you rotate left and right
  • Up and down arrow keys let you rotate up and down

Thanks to Senocular and Lifeztream for these two classes;
Senocular’s keyObject class – for detecting multiple keyboard presses at once
Lifeztream’s FPS class – for displaying the 3D engine performance

19
Aug/08
0

3D Engine V0.1

It is still very much in development but, this version is a big improvement over the proof of concept. Currently it only renders dots. But the entire architecture has been revamped including a geometry storage system and movement. Checkout the demo below;

There is still a lot to do though, most important beeing:

  • Face rendering
  • Material system
  • Bitmap transformations

The navigation is still somewhat ackward for the sake of simplicity;

  • W,S let you move along the z-axis
  • A,D let you move along the x-axis
  • Numpad 2 and 8 let you move along the y-axis
  • Left and right arrow keys let you rotate left and right
  • Up and down arrow keys let you rotate up and down

I again used these two classes;
Senocular’s keyObject class – for detecting multiple keyboard presses at once
Lifeztream’s FPS class – for displaying the 3D engine performance

19
Aug/08
0

Proof of concept: Flexible 2D Particle System

Something very powerfull for creating reallistic and flexible effects is a particle system. This is a flexible and basic particle system I created about 2 months ago. Again this is just a proof of concept, currently the max. number of particles is about 400-500. But this can be greatly increased by removing the blur and replacing it with an image, this would however make it lose some of it’s flexibility. Below is a smoke demo, but the posibilities are endless, steam, fire, explosions to name a few…

Usage is as follows:
[sourcecode language='actionscript']import com.particles.particleSystem;

var scene:particleSystem = new particleSystem();
this.addChild(scene);
scene.pX = 40; // The x-position of the particle’s source
scene.pY = 50; // The y-position of the particle’s source
scene.vY = 0; // The speed on the y axis (can also be negative)
scene.vX = 4; // The speed on the x axis (can also be negative)
scene.deviation = 2; // The possible deviation from the standard speed
scene.transparency = 1; // The transparency of the particles (levels lower than 1 greatly deteriorate the performance
scene.color = 0×000000; // Colour of the particles
scene.lifetime = 5000; // Lifetime of the particles in milliseconds
scene.size = 10; // Size of the particles
scene.maxParticles = 300; // Maximum number of particles
scene.startBlur = 10; // The amount of blur
scene.bExplode = false; // Set this to true if you want to let the particles all explode at once

scene.start();[/sourcecode]
There is still quite some room for improvement, especially getting to know when to stop the particle system is a bit tricky.

Download the Particle System class

19
Aug/08
1

Proof of concept: Flash 3D engine

I tryed a few things out in AS2 before but without much succes. With AS3 however, the new OOP structure and performance increase greatly improved the possibilities for a 3D engine in flash. Now I know there are things like this (and obviously much better) out there like Papervision3D and Sandy3D, but sometimes I like to reinvent the wheel. This is just a proof of concept; performance is far from good and there is a great lack of important features. A real version might be just around the corner though…

The navigation is still somewhat ackward for the sake of simplicity;

  • W,S let you move along the z-axis
  • A,D let you move along the x-axis
  • Numpad 2 and 8 let you move along the y-axis
  • Left and right arrow keys let you rotate left and right
  • Up and down arrow keys let you rotate up and down

On a side note; I used a few ‘must-have’ classes from others;
Senocular’s keyObject class – for detecting multiple keyboard presses at once
Lifeztream’s FPS class – for displaying the 3D engine performance

And of great inspiration were;
Flash and Math’s simple 3D tutorial
Kirupa’s 3D tutorial