This means that I still have to load the texture separately. Since the OBJ loader already loads the texture I would prefer it keep loading the texture, but just let me specify which type of bitmap material to use when applying it. Is this possible? If I have to load the texture myself, then that means I have to keep a reference to a JPG file for each OBJ file, which kind of defeats the purpose of using an OBJ file especially since I am trying to avoid constant republishing.
On Jan 24, 10:47 am, Fabrice3D <[email protected]> wrote: > 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
