Sources and some words about PV3D AudioVisualisations - Effect04

Oct 10th, 2007

Well, I though I was going to have the energy of working on this as soon as arriving back from work... but I didn't. Anyways, waking up early again to finish up this stuff.

If you want to save time this is the link you were looking for:

http://mrdoob.com/lab/pv3d/vis/effect04/vis04.fla
(you will need this little class too: Pyramid.as, also you'll need to use Phunky version of pv3d (yes, Ralph, I finally tested it :D))

But, if you want me to explain a bit what's the deal with the fake glow and these things.. keep reading then ;)

So, the thing I was saying about the fake glow/blur is easy to achieve just copying the rendered image to a tiny bitmap and scaling the bitmap to match the screen. The code is simple:

mtr = new Matrix();
mtr.translate(stage.stageWidth * .5,stage.stageHeight * .5);
mtr.scale(.01,.01);

and then... every frame:

tinyBitmap.draw(rendered3D,mtr,null,null,new Rectangle(0,0,stage.stageWidth,stage.stageHeight));


I asume you know how to attach the bitmap to a Sprite and resize it.  The benefits of this method is that you get a not-so-bad blur that if you were using BlurFilter instead you would need a lot of blur passes to achieve the same amount of blur.

If you set stage.quality = "LOW" the effect you get is this:


http://mrdoob.com/lab/pv3d/vis/effect04/index_low.html

Which is also an interesting effect. In order to smooth that out you need to put the stage to at least MEDIUM quality. Doing this you will get the effect that you already know:


http://mrdoob.com/lab/pv3d/vis/effect04

Then, the other interesting thing for this effect was the Random camera movement. Tweener made an excellent job here with just this code:

function generateCameraPath()
{
    var bz = new Array();
    var bz_t = new Array();
   
    for (var i = 0; i < 100; i++)
    {
        bz.push( { x: Math.random() * 3000 - 1500, y: Math.random() * 3000 - 1500, z: Math.random() * 3000 - 1500 } );
        bz_t.push( { x: Math.random() * 2000 - 1000, y: Math.random() * 200 - 100, z: Math.random() * 2000 - 1000 } );       
    }

    Tweener.addTween( camera, { x: 2000, y: 2000, z: 0, _bezier: bz, time: 1000, transition: "linear" } );
    Tweener.addTween( camera.target, { x: 0, y: 0, z: 0, _bezier: bz_t, time:1000, transition: "linear" } );
    Tweener.addTween( this, { time: 1000, onComplete: function() { generateCameraPath() } } );
}


I'm afraid I don't have anything to put colors on the code on this blog yet, but anyway, I'm sure you get the idea ;)

Anyway... if that wasn't enough, there are even more bits. Originally I said that I was playing with all this because I wanted to do the visuals for a radio I usually listen to. I also said that I changed the plans because the link to stream wasn't working anymore. This morning I was able to speak with one of the guys behind the radio itself, and we managed to put a crossdomain.xml in place! Which means that now I'll have a lot of fun coding some visuals for the radio and see what I can do FFT analysing on the fly + 3D (which, neither Apple or Microsoft did much in their players :D).


http://mrdoob.com/lab/pv3d/vis/effect04/proton

Thanks a lot Jason!

#permalink

PV3D AudioVisualisations - Effect04

Oct 9th, 2007



Woke up early this morning and for some reason went back to the visualisations that I did months ago, and tried to make it run again (lots of classes missing in action).

The original idea was to link it to an online radio I usually listen to, but the stream that I had didn't work any more, so I changed the plans and while using a super track done by Gloom and Flipside I just played with some stuff I had in mind.



First thing is the camera. In this test I'm using Tweener for generating the random camera path for the camera and the target. _bezier property is all you need, and the whole snippet for the camera is about 7 lines of code. This means that the piece isn't interactive this time, but is still hipotising ;)



Second thing is the cheap glow trick. That also something I had in mind that Ralph confirmed in one of his latests test. The trick consists on drawing the rendered scene into a very tiny bitmap and then rescaling it to fit the screen, if you don't put the smooth on it, it will also look nice as you will have pixellation for free, but for this effect looked nicer with the smooth.

If this sounds confusing, wait for this afternoon, as I should be updating this post with the .fla (gotta fix some issues when resizing the window, and hopefully making it run faster).

Enjoy!

PS: Core2duo+ recommended, and if you have Internet Explorer, try watching it with it, as the flash plugin goes much faster there.

#permalink

Roxik version of the DOF experiment

Sep 28th, 2007

Wow! man... that's wow!! You have to see this :)

