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

« Hierarchy definitionMy code.google »

graphics.beginBitmapFill, opacity? blending? pretty please...
19.02.2008
The classic question on interviews lately is "What would you ask Adobe to improve on the Flash player?". Well, I finally have a real thing to ask the guys and is to give some love to graphics.beginBitmapFill.

Since the beginning there were 2 ways of rendering your 3d scene in flash.

1. Render everything in a single Sprite / MovieClip.
2. Create a Sprite / MovieClip for each triangle or Mesh.

The second option was the most useful because you had easily properties such as opacity and even blending as Sprite/MovieClip have already those properties, but, performance-wise, option 1 was the winner hands down. So, as people wants speed, some engines have gone through the option 1 and then spent time trying to find ways to hack the properties that you get for free with option 2.

If you take a look on the drawTriangle loop inside Papervision3d in instance you'll find this:

graphics.beginBitmapFill( altBitmap ? altBitmap : bitmap, _localMatrix, tiled, smooth);

I even had to do a hack for a project where in order to be able to change the opacity of one material dynamicaly I had to generate an array of bitmapDatas with the original texture with different levels of transparency... nasty!

Wouldn't it be great if you could tell the amount of opacity and which blending to use to the beginBitmapFill?
posted by mr.doob at 08:57
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)