PV3D 2.0: How to do simple realtime shadows

Dec 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).

#permalink

Loop a FLV in AS3 (and AS2)

Dec 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);
}


#permalink

mrdoob.com v3

Dec 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.

#permalink

BD4D a la Mr.doob?

Nov 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!.

#permalink

xplsv.tv reached the level of porn sites

Nov 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



#permalink

Hello Ubuntu!

Nov 19th, 2007

This is what I call a nice desktop environment :)

I still depend on Flash CS3 for some vector stuff so I needed to have WindowsXP with Flash CS3 running properly. After trying some virtualisation programs (qemu, vmware), some guys recommended VirtualBox, and... oh boy, it does really run fast!

Here it's a little video of me playing around with my new desktop environment, (you may need VLC):



I wonder if you can record your desktop at 1920x1200 with Windows or MacOS :P

UPDATE:
At start, I was amazed how fast WindowsXP was booting up. But after installing JRE, DirectX and everything seemed to make it quite slower. Here you have another video to see WindowsXP booting up fastest than ever :D



PS: If you're wondering about what's my wallpaper... here you have the answer



#permalink

Phodoob v3 in the works

Nov 9th, 2007

Now that everyone is talking about 3D and flash, for some reason I'm getting a lot of emails about people interested in my little photo gallery. Seems like people want the sources or just the .swf but for their stuff. Well, when I did that version of Phodoob, the code was indeed better, but then AS3 poped out, and since then I've always wanted to move it to AS3... I believe I can make it run much more faster with much more pictures on it.

My work is very based on motivation periods. It's hard for me to follow a list of things to do, but if I get inspired with something I just crack on it and release it.

So, apart from all the people asking me to do screensavers with my effects, I'm at the moment 100% motivated on cracking a new version of phodoob with AS3 and a few surprises. And with the sources available this time :)

Thanks for the people that shown their interest, it's all because you ;) Now, stay tuned (Give me 1 week or so).

#permalink

Evo engine released

Nov 6th, 2007

Just in time for flash on the beach, Jalava has just released the demoengine that he has been using for the latest Evoflash demos.

Thanks a lot for sharing this Jalava!!! :)
Now... it's time to learn some tricks. But while Tortoise does the checkout, what about watching the last demo done with this demoengine?

ADHDTV by evoflash

#permalink

Petrol - Fluid simulation with APE

Oct 29th, 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.

#permalink

Blackpawn's Fire skull

Oct 25th, 2007



http://www.blackpawn.com/dev/flash/FireSkull.html

You may know at this point that I've been (and I'm still) pretty active on the demoscene world for 10 years already. But I've never been a coder in that scene, I've usually done the graphics, design, direction, screenplay on the prods I've worked for. Lately I've been coworking with a new American coder. The bad news for you, is that mr.blackpawn some weeks ago decided to give a try to AS3, and he has been developing his own engine as he wasn't very happy with the actual APIs.

And the link above all this boring dabadaba is his first jawdropping test (and I'm not talking about the skulls jaw :P).

Here you will find a buch of tests he has been doing lately.

Welcome to the AS3 world Jim \o/

#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: