Adobe AIR for Linux - Beta

September 28th 2008

http://labs.adobe.com/technologies/air/

Another step for being Windows/MacOS free! The alpha version was out for a couple of months already, but wasn't working too well. The beta runs pretty well the app I'm working on at work :)

no comments

What does the Google Chrome logo inspire you?

September 28th 2008


Román's idea seemed good excuse for me to start playing around with flash game development... you know, logic, timing, addiction, scores and all that.

It also was a nice little project for try gTween out, which seemed a bit weird in some cases, but was very easy to use.

And, this time the bug in flash player seemed to have random delays when playing sounds. It is only on the Linux version tho, on the other platforms everything was perfect.

Have fun!

no comments

Some new Flash 10 Shaders for realtime effects... and maybe a Shader bug?

September 1st 2008

Another thing I can get rid from my to-do list. My introduction to the Pixel Bender/Flash10 Shaders world. Yesterday afternoon I decided to give it a try and see how all this worked

First thing was setting up FDT to compile Flash10 movies, something that ended up being quite easy thanks to this post. By the way, in case you're wondering... FDT on Ubuntu seems to be doing very well, no problems so far. Unfortunately I had to go to Windows in order to do the Pixel Bender part.

Dealing with Pixel Bender was kind of fun, although I was missing a timer (incremental) value, something to easily test my filter moving. Maybe there is something for it already but I just didn't find it on the few hours I played with it.

Once the filters were done I tried them with Flash10, and then that Tinic post popped into my mind and realised how slow it was (compared to the Pixel Bender). I'm sure the filters can be optimised but I just left them easier to understand so whoever feels like can start playing with the values. However, they are fast enough for 512x512 action or for fullscreen single frame distortion.

Ok, show time...

Hypno shader
.pbk (Pixel Bender file)

Planes shader
.pbk (Pixel Bender file)

Rays shader
.pbk (Pixel Bender file)

Rays 2 shader
.pbk (Pixel Bender file)

Sphere shader
.pbk (Pixel Bender file)

Star shader
.pbk (Pixel Bender file)

Tunnel shader
.pbk (Pixel Bender file)

Tunnel 2 shader
.pbk (Pixel Bender file)

Tunnel 3 shader
.pbk (Pixel Bender file)

Tunnel 4 shader
.pbk (Pixel Bender file)

Vortex shader
.pbk (Pixel Bender file)

Wave shader
.pbk (Pixel Bender file)

If you're wondering how I managed to do that many effects in just a couple of hours, here it's a hint... iq.

All the .as, textures and compiled shaders are here.

What to do now? Well, I would suggest you to download Pixel Bender load any of those .pbk files, find the line where it says // This is where the magic happens and play with the formulas there and make your own ones.

Have fun! :)

6 comments

FDT does work in Linux

August 19th 2008

Seeing that FlexBuilder Alpha 4 still didn't have refactoring I had to search once again for a solution with FDT on Linux. And well, seems that a solution for my problem has been out there for months!

I managed to register it without problems, but when I was creating a class I had this:

package com {nullimport flash.display.Sprite;/**null * @author Mr.doob */nullpublic class Main extends Sprite {nullpublic function Main(){null}}null}null


Maxim Zaks posted the solution here.

you can check this by going to Menu: "Window/Preferences/General/Workspace" and than in the "New text file line delimiter" Panel change from "Default" to "Other: Unix"

Big Pheeew!!!! Having to swap between FDT and FlexBuilder in some projects were driving me nuts... this really looks like the final "Bye bye Windows!".

no comments

Sorry for the delay...

August 19th 2008

Well, that was the first line in some emails I decided to answer today. There used to be a time I answered everything and helped everyone that asked for help, but seems like these days are over.

Well, not really, I still reply, only 6 months later ;) But... if I don't reply, please accept my apologies, blame to however invented time! :)

no comments

Hi-ReS! Stats

August 11th 2008

I've recently seen the class being used in the wild so I guess it was time to properly publish it.

Since the beginnings I've always had a FPS meter class, really basic, but had to be there. Then Carlos came along with one with a nice visualizer of the performance and then I saw Alternativa's one and I though that was the best approach. However, it had some issues, the speed of the graph seemed a bit pointless as the history was of 1 second or so.



So I improved my own one on the direction of the latest, but having a graph history of about 10/15 seconds, having a clearer picture of how your app/site is performing. Theo came along and helped with the graph visualisation too and then it went public.

Anyway... if you need a tiny and easy FPS/MS/MEM control panel, feel free to use it :)

http://code.google.com/p/mrdoob/wiki/stats

no comments

And now... can flash render a 320k+ voxels head?

July 21st 2008

Again, it can, and damn fast. Well, if it runs fast is all thanks to Román Cortés. which has done a magnificent job optimising the experiment.



If you want to know a little bit more about the details check Román's post.

Seems like using voxels is the best way to have highly detail 3D meshes rendered with Flash these days, although it also has it's limitations...

