John
It was awhile ago, so no ideas how stuff has changed, but maybe have a
look (search) for/at the ghost material approach I used. I basically
use a proxy material and loop through all faces and change for my
material, my material routes the listeners/ redraws to the real
material. The problem I found is that the BSP tree is created one time
so changing the original material in the library has no effect, you
can just change it once but proxy approach allows you to for instance
display video on the BSP, or hide it altogether or adjust alpha etc...
Sorry really not in touch with away at moment busy haXing, but maybe
my suggestion is useful?
If you go with ghost approach I can try to take a relook and make sure
the code is uptodate.
Cheers
;j
On 16 Feb 2011, at 15:41, John Brookes wrote:
Just checking Im not missing something but is there a default way of
getting the faces of the BSP _tree?
Had to add
public function get facesBSP():Vector.<Face> { return _faces; }
to BSPTree.as
so I can do something like
var vm:VideoMaterial = new VideoMaterial();
vm.file = "water.flv";
vm.loop = true;
BSPTree(_tree).facesBSP[56].material = vm;
BSPTree(_tree).facesBSP[57].material = vm;