Actually it's the same case with geometryLibrary. I have no clue how to access vertices or faces in this object:(
On 17 Maj, 14:37, n7 <[email protected]> wrote: > So now I can load a 3ds model, then clone it into an Object3D: > > private function onLoadMaterialComplete(e:Event):void > { > mat = new > BitmapMaterial(Bitmap(matLoader.content).bitmapData); > loadedObject.centerMeshes = true; > loadedObject.material = > Cast.material(Bitmap(matLoader.content).bitmapData); > > loader3D.addEventListener(Loader3DEvent.LOAD_SUCCESS, > onSuccess); > loader3D.loadGeometry(modelUrl, loadedObject); > } > > private function onSuccess(e:Loader3DEvent):void > { > obj = loader3D.handle.clone(obj); > addChild(obj); > trace(obj.materialLibrary); //returns null > } > > I'm tracing the object's materialLibrary but it returns null. What is > the way to access and change the material? > > On 16 Maj, 14:14, n7 <[email protected]> wrote: > > > > > Ok, loader3D.handle.clone() works. > > > On 16 Maj, 12:21, n7 <[email protected]> wrote: > > > > This is how I load a 3ds model: > > > > var loadedObject = new Max3DS(); > > > var loader3D = new Loader3D(); > > > > mat = new BitmapMaterial(Bitmap(matLoader.content).bitmapData); > > > loadedObject.centerMeshes = true; > > > loadedObject.material = > > > Cast.material(Bitmap(matLoader.content).bitmapData); > > > > loader3D.addEventListener(Loader3DEvent.LOAD_SUCCESS, onSuccess); > > > loader3D.loadGeometry(modelUrl, loadedObject); > > > addChild(loader3D); > > > > I'm really struggling with changing material after the model is > > > loaded. I also can't figure out how to load 3ds in the background, > > > then add it to scene once the user decides to do so. I also wish to > > > load 3ds only once, then add it to the scene a number of times but > > > with different material, rotation etc. > > > > loadedObject.clone(); > > > > and > > > > loader3D.clone(); > > > > doesn't work. > > > > Is there any way to translate a 3ds model to Object3D? If not, do you > > > know some kind of tutorial about handling 3ds models in Away3D? So far > > > I failed to find a decent materials... > > > > cheers > > > Chris
