Hello,

I'm new to 3D in Flash, though I'd call myself intermediate in AS3
(wrote a moderately complex driving game last year). I'm very
impressed by the performance of Away3D Lite.

Thanks for making this.

Currently I'm working to use it in my graduation project (so not just
a experiment).

I'm using ExCollada.as as the basis. The run-time material change of
meshes I need is works with the FastTemplate, but its sorting is
completely wrong (e.g. 
http://www.ycchen.de/blogging/away3dlite_colladasort.jpg).
With the BasicTemplate or Template, the sorting is correct, but the
material change doesn't work properly. This is what I do (on click)

flag = !flag;
for (var i:int = 0; i < model.numChildren; i++) {
        var thisMesh:Mesh = model.getChildAt(i) as Mesh;
        thisMesh.material = (flag) ? wiremat : originalmat
}
trace((model.getChildByName("leaf01") as Mesh).material);

The strange thing is, the last controlling trace shows that the
material definition is actually being changed, but the render doesn't
reflect this.

If I use the FastTemplate and assign a BasicRenderer, the render is
completely broken (e.g. 
http://www.ycchen.de/blogging//away3dlite_colladasort_ft_br.jpg)
when the renderer is reassigned after loading the DAE. Resassigning
the renderer in the init method has no visible effect.

Assigning the FastRenderer to the BasicTemplate has no visible effect
either.

Template + FastRenderer gives me material changes but broken sorting
(like FastTemplate).

What am I doing wrong?
I guess there's other ways to change the material of meshes?

Thanks for any help in advance!
YC

Reply via email to