Happy 2008 - Fireworks effect

December 29th 2007

Probably my last effect this year :(

fireworks effect

Thanks for following my blog, and have a great 2008.
Have fun with the sources ;)

UPDATE
Some people were asking for the ColorUtils.as class, so, instead of sending the file by mail, I guess its better to update this post. But, if you want a quick challenge, try to recreate the file by yourself first.

7 comments

tha ltd. site

December 22nd 2007

http://tha.jp/
Maybe this is old news... anyways, simple and original as usual.

no comments

PV3D 2.0: Real Materials

December 20th 2007

Now that we have some shading action with pv3d 2.0, I though it was time to revisit the real materials topic.

John already shown that Bump is now possible, so, testing a bit his code a I came up with something similar, but in this case I'm using Mars, and, guess what, you can change it's shape with a stupidly weird one (tho it's dynamic, yey!).



Next thing on the list was reflections. Not real time ones tho (yet), but Ralph also already shown an example with them. Here it's my version, mixing it with the previous code.



And you may well say, doh! seen it already... Fine... But, what about refraction? :D





Hehe.. it has been kind of fun... Source available from within the effect, (take a look at the top nav). But, apologies this time, there is a lot of stuff commented and unneeded stuff on them (I may clean them later).

no comments

FWA's Site of The Day!

December 17th 2007

Since the beginning I had a joke on my site (now blog) on the top right corner which was the FWA, best site ever ribbon. What I really didn't ever though is that I would be offered to add a real one at some point.

Well, what can I say? Really excited about it, and very encouraging to keep doing what I like to do.

Thanks FWA guys!

no comments

PV3D 2.0: How to render in anaglyphic (stereo) mode

December 6th 2007

No, neither PV3D 2.0 does this render automatically, but again, this is just another example of what can you do being able to render the same scene to different targets.

The technical/physical part of this render is simple. Based on the main camera, you need to have to other cameras, A and B, one on each side of the main camera, if you displace the camera A -50 of the main camera, then you displace the camera B +50. The cameras need to be parallel, so you also have to displace the target of the cameras. Then, render the camera A and copy the red channel



render the camera B and copy the green and blue channels



so, again 2 renders per frame (which means, rendering 2x the amount of polys), then into a final Bitmap you mix all the channels.

Before doing it directly with bitmapData.copyChannel I tried using colorTransform and then using the additive blendMode. It worked, but wasn't as accurate as the proper way is, and it was much more slower.

The final test looks quite good I think, and the effect works with the proper glasses.



There is also another test done with the render mode, which was a quick modification of a test from Ralph.

I must say that it is not 100% correct, in theory the channel displacement should be only horizontal, in some camera angles the effect may not look right. I guess this could be somehow sorter, but I was too lazy again :P

And here you have the sources again! In case you wonder about how the ball.as was generated, I used a modified version of Jerome's AS3 Geom Class exporter.

no comments

PV3D 2.0: How to do simple realtime shadows

December 6th 2007

Some people have mailed asking about how the shadows were done and where was the function in the API to create them.

Well, first of all PV3D 2.0 doesn't do the shadows automatically, but the new features let you do it (an many more other things). As soon as I knew that with the new version you were able to render the same scene in different sprites I though "shadows!". So, went quickly to give it a try and it worked perfectly. The idea is basically to do 2 renders per frame (this may be slow if you apply it at the end of a project). First render from the top of the scene, apply that render to the white plane at the bottom, and then second render from the user's camera.

This is the view from the "light camera" that gets rendered into a 512x256 bitmapViewport:



Next thing I wanted was to make the shadow a less dark, so, having already the bitmap, I just need to apply a colorTransform to it and make it a bit more pale.



And finally, apply a BlurFilter to the bitmap so the shadows is a bit diffuse



And that's all, this is the result:



Just as a last note... for the ball example I had to change before rendering the shadow the texture of the ball to black, and then change it back to the backed AO material.

Next thing on this matter will be to try to implement stencil shadows (because at the moment the shadow only works if the light is on the top, or one side...)

Oh! I almost forgot, here is the source file (requires flex2SDK, PV3D 2.0 and Tweener).

no comments

Loop a FLV in AS3 (and AS2)

December 6th 2007

Lots of people always ask stuff like that (me the first), and after a while without having to deal with video on flash, I had to do it today and a very easy solution popped out.

function onFLVMetaData( metadata:Object ) :void
{
Tweener.addTween( this, { time: metadata.duration, onComplete: restartVideo } );
}

Simple and beautiful. Thanks once again Tweener! :D

Updated
However, the proper way to do that on AS3 is this one:

function netStatusHandler( event:NetStatusEvent ) :void
{
if(event.info.code == "NetStream.Play.Stop")
stream.seek(0); }


7 comments

mrdoob.com v3

December 3rd 2007

mrdoob v3

December 3rd... what a nice day for doing this ;) Yep, new version of the site!! (or homepage actually). The previous version is still here at /blog.php tho. There are some new experiments on there done with Papervision3D 2.0 which I will talk about in another post.

There are a couple of things to fix here and there, specially for pages that shouldn't appear on the frame but open on a new tab instead. Also the source links aren't there yet.

Er... yes, you have read it well.. FRAMES! Unfortunately nowadays web technology wasn't doing the job properly for this kind of structure, and I tried having the swf on the top, then an iframe and update the size of the iframe with jQuery, but something there was buggy and wasn't working as well as the old good framesets. Sorry.

However, don't complain just yet, take a look at the site, it features SWFAddress which turned to be quite nice.

no comments

BD4D a la Mr.doob?

November 27th 2007

A couple of friends have been talking about that temporal BD4D site done by Mutado and how similar it was to my site. Well, the colours are for sure similar, and at the beginning I had the body of the blog posts in that blue too, but then Zomb told me that in white would be more readable. So now it doesn't look THAT similar.

Anyway, doesn't really matter, and actually, to be fair, I also ripped BD4D quite a bit when I did the layout design for xplsv.tv back then O:

Having said all that, We'll be there this afternoon, so, if you know how we look like, say hello hello!.

no comments

xplsv.tv reached the level of porn sites

November 23rd 2007

Sad, but true.

The guys from cdmon sent us an email yesterday letting us know that they were going to move xplsv.tv to a better hosting where it would share the space with less websites. Until yesterday, the site shared the space with 300 other sites. Today is sharing the space with only 10. This is of course great news of course. We couldn't be happier about it. Thanks once again cdmon! :)

But then, I started to wonder about which were the other sites, I did mention that to sole (which released her new site today btw) and she came back with the full list.

1) adultall.info
2) clubgs500.com
3) despuesdegoogle.com
4) intercambios.sexo.es
5) mushofutbol.com
6) only-playmates.info
7) recursos-online.com
8) sarda.es
9) sexo.es
10) webcams.sexo.es
11) xplsv.tv

She got the list thanks to this little tool.

Should we just stop doing art-ish sites and start doing porn sites?
:S



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



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