2
Nov/08
0

3D Graphing in flash

Made a few quick mock ups for simple graphing programs using my 3D engine in Flash. Currently there is still a lot of room for improvement in speed, light angles and (invisible) shadows are being calculated which is unnecessary. Check out the applications in realtime at the read link;

One dimensional graph in 3D

One variable graph in 3D

Two dimensional graph in 3D

Two variable graph in 3D

1
Nov/08
4

V0.65 – Shadows in 3D!

Made a great lot of very usefull changes in this version. First and most basic being the addition of line and dot primitives in the rewritten frame loop. This allows for some really cool stuff you will see soon (3D graphs!). And the rewriting of the frame loop added a lot more possibilities for the future as well, with respect to light, shadows and glows. Checkout a realtime demo of the action after the read link.

A demo of the AS3 3D Engine doing shadows, realtime demo after the read link.

A demo of the AS3 3D Engine doing shadows, realtime demo after the read link.

12
Oct/08
1

Augmented Reality

I always think this field has been overlooked way to long. Augmented reality is a technology in which virtual objects are inserted into reality, most commonly with video footage. This makes for very powerfull video games but for now there has been no game that made any significant impact with augmented reality. Let’s hope there will be one day that Starcraft 4 or Rise of Nations 3 creates an entire battlemap of my desk. In the meanwhile check out this really cool video from Georg Klein and David Murray of the Active Vision Laboratory of the University of Oxford.

20
Sep/08
0

3D Engine V0.52

Made a huge leap forward the last few weeks, this version of the engine is actually quite usefull and easy for most simple 3D things. But I’m not quite ready to release source code yet there are still a few things to do, to make it more of a complete engine. Below is a demo of what it is capable of right now;

Bugfixes:

  • Altered the 3D camera translation function to something that also works when looking down on an object.

Known bugs:

  • The triangular polygons are now textured with only two triangles, this can still be increased…
  • Focal point singularity, some 3D points that are in the focal point of the camera move to an infinite distance.
  • Some polygons are incorrectly culled.

New features:

  • Added a cylinder primitive
  • Added a cone primitive
  • Added UV mapping for all primitves; cube, sphere, cylinder and cone
  • Added 3D lighting, for the moment it will support multiple light entities with only white light
  • Added ambient lighting
  • Added 3D surface normals
  • Added colouring and texturing support for triangular polygons

Upcoming features:

  • View frustum culling
  • Performance increase
  • Directional light and light with different colours
  • Roll camera movement
  • Object rotation
  • Texture perspective correction
  • 3D particles!

Maybe phong shading will also be possible one day with gradients but it’s not uber important. And I thought about doing shadows with the new bitmapfilter api, but that is all still very experimental. What matters the most at the moment is creating a finished version of which I will release all the source code for free. Soon I will also post about the inner workings of a 3D engine, something that I couldn’t find (as in all info being on one page) on the interwebs.

30
Aug/08
0

3D Engine V0.3

Made quite some progress lately. Got the constructSphere function up quite quickly, the UV mapping and copyPixels took a little longer but in the end really paid off:

Currently the UV mapping only works with spheres, but it will be easy to implement it into other models later. I’m quite pleased already with the performance; the demo above renders 529 polygons with a high resolution texture (1350×675 pixels). However there is still room for lots of improvement;

Bugfixes:

  • Added function moveObject, wich if drawing faces should be used instead of moveGroup. (Otherwise the midPoints don’t move and thus making the z-sorting work incorrectly.)
  • Reversed the y transformation in the process of making 2D points from 3D coordinates, because in the flash coordinate system the y axis is reversed

Known bugs:

  • For some reason transparent bitmaps don’t work yet, I’ll have to look into the different copyPixels and beginBitmapFill functions for this one…
  • For some reason looking down from above gives a distorted and unreallistic view, I’m not sure where this problem came from.
  • Faces that have one, two or three points behind the camera are rendered ackwardly, but this will be fixed in the next version with view frustum culling.
  • The backface culling function is not perfect yet, the top of the sphere shows about 3 faces beeing culled that shouldn’t be culled.
  • The edges of UV faces are visible sometimes, this is due to the repeat parameter I use to create parts of the bitmap fill might be able to fix this with a bit of a different matrix algorithm.

New features:

  • Textures from images
  • The function moveObject to move objects
  • A debug mode
  • The sphere primitive
  • UV mapping for spheres
  • Backface culling

Upcoming features:

  • Phong shading
  • More primitives
  • View frustum culling
  • Lighting and shadows
  • Performance improvements
  • Rotate object functions
  • And a few more…

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

29
Aug/08
4

DIY: Build your own 3D theatre

We all dream of it; when will we have our own 3D display in our home? Allthough I’m not fond of 3D displays with glasses, this one is definitly worth a mention. Over at WIRED magazine’s website (definitly worth watching) is a nice tutorial on creating your own 3D display. It uses 2 flatpanels, a half reflective, half transparent mirror and some woodwork.

I do wonder how you’re going to be sure you got the right polarisation, but maybe it’s standard for all polarised glasses and I think the top monitors polarisation is flipped or something by the mirror. And maybe you need a more transparent mirror to get less grey shade. Apart from that it is a great and cost effective way to get a cool 3D display.

Tagged as: , ,
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
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