08 Aug 2007

Away3D bump continued

by Fabrice Closier Away3D bump continued

After 3 weeks vacation with nothing but a pencil and a notebook, i had wrote down some idea's for this class i wanted to test. Since you guys seem to like my blog, (my stats are growing very fast lately), i thought it was time to post some new demos. These are dev workfiles, this means: no fancy models, no nice textures and there are still many things to be done in the code, from improving perf to new features. These demos are just outputs while writing. What's new in these ones? The class has been updated to the composite idea - if you are familiar with Away3D or PV this means that in your code you would usually make a material like this: var material = new BitmapMaterial(mybitmapdata); Now you can pass some graphical fx to it. for the first demo you would do something like this: var bump = new Bump(mybump); var material = new BitmapMaterial(mybitmapdata, {}, [bump]); The third param is an array, meaning when this code is released there will be more than just a bump to push in that array... So what happens? When the material generates the faces the bitmapData is updated, and the next fx in the array will then use the resulting bitmapData from the previous. This is very nice because a different order in the array can create some completely different results. And believe me, you will soon want to save every swf outputted like i do, because they are nice to look at! The class has 3 other features - 1) it can use its own lightmap, like previous demos. 2) it can use an environment lightmap (this one is in development since some serious changes must be made into the core of the engine). 3) it can use an option that enables you to mask a part of the fx, allowing you to create some interesting materials, like rust on chrome etc.. This one demonstrates the bump applied with the texture mode set to overlay (forgot to mention, you also can set blendmodes on a texture)... var bump = new Bump(mybump, mylightmap, "overlay"); bumprevisitedmask2 This one illustrate the mask being set, creating some very interesting fx. var bump = new Bump(mybump, mylightmap, "overlay", mymask); bumprevisitedmask I have more ideas to test/write from my notebook. Fabrice


13 Sep 2007 09:58 AM

Miho said:

Hi! how can i create BitmapMaterial with lightint turned on? there is no sutch propertiy ((

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