The 2nd AS Japanese God, roxik, (the 1st is still yugop imho) did a reversion with his own engine of the DOF test. The difference is that he was able to draw 10x more sprites that on my tests.. I still have a test to do with a new experimental version of PV3D that maybe will allow to put that many sprites.

http://www.adobe.com/jp/events/ cs3_web_edition_tour/page6.html

Ah.. now I'm impressed that even he saw my little tests :$

Thanks to fazeaction for the tip :)

#permalink

Jorge Fuentes. Portfolio.

Sep 26th, 2007

Seem like Mr. Jorge Fuentes aka Zomb finished the v2 of his own portfolio. Seems to be a nice system done by Feiss and it has the always nice touch of Frem.

Enjoy the works
(or play with the piano otherwise ;))

#permalink

FlashDevelop 3.0.0 Beta3 + Flex2SDK, not finding your classpath?

Sep 25th, 2007

I've tried everything...

Tools / Global Classpaths / AS3
Project properties / Classpath

and even adding this -source-path+= 'CLASSPATHGOESHERE'

Project properties / Compiler Options / Additinal Compiler Options

FlashDevelop was finding the class, but Flex2SDK wasn't when compiling. In the end I had to go to
C:\Program Files\Flex2SDK\frameworks\flex-config.xml

And change (and uncomment) this Node:

<source-path>
<path-element>locale/{locale}</path-element>
<path-element>CLASSPATHGOESHERE</path-element>
</source-path>


I believe it's just a bug from FlashDevelop 3.0.0 Beta3, hope they fix it soon, meanwhile, I hope this helps someone.

#permalink

Interactive Blobs

Sep 24th, 2007



During the weekend I was playing with the blobs effect, trying to make it 1,024bytes with no luck at all. I even installed Flex2SDK to compile directly from FlashDevelop, but after fixing the code so the compiler was happy the filesize was 80bytes bigger than what flashIDE generates :_(

So, I lose the personal challenge and then started to play with the effect trying to do something cool with it, and after finding some other bugs on the player and finding a workaround for them.. here it's. It's 1'5kb, which isn't too bad anyway. I was calling the effect "Interactive blobs", but I believe the female community will rename it to "Oh shit! I got my period" :)

Anyway... sources here.

PS: Don't forget to click on the stage to make the particles go away :)

#permalink

No 1k blobs :_(

Sep 14th, 2007



Seems like there is no way to fit this one in 1,024bytes this time :( It won't go down from 1,300bytes.. Oh well, at least 100 "blobs" running at a decent speed makes me happy.

Source

#permalink

What can you do in 1kbyte with AS3?

Sep 11th, 2007

I was able to do this:



Well... it is, in fact, 1,013 bytes... so I still had 11bytes available.

And after doing it, I know a bit better how flash (and the compiler) works :)

Source

UPDATE: I was wondering... if you like the challenge and you do some other effects (in 1,024 bytes), send the source to me, so I can prepare a special page to do a little gallery with them :)

UPDATE2: Seems like the effect doesn't work in the intel-mac version of the player :S I'll take a look at it asap.

#permalink

Sony Blu-ray: MMG Venue

Sep 7th, 2007



Well, seems like after a couple of months, my first work done at Hi-Res! is finally up and running.

The MMG Venue was an extension for Sony's Blu-Ray site which  was already featuring the MoLR (Museum of Low Resolution). This second part of the site is mainly a video player, on the first scene you have to chose what are you looking for (music, videos or games), once selected you'll have a list of trailers to watch.

It was almost a solo project, as I worked on the 3D, illustration, animation and code. Regarding the code... there were some good ideas on it but in the end didn't look as I was expecting, mainly because the timeframe in this case was quite short :S

Anyway, we're working now on much nicer stuff which should be ready in some months.

Stay tuned ;)

#permalink

Depth of Field + Tweener fun

Sep 4th, 2007

Woh! seems like the previous experiment made the FWA featured column :O That's nice :) I think it's the 2nd time one of my experiments were featured there.

So, I was just browsing FWA, and then I found this wallpaper done by Marcus Wallinder which looked really cool, so I got one of the chrome bubbles from there as a texture and tried it in the code, this is what I came with:



But then, I had the idea of testing with different object, and this is how it looked with a cube:



Then I tried with a sphere:



And finally with a tube:



So, for making something cooler this time, Tweener helped here to mix all the objects, so after 2 seconds it fades to another form.

http://mrdoob.com/lab/pv3d/dof/07/

Sources available:
http://mrdoob.com/lab/pv3d/dof/07/dof07.fla

#permalink
Pages:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Webs / Print / Logos... everything I do will be listed here.



If you're looking for my Actionscript experiments, here you have: