*blog... kind of... *rss
Petrol - Fluid simulation with APE 29.10.2007 | |
I have been looking to get some time to play around a bit with APE, and after doing the usual tests that everyone would do, I though that may be a good idea would be to mix the physics with the blobs effect.
And here are the results:

Quite slow, but it's a good start I guess. If you wonder how it works, here it's a behind the scenes version of the same piece:

Main.as (you'll need Blobalise.as and APE)
Enjoy, enjoy!
PS: If you click on the background you'll create some drops, and if you refresh it will create a different scenario. | | posted by mr.doob at 18:42 |
Tekkon Kinkreet 28.10.2007 | |
 Amazing!! And interesting to see an american doing a Anime movie too :) I'm sure it has been a big shock for the culture there.
Thanks, and thanks for the subtitles! :D | | posted by ricardo cabello at 14:33 |
Ubuntu 7.10 18.10.2007 | |

Leopard? What? Never heard of it... is it interesting? No? I though so. | | posted by ricardo cabello at 08:49 |
Sources and some words about PV3D AudioVisualisations - Effect04 10.10.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! | | posted by mr.doob at 00:58 |
PV3D AudioVisualisations - Effect04 09.10.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. | | posted by mr.doob at 03:13 |
Soon... 08.10.2007 | |

PS: Lots of thanks and hugs to Yingshun and her sis for the tips! | | posted by ricardo cabello at 04:50 |
|
*profile

traditional id: Ricardo Cabello Miguel
based in: London, UK
serving to: Hi-ReS!
contact me: click here
*affiliations
xplsv.com admin, development, design
xplsv.tv admin, development, design
escena.org admin, design
molomucho.com development, design
*advertising
|