ricardocabellov5.0balter-egos
trace mr.doob r08028
blogdemoscenefeaturedextrascontact
 *blog... kind of... *rss


How many doobies?
19.07.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.
posted by mr.doob at 06:58

Away3D vs Papervision3D (performance-wise)
17.07.2007
As I mention on the previous post, I always wanted to try some of the old experiments with Away3D to see how much will the speed get affected with that enhanced z-sorting.

I've spent just a bit of time this afternoon modifying the old pink ball code so it compiles again with Papervision3d, and I've done the same code but with Away3D. Here are the results:



The test has been done with MacBook Pro + Firefox + Flash player 9,0,45,0.

Papervision3D (src): 14FPS, Memory: ~8Mbytes
Away3D (src): 14FPS, Memory: ~18Mbytes
Away3D (CORRECT_Z_ORDER) (src): 5FPS, Memory: ~15Mbytes

So, in this example (2,000 triangles scene) with the last revisions of each engine code, seems like both of them perform at the same speed using the same renderer although Away3D cosumes more Memory. However, Away3D seems to go down 10FPS when rendering with the CORRECT_Z_ORDER filter.

UPDATE: After Away3D guys fixing the memory leak, I've recompiled the examples and updated the result. But, I'm still not happy of how this benchmark is being done, I'll setup the scene in a better way so it's easier test each engine. A lot of factors may be making the numbers not fair.
posted by mr.doob at 10:18

Away3D - Revision 205
16.07.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!
posted by mr.doob at 03:47

TED Talks : Ken Robinson on the importance of a creative Education
15.07.2007
posted by ricardo cabello at 15:47

PV3D: Real Materials, Part 1
11.07.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 :)
posted by mr.doob at 16:24

Papervision3D goes public
07.07.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 ;)
posted by mr.doob at 15:52

PV3D: Fake materials (Sources included)
06.07.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!
posted by mr.doob at 13:04

Java is loading...
05.07.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.
posted by mr.doob at 08:20

goose whipass exteeeended.mp3
05.07.2007
Download

Background of the track here.
posted by r08028 at 08:10

Little Bitchard - Choose Zero Polys and Shaders (1in10 141 Italo Dance Remix).mp3
05.07.2007
Download
posted by r08028 at 08:03
Pages:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
 *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