Yes... your object should be in Object Mode when exported. Sorry i
forgot to mention it.
I never use Collada, so I don't know anything about special option
when exporting to Collada, or when importing Collada in Away3D. But,
IMO, You can open your collada file with a text editor, to see if the
exporter in Blender exports information about material (or texture's
name). Maybe in Collada class, there is an option to set directory to
look up the textures, please see Collada class documentation.

You can also set your object's material manually after it is loaded,
using the getChildByName function to get your object.
_loader.getChildByName("mybox").material = new BitmapMaterial(new
ImgMyBox().bitmapData, { smooth:true } );

If there are a lot of objects in your Collada,  after Away3D loads
them, set material for each of them.
For example :
[Embed(source="../../../../../assets/3dobjets/textures/mybox.png")]
private const ImgMyBox:Class;
[Embed(source="../../../../../assets/3dobjets/textures/mysphere.png")]
private const ImgMySphere:Class;

...

// your init processes
var collada:Collada = new Collada();
_loader = new Loader3D();
_loader.addEventListener(Loader3DEvent.LOAD_SUCCESS, _onLoadSuccess);
_loader.loadGeometry('test15.dae', collada);
_view.scene.addChild(_loader);
for each (var m:Mesh in _loader)
{
  if (m==null)
     continue;
  if (m.name == "mybox")
     mesh.material = new BitmapMaterial(new ImgMyBox().bitmapData,
{ smooth:true } );
  else if (m.name == "mysphere")
     mesh.material = new BitmapMaterial(new ImgMySphere().bitmapData,
{ smooth:true } );
}

Maybe, there is other way to set material to your Collada.

On Sep 18, 7:28 pm, "G.M." <[email protected]> wrote:
> thx you :) worked fine
> a little hint: i had to jump back to "Object Mode" after CTRL+T,
> otherwise blender export the same collada file as without CTRL-T
> although i saw the triangles
>
> A further question: do i have to set somethink special option if i use
> a bitmap(jpg) texture on my material? away3d doesn't show my
> texture ... i downloaded a demo-collada file and there it worked, but
> I can't figure out the differences between my material and them from
> the demo-file

Reply via email to