Category Archives: 3D

Augmented Reality Video for Bogdan Raczynski

This is an oldie but goodie. Ben Dawkins‘ 2004 video for ‘RPMDAP’ by Bogdan Raczynski downloads break-dancing pixel guys into a typical crappy UK student flat. Also succeeds in making batch files sound cool. How long before someone does something like this in papervision?

Building 3D Flash Sites that Work

It seems like every other site on FWA is using 3D Flash these days. 3D effects are great for adding an element of surprise to a website, since it’s still a relatively new technique. I’ve been building 3D engines since the Director 5 days, so it’s great to see 3D finally hitting the mainstream.

In this post I will describe some of the technical constraints to be aware of when building 3D Flash sites, then I will give examples of recent sites that are doing 3D right.

I’m a big believer in designing within technical constraints. Working with the technology rather than fighting it. Some of the most beautiful design is done in static black and white. Embracing constraints can actually inspire designers and lead to innovative solutions.

3D FLASH CONSTRAINTS

Responsiveness

With 3D sites its important to keep the frame rate up (at least 20 fps). Otherwise your animations are going to be jittery and responsiveness is going to suffer. The simplest way to increase frame rate is to make the active 3D area smaller (in pixel size). Other options to increase performance are:

  • Reduce the number of 3D objects
  • Use 3D panels with bitmap textures over 3D models
  • Use 2D sprites over 3D objects
  • Use flat color textures over bitmap textures
  • Use non-precise bitmap textures over precise bitmap textures

Interaction

If you go to the trouble of using a 3D engine you need to make it interactive. Playing canned animations on button click does not provide any advantage over a pre-rendered video animation that may be cheaper to produce and may look better (see an example here). One way to provide a nice immersive 3D experience is to move the camera slightly on mouse move (sometimes called ‘mouselook’). This approximates how the world looks when we move our head around. It’s also important to keep motion and camera movement simple. Too much flying around can cause confusion and even nausea 🙂

Simplicity

Complex, realistic 3D environments are beyond the ability of the current generation of Flash 3D engines. It is often better to add a few simple 3D elements to an otherwise 2D site. For example the 3D page flip (click the ‘Flash94 CMS’ button here for an example ). A great source of inspiration for this type of design is TV motion design. TV ads often use subtle 3D animations on otherwise flat layouts.

Load Time

The 3D engine itself is typically ~100k. Then you have the 3D models and textures which can be large. To avoid file bloat, use simple or programatically generated shapes and simple textures. One trick is to display some simple 3D geometry after the engine has loaded and before the rest of the models and textures are loaded.

Development Time

Building a 3D site typically takes at least twice as long as building the equivalent 2D site, depending on the complexity of the 3D elements. When building a 3D Flash site it’s important to iterate early and often. Often 3D sites can be unusable due to bad camera placement or unintuitive controls. It’s critical to get an early ‘hands on’ with the prototype in order to refine the interaction.

EXAMPLE 3D FLASH SITES THAT WORK

Eco Zoo

eco zoo

This is probably the slickest 3D flash work on the web (check out the pop-up books). Incredible attention to detail including depth-of-field blurring. Uses a fixed-size 3D area and Paper Mario style planes over true 3D models. One gripe is that since the camera movement happens on mouse drag you don’t get the 3D feeling until you start dragging around. Using a custom engine built by Roxik who is doing some incredible 3D work out of Japan.

Fifa Street 3

fifa

Combines simple 3D planes with pre-rendered 2D sprites. Uses a 2D overlay menu. Fixed size, centered 3D area. Subtle mouselook gives 3D feel without sacrificing usability. Built by B-Reel using Away3D.

Lumina Live

lumina

Simple but effective. Features a number of randomly positioned planes that form the pixels on a plane. This is reminiscent of one of the first papervision demos. By Kilo Studio.

Karim CZ

karim

Uses simple 3D transitions and flat textured planes. A nice twist on the classic portfolio site. By Phillipe Roy, using Papervision.

If you know any other examples of great usable 3D Flash sites please share in the comments.

More 3D Ribbons

ribbons!

If you follow this blog you’ll know I’ve been obsessed with 3D ribbons for a while now. I ported my AS ribbon code to Processing and I’m very happy with how it turned out. It’s refreshing to not have to worry about frame rates, since processing’s 3D performance is so good

Here’s the processing sketch and source code. You will need a fast machine with OpenGL support to run the sketch – basically don’t blame me if it crashes your browser ;).

[UPDATE – it seems OpenGL sketches don’t like to run off the web. I uploaded a P3D version here that should be more compatible. Since it’s not using additive blending you get a strange pink color instead of the nice glowy white…]


