You have to tell model what textures to load. I import the textures
into the library then cast them as material for the model. Also It
seems to make things easier if you give the meshes names in your 3d
modeler. Especially if you have more then one mesh/object in a model.
If that is the case you will have to tell the meshes/object what
materials they need after the model is loaded.

      /////for loading one material/////////////////////
       max3ds = new Max3DS();
        max3ds.centerMeshes = true;
        max3ds.material = new BitmapMaterial(Cast.bitmap(textureName),{alpha:.
6});
        ////
        loader = new LoaderCube();
        loader.loaderSize = 200;
        loader.addOnSuccess(onSuccess);
        loader.loadGeometry("model.3ds", max3ds);
        /////
        scene.addChild(loader);

////////////after model is loaded call this
function onSuccess(event:Event):void {
        model = loader.handle as ObjectContainer3D;
        model.scale(100);
        model.rotationX = 90;
    model.materialLibrary.getMaterial("MeshName").material = new
PhongBitmapMaterial(Cast.bitmap(textureName));////This may be called
for each mesh

}

Reply via email to