Hi,

The default materials are pretty much merged and composited using methods.
However, for Phong there's nothing to concern yourself about as it's the
default state of a material. All you need to do is provide the light to the
material.
var light:DirectionalLight = new DirectionalLight();
var mat:BitmapMaterial = new BitmapMaterial(bmp);
mat.lights = [ light ];

The ambient level is set by setting the ambient colour on the material.
We've been thinking about providing a global means of affecting ambient too,
but that hasn't made it in (yet).

Hth,
David

On Mon, Mar 14, 2011 at 9:19 AM, iiley Chen <[email protected]> wrote:

> Hi,
>
> Broomstick Rocks!! I have a simple game now is in porting to
> Broomstick/FlashPlayer11 to get Hardware acceleration. Everything
> works fine now, but just i am new to 3D.
> I have used PhongBitmapMaterial in old version Away3D, and that is the
> effect i need. I create the light by:
>        var dl:DirectionalLight3D = new DirectionalLight3D();
>        dl.ambient = 0.3; //Note that there is no such property in
> broomstick
> now, what can i do to replace?
>        dl.diffuse = 0.5;
>        dl.specular = 0.5;
> Create the material by:
>        var pbm:PhongBitmapMaterial = new
> PhongBitmapMaterial(img.bitmapData);
>        pbm.shininess = 55;
> But i can not find how to implement PhongBitmapMaterial in Away3D 4.0,
> i see there is material methods package, but they are hard to
> understand, any tips will be helpful.
>
> Thanks very much!
>



-- 
David Lenaerts
Flash platform developer
http://www.derschmale.com

Reply via email to