Untitled from felixturner on Vimeo.

It would be nice to get some realtime glow/blur in here to smooth things out a bit. I think this library may do the trick but it could take me a while to figure it out.

Messing with P5Sunflow

Cube Explosion

Ray tracing is the CG rendering technique used in Pixar movies and most other broadcast quality CG. Basically it bounces millions of virtual photons around the scene to simulate how objects reflect light and cast shadows on each other. This produces super realistic images at the cost of being very computationally expensive.

P5Sunflow is a Processing version of the SunFlow open source Java ray tracing implementation created by Mark Chadwick.

P5Sunflow produces images with creamy shadows and a solid sculptural feel that are quite different to anything you can achieve with most real-time 3D engines. Unfortunately rendering times are really slow. The videos below are overnight renders. I’d be interested to find out if there is some kind of ‘fake’ ray tracing that produces similar results quicker.

Click through to see the HD and downloadable QuickTime versions. These work well looped in QT.


Cube Wall from felixturner on Vimeo.


Sunflow Phase Towers from felixturner on Vimeo.

You can download the Processing sketch for the cube wall animation here. To use it you need to install the P5Sunflow library as described here. To run P5Sunflow you need to use the version of Processing that comes without Java, since it requires Java v1.5 and Processing comes with Java1.4.

Flash Player 10 3D versus Away3D

3d test

One of the most exciting new features of the new Flash Player is the native 3D support. I put together a couple of demos to compare FP10’s 3D performance versus the ‘old-school’ approach, using the Away3D library (I didn’t have time to build a PaperVision example, but I imagine the performance would be similar to the Away3D one).

These demos display video and text on multiple 3D planes. Take a look and see what kind of frame rates you get.

Here are some observations based on the demos:

  • FP10 wins in terms of performance. This make sense when you consider that the 3D math is being handled internally.
  • FP10 wins in terms of SWF size (6k versus 110k). Away3D has to load in all the 3D code externally.
  • FP10 3D has no concept of depth sort. Depth sort must be handled manually. For simple scenes this is trivial, but once you get many polygons intersecting, depth sort can become a complex problem.
  • The FP10 perspective distortion looks a little odd to me. The plane seems to get bigger at the right and bottom of the view.

FP10 offers a very limited subset of the functionality offered by Away3D and PV3D (no cameras, complex objects, collada import etc), but for simple 3D scenes it gives much better performance. In the near future I imagine the PV3D and Away3D teams will incorporate FP10’s native 3D support to give the best of both worlds.

(Thanks to Keith Peters for his minimal components used here.)

Towards the Next Generation of 3D Visualization

desaxis

I love Flash – I’ve been using it for years and know most of it’s tricks. Now with papervision and away3D we have a some nice 3D APIs. While these are great, 3D in Flash is seriously lacking in rendering power. Once you throw a few hundred simple 3D shapes on the stage, your frame rate starts to plummet.

Flash is still the best choice for ubiquitous interaction on the web, but for 3D graphics, there are some better alternatives. Please note that I am not lobbying for native 3D graphic card support inside Flash (that didn’t work out too well for shockwave).

From my research so far, 2 of the most interesting apps for creating next-gen realtime 3D graphics are processing and vvvv.

PROCESSING

Processing has been around for a while and is gaining traction as a 3D visualization tool. Processing is free and cross-platform. The flickr processing pool shows the kind of stuff you can build with it. Since Sun updated the java preloader graphic to be cool and orange, we might even start seeing some all processing websites.

proccessing IDE

I’ve resisted learning processing for a while, but when Robert Hodgin generously released some of his source code I had the motivation to download and try it out. Surprisingly, processing comes with a nice, lightweight IDE. Each project is a sketch which is basically a folder containing simple text files. Processing has a number of libraries and examples for handling 3D graphics.

Lennyjpg is creating some beautiful work with processing:

...

As is Flight404:

VVVV

vvvv is a ‘toolkit for real time video synthesis’. It’s a crazy app built by some crazy german people. The tutorials are written with typical deadpan teutonic humor. It’s currently windows-only and free. Jitter is a similar cross-platform app.

The concept of vvvv’s UI is ‘patches’. Modules are laid out in a 2D space and patched together with virtual wires. The beauty of this paradigm is that there is no compilation – results are rendered in realtime as you tweak the patches. Since I come from a textual programming background I find this to be quite baffling, but maybe it’s good to have your head turned around now and again.

patches

Desaxismundi has been creating some fantastically beautiful pieces using vvvvv such as this deconstructed sphere:

and these:

desaxis

desaxis