Adega Coop, Borba

August 15th 2007

Lodma contacted me some months ago looking for a light weight, multi-language web system done with simple and easy to understand (so, avoid classes) actionscript  for developing a website for Adega Coop. And after the usual fights between the coder and the designer we ended up with a system we were happy with.

So my part was done, and since then Lodma has been working on the design/content on the site, and dealing with the client... until today. This is the end result:

http://www.adegaborba.pt/

Ah.. a shame I didn't know SWFAddress back then! :(

Good work Paulo!

no comments

PNG2SWF (JPEG Compressed)

August 8th 2007

I needed to convert a couple of .PNGs to .SWFs for a project today. I did a quick search and I wasn't able to find something easy to use for this, and the ones I found usually just embedded the .PNG in the .SWF, which is exactly what I didn't want.

At the time of publishing a flash project with .PNG images, if you set the images on your library to be compressed to .JPG, if there is any PNG with alpha channel, flash will save the color information with JPEG compression and leave the transparency information with PNG lossless compression.

The end result it's like having a JPEG with Alpha channel, which, actually, it's something you can only have in Flash (compared to html).

Seems like the easiest way to handle the issue was creating a .JSFL file to automatise all this. I never had to do a .JSFL script before, so forgive me if I did something bad on it.

Anyway, in case you ever need it, here you have:

png2swf.jsfl
(Flash IDE script, Run it from Commands)

Enjoy!

PS: The files that I had to compress went from 4mb in total to 900kb :)

3 comments

Splice music v2.0

July 27th 2007

Well, those guys have been busy for months since I did the first re-designs for the site. Yes, it was me ;) Mainly I set the overall style, icon styles, layouts, IA and a bit of UE reseach... and then Antti did the real hard work and continued everything from there.

One of the most important things in this new version is something that Andre Michelle have been working on for months now, the new sequencer.

And well, these are the big news for today, I got the feeling the project is going to be quite successful, and, although the new sequencer its a bit glitchy, as soon as everyone gets moving to the new CPU's it all will work much better (or Adobe makes the player even faster :D).

http://www.splicemusic.com/


Enjoy!

no comments

FlashTracer to the rescue!

July 26th 2007

I'm developing a site that is giving me some issues and for some reasons I can't test the compiled swf inside flash, the only way to test it is in Firefox (well, or any browser). That means that I don't have trace() there.

Well, after trying to solve the issue blindfolded I decided to do a quick search and I found this nice Add-on for Firefox that lets you see the trace() output inside Firefox :)

Thanks Sephiroth (once again!).

no comments

How many doobies?

July 19th 2007

Seems like the previous post inspired a bit Papervision3D developers to optimise the code a bit and get some performace boost. Ralph posted yesterday a zip file with 2 .swf (pre-optimisations and post-optimisations). It seems like, they have achieved a 40% increase of speed. It's a bit tricky tho, as soon as you reach the number of polys you then depend once again of Flash raster (aka beginBitmapFill), however, with multicore CPUs the improvements gets more clear (and also with lowpoly scenes).

After doing this, Ralph did another benchmark using the pink ball this time, as a joke he added a new value on the report: the doobies. Haha, well, the more you get, the more you can presume about your CPU ;)

Doobie Bench - RC1 version (Old)
Doobie Bench - RC11 version (Old)

So... Here are my results:

Intel core2quad 2.40GHz (My fastest CPU)

RC1:
Time: 12429ms, FPS: 29, PV3D: 4981ms, Other: 7448ms, Doobies: 46598

RC11:
Time: 10419ms, FPS: 35, PV3D: 3090ms, Other: 7329ms, Doobies: 55587

PowerPC G4 1.33GHz (er... My slowest CPU)

RC1:
Time: 76717ms, FPS: 5, PV3D: 21606ms, Other: 55111ms, Doobies: 7549

RC11:
Time: 65324ms, FPS: 6, PV3D: 12307ms, Other: 53017ms, Doobies: 8866

55587 Doobies!! beat that! ;)


PS: Doobies = Poligons drawn per second.

no comments

Away3D - Revision 205

July 16th 2007

Alexander Zadorozhny has announced today a new revision of Away3D.
A lot of methods have been changed and seems like a new way of sending parameters (which is the same way Tweener uses) has also been introduced.

I think the API makes much more sense right now (just my opinion), and the fact that they also released a zip with examples for getting started, just makes it too tempting ;)

Something I always wanted to try was to get my old experiments working with Away3D, to compare the performance and also compare the visual improvement.

Way to go guys!

no comments

PV3D: Real Materials, Part 1

July 11th 2007

