blog

Tag Archive for pixel bender at Jozef Chúťka's blog

September 14, 2010

4 Comments

3d 3ddm anaglyphs displacement fade pixel bender

3D Displacement Maps

Three displacement map examples: a mountain, a street and a portrait.

Good news everyone, since 3D displacement maps gained big success, I was asked to make a standalone application, so anyone could use it within their webpages. After few hours of hard work, the 3 applications are finally out and you can see and download it from 3ddm.yoz.sk. Feel free to use it on your own webpages. If you do so, please notice the copyright, and/or consider a small donation via PayPal (donation button in footer). If you are willing to see the source code of these application, you can download it from here: App3DDMSimple.as, App3DDMFade.as, App3DDMAnaglyph.as, App3DDMSimplePV.as, App3DDMFadePV.as, App3DDMSimpleAW.as, App3DDMSimpleTriangles.as, additional classes, .pbk and .pbj files can be downloaded from classes.yoz.sk. Any feedback welcome :-)

Read the rest of this entry »

August 2, 2010

6 Comments

ByteArray Endian pixel bender Shader ShaderJob Vector

Pixel Bender Inputs – Vector or ByteArray

Stylised Pixel Bender logo.

Pixel Bender for Flash Player lets you play some more advanced games. Based on your needs you can force your kernels to “eat” not only BitmapData, but also ByteArray-s or Vector-s. With this knowledge, you can simply use Pixel Bender kernels for some fast math or processing like 3D engines (3D to 2D projection) etc. Lets have a look at some simple demos, how to push vector and raw bytes directly into shader via ShaderJob:

Read the rest of this entry »

June 28, 2010

19 Comments

anaglyphs cyan depth map matrixes pixel bender red

Anaglyphs With Pixel Bender & Depth Map

A red and cyan anaglyph image of a lion statue outside a building.

Pixel Bender and displacement maps were so much fun to develop that my next experiment led me to create some more advanced effects. Do you know anaglyphs? Anaglyph images are used to provide a stereoscopic 3D effect, when viewed with 2 color glasses. There are multiple types of glasses (colors), but the most comon is red-cyan combination. So, I have created this simple pixel bender kernel that makes anaglyph images based on original image and its depth map (just like those used in displacement maps)

Read the rest of this entry »

May 10, 2010

26 Comments

3d Bitmap displacement pixel bender

Pixel Bender Displacement Map Fakes 3D Effect (update)

A white flower against a blue sky and green field.

Few days before I saw an amazing 3d effects on VidazPhoto. That made me want to master this effect. So, starting today morning I played around with flex and pixel bender and here are the results. I have created simple pixel bender kernel that uses monochromatic bitmapData to calculate amount of displacement for each pixel. All you have to do, in order to make your 2D images become 3D, is to create monochromatic map (black & white image) with the same dimensions as the original image (use lighter colors for closer objects, darker colors for distant ones). Than, based on rotation, push correct amounts of full displacement (dx, dy displacements for full white color) into shader. The displacement is linear starting on 0, 0 for black color, up to dx, dy for white color. All sources available to download.

Read the rest of this entry »

March 19, 2010

No comments

fork game of life Graphics pixel bender shorten Sprite with wonderfl

Game of life (update)

A black-and-white grid with clusters of live cells from Conway’s Game of Life.

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is the best-known example of a cellular automaton. The “game” is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input from humans. One interacts with the Game of Life by creating an initial configuration and observing how it evolves.

Read the rest of this entry »

February 18, 2010

3 Comments

BitmapData fps pixel bender Shader ShaderJob

Pixel Bender Disco

An abstract blurred green image.

While playing with pixel bender, I created some simple sahders that when combined, reminds me of winamp visualizations effects. Feel free to use any in your own projects.

Read the rest of this entry »

February 16, 2010

2 Comments

Audio effects equalizer pixel bender Sound spectrum

Processing Audio in ActionScript 3 and Pixel Bender

Green and yellow bars in an audio spectrum visualisation.

Recently I was trying to make some noise with flash, and soon I realized that audio processing is not that easy thing as it may look like. Anyway here is a list of some interesting articles and examples with gain, equalizer, pitch, effects, pixel bender, I have came across while gathering information.

Read the rest of this entry »

January 19, 2010

7 Comments

pixel bender Shader ShaderExplorer ShaderFilter ShaderInput ShaderLoader ShaderParameter

Pixel Bender Explorer

Pixel Bender Explorer showing a kaleidoscope image and adjustment sliders.

Pixel Bender Explorer is simple application that lets you dynamicly load .pbj files, apply it on image and edit shader values. Application uses two classes. ShaderLoader class loads external .pbj file and casts loaded binary data into Shader object. ShaderExplorer class inspects created Shader object and generates editable form based on Shader parameters. You can load your own external .pbj files (crossdomain.xml required near .pbj file) or feel free to download and use whole .swf application localy.

Application inspired by Enumerating Pixel Bender filter parameters and metadata dynamically in Flash and Introduction to Pixel Bender: Part 2 articles.

Read the rest of this entry »

January 8, 2010

11 Comments

benchmark BitmapData ImageResizer Matrix pixel bender Point resize ResizeMath

How to resize an image with ActionScript (update)

imageResizeLanczos

If you need to resize an image on client side, I mean real bitmapData resize (not just showing scaled), feel free to use ImageResizer class. This class takes bitmapData of source image, new width and height and resize method (defined by ResizeMath class), and returns new bitmapData of resized image.

Update: It seems that bitmapData.draw() method uses bilinear algorithm when scaling via Matrix. Bilinear algorithm gives you fine results when downscaling no more than 2 times (400px -> 200px). So, I added bilinearIterative() method into ImageResizer class that creates resized bitmapData by multiple steps achieving much smoother results!

Read the rest of this entry »

November 3, 2009

No comments

Augmented Reality Away 3D FLARManager FLARToolKit Papervision 3D pixel bender video tutorial

Quick tip: Augmented Reality – where to start

A green 3D character overlaid on a printed marker using augmented reality.

I am looking forward to work with augumented reality in next project. This technology seems to be fun, but for now I did not worked with it. So my first steps were to see some tutorials and examples and I want to share interesting stuff I came across. This video tutorial from Lee Brimelow gives you great preview of some examples and basics. Then your next step is to get FLARManager (wrapper for basic FLARToolKit) and one of the 3d engines away3d or papervision3d (would be a good choice).

More tutorials:

Video tutorial

Video tutorial + pixel bender

AR Flex project from scratch

Getting started with AR

More examples:

http://www.boffswana.com/news/?p=392

http://ge.ecomagination.com/smartgrid/#/augmented_reality

http://www.livingsasquatch.com/

http://durej.com/?p=112

http://www.trick7.com/blog/2008/05/17-005233.php

http://saqoosha.net/2008/08/31/1221/

http://flash.tarotaro.org/blog/