Away3d bump mask
August 8th, 2007
While busy cleaning the code from yesterday, i’ve added one more thing: a mask for the whole texture.
It sounds overkill at first sight since you can use a png with alpha, but do you remember how heavy those little friends can be?
Anyway, for those interested, it will now be possible to create a mask from a very sharp movieclip or an external image.
Because you can choose how to apply the mask (see my last post for more on applying masks) an extra parameter is required: true or false.
This will mask the entire result – used in the above demo
new Bump(mybumpsource, mylightmap, mymode, mymask, true);
This will mask only the bitmap result – used in the previous demos
new Bump(mybumpsource, mylightmap, mymode, mymask, false);
Here’s another quick demo, just to demonstrate the flexibility of this class:
4 planes, 4 exact same bitmapdata’s, 4 different results with this class, and i’m not counting the environment normal mapping coming up. Notice the way 2 planes are rendered where a mask is being defined. The boolean parameter is set to true on one of them.
Fabrice
Popularity: 5% [?]







No environment mapping yet, uh? ;)
Comment by Mr.doob
— August 8, 2007 @ 12:30 pm
….i’ll use your engine for my artworx gallery (see url)
the bumb feature isnt available in svn? Not yet.. ? my dream is PreciseBitmapMaterial with bumpmapping
btw, i xtend my respect for this great project!
Comment by spleen
— August 9, 2007 @ 4:19 am
Environement mapping: we are now busy with it, but not only since a native “skybox” will be also available. The idea is that models having fx applyed on them like the Bump could “reflect” the skybox.
PreciseBitmapMaterial with bump:
The bump is the first class implemented with the “compositing” idea.
Soon, you’ll be able to choose from more materials, same as now, but some will have the ability to support fx. I’ll post soon some demos on this concept showing the Bump and a PerlinNoise class added to a material.
There are also more materials to come, bitmapdata based instead of movieclips, allowing for the creative among us to animate within materials… to give you one id, if you would add a phere and a tv model, you’d be able to render the sphere on the tv screen and move it with same code as usual. The world of the sphere would be the screen…
All the classes will be soon released.
Comment by admin
— August 9, 2007 @ 6:27 am
[...] weiteres vielversprechendes Flash 3D-Projekt findet man unter http://www.away3d.com. Es handelt sich hierbei um eine Realtime 3D Engine für Flash die in ActionScript 3 erstellt [...]
Pingback by Christian Pfeil » Papervision3D Public Beta » Papervision3D Public Beta erschienen - ein Framework für 3-D Szenarien in Flash 8, Flash CS3 und Flex.
— August 10, 2007 @ 3:56 am
wow…i’m waiting with excitment. thx guys!
Comment by spleen
— August 10, 2007 @ 7:13 am
Could you elaborate a little on why this is faster than just a bitmap with alpha?
Comment by Eric-Paul — December 22, 2007 @ 6:56 am
Of course you can use alpha in most cases, that’s also the fastest way. But when it comes to build models like a bottle of champagne, or perfum witch often have some volumes (bump) on the glas, a sticker, and some metal on top. All having different reflections properties, the glas needs next to alpha a greater amount of displacement, the metal a bit less while the paper sticker don’t need both at all. In short: you have a problem.
This class simply allows you to mask or minimize the effects of the bump and it’s still one material only. The workarround in such cases would be a scenery construction using layered scenes or divide the geometry in 3 or more parts giving extra zsorting complications… This example showing only the mask is not the best to translate that concept I give you that. I’ve done some researches on this a while back. Here is an old research showing this principle. Note that it’s made with the very early version of Away, so it’s not having the kind of speed we have now, but i think you’ll get the point.
Comment by Fabrice Closier
— December 22, 2007 @ 11:29 am
Pretty impressive! Like it :)
Comment by Stickers Honda
— May 23, 2009 @ 4:22 am
Hi- are the classes from this project available anywhere? I’m doing a neat project at work and this would come in super handy- you posts are the only working examples of a 3d mask I’ve seen. Thanks for your time!
Alex
Comment by Alex Lowe
— June 5, 2009 @ 1:09 pm
I desperately need this functionality for a project I am working on. Are the sources available anywhere? Please post a link!
Thanks!
Comment by Daniel — July 23, 2009 @ 1:41 pm