After doing the experiment with the fake materials and writting the controversial post the ambition of getting real materials grown on me.

For the people that doesn't know what I'm talking about when saying fake/real. In the last examples, the reflection was just a plane on top of the other texture and I was scrolling the reflection map. That's faking the reflection, there are no real calculations of what that face of the mesh needs to reflect from the texture...

I'm a bit lost on this, but it's only a matter of keep trying, testing, and getting deductions from the errors and results.

This is what I've achieved by now...

I was doing this a little bit like blindfolded, the UVmapping just gets the position of the texture from 0 to 1 for each vertice and filling the poly is easy. For doing the spherical environment mapping it was about getting the texture from 0 to 1 in relation to the normal of each face (as seen here). After messing around with the matrix, I ended up with this:



Well, it's a good start... after trying different values in the matrix I ended up getting this:



Better, and in fact, pretty nice rendering I think. And finally I reached something that looked like what I was after:



It's really messy, it's not environment mapping in flat mode, neither in smooth mode, it's what I have at the moment, here it's how it looks in another mesh:



So, for the people that were looking for the code... I'm not going to give it this time because that would mean having to zip papervision3d sources and in that way creating a working version that will last for a week or two only, so, instead I'm going to explain a bit what I've been doing...

To get to this point, basically I modified Face3D.as so every time a new face is created it also calculates the normal for the face (which, I don't know why pv3d still doesn't have this, because the code is really simple and short).

normal = Number3D.cross( Number3D.sub( new Number3D(v1.x,v1.y,v1.z) , new Number3D(v0.x,v0.y,v0.z) ), Number3D.sub( new Number3D(v2.x,v2.y,v2.z), new Number3D(v0.x,v0.y,v0.z) ) );
normal.normalize();


Then, on the MaterialObject3D.as I defined the property mapping_type which, by default equals to "normal", I can then change it to "environment" or "environmentFlat".

Having done all that, I only had to go back to the render loop inside Face3D.as and adding a Switch for each kind of mapping type.

At the moment the environment is not facing the camera, is facing a light in the scene, which means that if all this works we could simulate a better light than the flat one we have seen on away3D examples. It would be kind of Phong illumination.

However, in order to do that I've to modify the code a bit more so I end up using the normals of each vertex. Again, I'm a bit blindfolded here, but I think I'm on the right path... in a couple of days, maybe I'll have a bit more :)

no comments

Papervision3D goes public

July 7th 2007

Seems like 070707 was the special day ;)

http://blog.papervision3d.org/ 2007/ 07/ 07/ papervision3d-public-beta/

And for celebrating it they did a showreel featuring some of the works done with the engine.

You may recognise some of my stuff there ;)

no comments

PV3D: Fake materials (Sources included)

July 6th 2007

For some months there have been a hot topic in Papervision3D's mailing list which is the special materials for the engine.

In the early days Ralph did an example with environment mapping but for some reason, the guy didn't want to share the code at that moment and they have been working on all this for a long time now, showing some examples some months afterwards and then seems like there are no more news on the front. I just hope that we won't do 1 year of papervision3d since the release and we still have only normal texture mapping. C'mon Ralph!

Then, these days the materials topic started again thanks to Fabrice (a.k.a the browser killer). Releasing experiments in Ralph's style, testing similar things. However, with Ralph experiments it was easy to see that the calculations were real as the objects were complex. But Fabrice's examples were using spheres, planes, and simple objects, which made me think that he was cheating (He isn't).

So, then is when I had the idea of speding 1hour and doing a couple of examples of fake materials (so, cheating) to achieve similar results than what Fabrice was showing (although without killing any browsers ;D).

And these are the results...
(click on the images to see them moving)

Wood


Metal


Weird


Weird 2


They are fake, they only work in specific 3dobjects (basicaly simple mapped 3dobjects). But well, I'm sure you'll find a good place to use it :) The really cool thing of this technique is that is really fast, it runs at 20FPS+ in my iBook G4, and I'm sure it can be optimised.

What I'm doing is very simple. You have 2 bitmaps, one that you use as a diffuse map and as bump map, and then another one as "environment map"... wait a second, I think it will be easier if you take a look at the .fla instead of me trying to explain step by step what's going on.

Here you have the source code.

Enjoy!

no comments

Java is loading...

July 5th 2007


And the people still don't get why Flash is THAT extended :) Doesn't matter if they make the loading more cute, what they have to do is get rid of the loading at all. In fact, the user shouldn't have to see anything about Java, the user shouldn't even have to know what Java is all about.

That's exactly the same than with special effects in movies. The best special effects in movies are those ones that you don't see.

Oh, c'mon! I really want to uninstall Java now.


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.