Thanks for the advice!

On May 15, 5:32 pm, Rob Bateman <[email protected]> wrote:
> Hey scott
>
> I'm afraid you cannot mix CompositeMaterial with BitmapMaterialContainer -
> hence the interface error which is correct.
>
> for a more up-to-date example of material layering, you should try having a
> look at the source from this demo:
>
> http://www.infiniteturtles.co.uk/blog/away3d-projecting-a-lightmap
>
> it uses CompositeMaterial for all it's layering and will allow
> PhongBitmapMaterial to be used inside it's layers, if that is what you are
> after
>
> cheers
>
> Rob
>
>
>
>
>
> On Tue, May 12, 2009 at 1:34 AM, scott <[email protected]> wrote:
>
> > Hello -
>
> > I'm getting an error when I use a PhongBitmapMaterial as a material in
> > a BitmapMaterialContainer.  The initial simple code I'm trying it out
> > with looks something like this -
>
> > var bmd:BitmapData = new BitmapData(40, 40, true);
> > var pMaterial:PhongBitmapMaterial = new PhongBitmapMaterial(bmd,
> > {color: DEFAULTCOLOR});
> > var cMaterial:BitmapMaterialContainer(512, 256, {materials:
> > [pMaterial]});
>
> > and then assigning the material to a mesh.  When I test the program I
> > get
>
> > Error: Not implemented
> >        at away3d.materials::CompositeMaterial/renderBitmapLayer()
> >        at away3d.materials::BitmapMaterialContainer/getMapping()
> >        at away3d.materials::BitmapMaterial/renderTriangle()
> >        at away3d.core.draw::DrawTriangle/render()
> >        at away3d.core.render::BasicRenderer/render()
> >        at away3d.core.render::AbstractRenderSession/render()
> >        at away3d.core.render::AbstractRenderSession/render()
> >        at away3d.core.render::AbstractRenderSession/render()
> >        at away3d.containers::View3D/render()
> >        at objectbuilder::ObjectBuilder/EnterFrameHandler()
>
> > When I look at the source code in CompositeMaterial I see that sure
> > enough, renderBitmapLayer is not implemented.  So I'm just trying to
> > figure out where to go from here.  More generally, what I'm trying to
> > do is to use multiple materials for my mesh, and also allow one or
> > more of these materials to be shaded.  I'm loosely working based off
> > of Rob's bitmap layering example at
>
> >http://www.infiniteturtles.co.uk/blog/away3d-layering-and-projecting-...
> > ,
> > but trying to incorporate lighting/shading as well (I don't think the
> > demo does).  If anyone can give their input on how they would do this,
> > I'd appreciate it.
>
> > Thanks,
>
> > Scott
>
> --
> Rob Bateman
> Flash Development & Consultancy
>
> [email protected] Hide quoted 
> text -
>
> - Show quoted text -

Reply via email to