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-bitmaps,
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

Reply via email to