Hi Richard - I'm still using this approach since it's so clean:

AssetLibrary.enableParser(OBJParser);
AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE,
onLoadComplete);
AssetLibrary.load(new URLRequest("../some.obj"));

onLoadComplete(event : AssetEvent):void {
    if (event.asset.assetType == AssetType.MESH) {
        mesh = event.asset as Mesh;
    }
}

I'm not even declaring any material since it will automatically get it
from the mtl and the image file it references and assign it to the
mesh. That's brilliant how that works, but then there is apparently no
way to set the mipmap property to false? The textures are already UV
mapped so I don't want to change their dimensions. The code above
worked very well with a different very complex OBJ model, mtl and
image file so I know it does work. I guess the question is how to
access the material properties when taking this approach.

On May 16, 1:33 am, richardolsson <[email protected]> wrote:
> Bitmaps should be recognized and if they are not then that's a bug
> that i will fix. Thanks for letting us know!
>
> The texture error I'm not sure about, but have you tried with a square
> texture, or disabling mipmapping on the material before the first
> render()?
>
> /R
>
> On May 16, 6:38 am, Choons <[email protected]> wrote:
>
>
>
>
>
>
>
> > So I have been trying to get Broomstick to load some old obj/mtl files
> > from CB Model Pro. First I was getting 'unable to load mtl' errors
> > until Richard told me I should use the GitHub build. Did that, and the
> > load error went away, but then I was getting Error #2044: Unhandled
> > IOErrorEvent:. text=Error #2124: Loaded file is an unknown type.
> > Looking at the mtl and texture file I noticed it uses a .bmp texture
> > which I thought may be the issue, so I saved a jpg version of the bmp
> > texture and changed the mtl to reference that instead. Now I'm getting
> > Error #3700: A texture sampler binds an incomplete texture. Looking
> > around on the forum here I see it might be mipmap or power2 issue. The
> > jpg version of the texture is 256 X 1024 so that's power2 but not
> > square so don't know if that's a problem. Anyone had/solved this kind
> > of problem?

Reply via email to