Ah!! Sources are available this time. (This time it's quite hard to understand tho ;P).

5 comments

Pixel Attack 08 - 3D Slides

July 21st 2008



So, as posted, I was invited to do a speech at this year's pixel attack.

As the topic of my speech was mainly 3D works (with some exceptions) I've been working on during this year I though would be a good idea to do the slides in 3D and get some anaglyphic glasses for the audience. I found a shop with very good prices and in a week that problem was sorted.

This year's presentation system was a was a bit more complex than the one used at LFPUG :)

HOW TO USE:
Keyboard left-right: Prev / Next slide
Mouse left-right: Move camera left-right.
Mouse up-down: Move camera up-down.
Mouse wheel: Move camera forward-backwards.



So, the thing seemed to work pretty well, and the organisers did a great job making sure everyone could enjoy the effect moving tv signals around and giving glasses to everyone.



Some more (clickable) screengrabs :D





Unfortunately I ran out of time (better to run out of time than out of content tho) and I wasn't able to show the last slide. So here are some links to some of the experiments I wasn't able to show:

First a performance test of a 3D engine I was working on. In this test there are about 1000 balls with the depth of field effect. When I did the effect with Papervision3D long time ago I was able to put 200, although I'm sure it can be pretty much optimised too.



And then, something I wanted to try for a while. Andre Stubbe used to have a background on his site which looked similar to this. I though it was a render, but apparently was also real time (with Java). However, he sent me the sprite so I could try to achieve the same effect with flash.



And that's about it, many thanks to the organisers once again for doing a great job and keeping everyone happy, and hope they keep the vibe one more year! Which by the way, extra kudos for them as they probed that you don't need £500 tickets for doing these kind of events (the entrance was free).



On the pic (in a random order :D): Maria, Dave, Javier, Sole, Yingshun and myself

no comments

My take on the RA DIOHEA_D / HOU SE OF_C ARDS thing

July 20th 2008

I'm sure you have heard of that radiohead's opensource music video by now, and if you consider yourself a proper geek you have also played around with the data. At first I wasn't too motivated on doing anything on it, but as I was playing around with voxels I wondered how would the data look like, so yeah, another geek for the bag.

Displaying the first frame was more or less easy, the biggest job on this is optimising the data to something easier to handle online. Each frame in the original data is 400kb, so I was quite happy when I managed to get it down to 30kb myself. Add it the 9kb of my (in the works) 3d engine, and you got a 39kb .swf:

HOW-TO USE:
Mouse left-right: Move camera left-right.
Mouse up-down: Move camera up-down.
Mouse wheel: Move camera forward-backwards.
(MaOS users: key up/key down)



Reducing the data in this case was basically converting all the float values to integers, and then just saving the deltas instead of the real values. This is, if you have (80,80,80), and the next points are (81,81,81), you only save the difference (1,1,1), that would then compress very well, specially because you will end up with a lot of 0s and 1s. Actually, if the value was 0, I would just delete it so I would save (2,,1). The code you need for reconstructing the data is very tiny so it's really worth the work :) Then I saved the whole thing as a string, and added in the actionscript code, flex did the rest when (zip) compressing the final .swf.

Having this done, I showed to some friends, and they were all asking "Doesn't it move?". Oh well... time for a long night ;) After a couple of tests and learning to use byteArrays and stuff like that I managed to have 1000 frames in 40Mb (zipped). Which is 10% of the original. At first I had them at 33Mb (in ASCII), but the process of reconstructing the data was too hard/slow for actionscript and also for the user's memory (1GB+), so the 40Mb option was the best. I'm sure Iq would've been able to reduce the 2000 frames to 5Mb, but well. (Kudos to him for sharing all these compressing tricks btw :D)

This is what I got in the end:

HOW-TO USE:
Same controls as before, but with an extra of patience :P



I also used in the experiment Fzip which did a great job.

I'm not sharing the sources on this one because I'm still working on that 3d engine and I'm still moving things around, but I should be able to release it (and many other tests) in a few weeks (yeah, I know I always say that). However, I can share the php script I did for parsing the frames.

EDIT: Wow, Aaron (the guy that did the original flash visualiser) wrote me asking if I was using shorts (numbers), and I wasn't, because I didn't know there was something smaller than Ints :$. So I've just changed the script to save the info using shorts and the zip now is 33Mb, so 7Mb reduction there :D I've also fixed a bug that sole spotted on the animator.

1 comment

Can BitmapData.setPixel() fill your Browser at ~30fps?

July 17th 2008

Well, seems like it can!

flaxor

This is something I was testing some weeks ago while on holidays. I was testing some tricks to improve the speed of flash raster methods. While at it, I played around with the usual XOR code a bit but I wasn't getting much (~20fps at 512x256).

Weeks later, while having a nice coding session with Texel I found Forrest Briggs post about this same topic, applied everything together, and there we go, 1024x1024 at ~38fps.

The source code is very simple but if you want to take a look... here you have.

So... in short, never forget the BitmapData.lock() and BitmapData.unlock() methods, it gave a ~7 > ~38 fps increase.

no comments
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Some of the projects that I worked on.



Some of the HTML5 and Actionscript experiments I've done.