08 Aug 2007

Away3d bump mask

by Fabrice Closier Away3d bump mask

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. 4 bumps Fabrice


08 Aug 2007 12:30 PM

Mr.doob said:

No environment mapping yet, uh? wink

09 Aug 2007 04:19 AM

spleen said:

....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!

09 Aug 2007 06:27 AM

admin said:

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.

10 Aug 2007 03:56 AM

Christian Pfeil » Papervision3D Public Beta said:

[...] weiteres vielversprechendes Flash 3D-Projekt findet man unter www.away3d.com. Es handelt sich hierbei um eine Realtime 3D Engine für Flash die in ActionScript 3 erstellt [...]

10 Aug 2007 07:13 AM

spleen said:

wow...i'm waiting with excitment. thx guys!

22 Dec 2007 06:56 AM

Eric-Paul said:

Could you elaborate a little on why this is faster than just a bitmap with alpha?

22 Dec 2007 11:29 AM

Fabrice Closier said:

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.

23 May 2009 04:22 AM

Stickers Honda said:

Pretty impressive! Like it smile

05 Jun 2009 01:09 PM

Alex Lowe said:

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!


23 Jul 2009 01:41 PM

Daniel said:

I desperately need this functionality for a project I am working on. Are the sources available anywhere? Please post a link!


Only registered members can comment. Click here to login or here to register