once loaded, just parse the handle, and when a mesh type is found apply... Look for example in geom package at Mirror.as line 246 code, you need write something recursif like this...
Fabrice On Jan 24, 2010, at 6:23 AM, charglerode wrote: > This doesn't work because when I load in the OBJ file, I grab the > handle as an ObjectContainer3D which does not have a material > property. Searching around here only turned up a method which requires > I loop through and set the material of each individual face of mesh. > This also requires that I load in the JPG separately instead of > letting the OBJ loader handle it. I'd like the OBJ loader to handle > loading of the mesh and the texture on its own, but I would like to > specify which type pf bitmap material to use. Is it possible to cast > the loaded OBJ handle as an instance of Mesh, seeing as Mesh has a > material property? > > On Jan 22, 6:36 am, Peter Kapelyan <[email protected]> wrote: >> Hi did you you try a simple: >> >> myObject.material=someOthermaterial; >> >> in case you dont want to reload the bitmap you can probably do something >> like: >> >> var myBitmap(orData,I forget)=myObject.material.bitmap; >> >> Hope I didn't miss the point of your question >> >> -Pete >> >> On Fri, Jan 15, 2010 at 2:25 AM, charglerode <[email protected]> wrote: >>> Is it possible to load an OBJ, but have the loader apply the JPG >>> texture as a WhiteShadingBitmapMaterial ( or any other ) instead of >>> just a plain BitmapMaterial? >> >>> The reason I'm asking it because I would like to apply lights to the >>> scene, but plain BitmapMaterials don't seem to react to lights. I >>> don't want to have the overhead of loading texture separately and >>> applying them face by face. Seems like a lot of unnecessary work. >> >> -- >> ___________________ >> >> Actionscript 3.0 Flash 3D Graphics Engine >> >> HTTP://AWAY3D.COM
