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

« Papervision3D goes pub...Java is loading... »

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
0 comment written so far

SORRY!
Is not that I don't care about what you have to say, of course I do, but they are speaking louder and I lost my patience :(
 *profile 



traditional id: Ricardo Cabello Miguel
based in: London, UK
serving to: Hi-ReS!
contact me: click here


 *latest posts 

* The Magic of Viral (10.10.2008)
* Jonathan Harris: Beyond Flash, an adde... (06.10.2008)
* Zeitgeist: Addendum (05.10.2008)
* Crisis (03.10.2008)
* Youtube, now in Super HD! (30.09.2008)
* Adobe AIR for Linux - Beta (28.09.2008)
* What does the Google Chrome logo inspi... (28.09.2008)
* Diesel: SFW XXX (25.09.2008)
* Muffler - August 2008 - Australia Tour... (22.09.2008)
* e-definition of creepy. (21.09.2008)
* Demoparty deadlines in real life. (20.09.2008)
* Service Pack 3 Setup Error, re-revisit... (16.09.2008)
* Not everybody can say ... (11.09.2008)
* Service Pack 3 Setup Error, revisited (10.09.2008)
* The Internet (2008) (10.09.2008)


 *latest comments 

* C++, SDL Coding? Maybe.. ;) (Preview) (trace)
* C++, SDL Coding? Maybe.. ;) (Preview) (Joey)
* La picaresca (spt)
* Mr. Slip Up (ricardo)
* La picaresca (ricardo)
* La picaresca (spt)
* La picaresca (sole)
* Demoscene @ Cirsa (sml)
* La picaresca (humphr3y)
* La picaresca (alfio)
* fiver2's new baby: debris (Jcl)
* Barcelona = full of shit(s) (Soli)
* Demoscene @ Cirsa (Scener)
* Rar & unrar with Ubuntu (SethPlate)
* Mindcandy 2 (Jcl)