Hi Richard and welcome to Away,

You do not see the material because you do not have the mtl file placed next to the sources. If your mtl would be missing but tagged into the obj file, you would see default white bitmapmaterials and you would probably see an error triggered by the mtl parser.

the first line in the obj file says: use mtl + url, according to wavefront specs, the mtl must be next to the obj file since the mtl adres is resolved from the obj url. the mtl contains the url of the sources bitmaps.

in short from your exporter you should get this:

myobject.obj --> holds geometry data and mtl adress
myobject.mtl --> holds materials information + sources urls per materials source.jpg --> sources most of the time located next to mtl or in map "images" located in same map as the mtl

Since you get no errors and see random fill materials, your exporter probably have exported only the geometry information.
What is the exporter you are using?

Fabrice

On May 24, 2009, at 6:22 PM, EagleHawk wrote:


Hi,

I'm loading an OBJ file that has accompanying materials and textures
file. So far, the mesh loads fine but I can't get the textures to
display. All I get each time is the mesh showing the random colours.

From everything I've found in the forum here and elsewhere, I'm led to
believe that as long as the materials file and the OBJ file are in the
same folder and have the same name then Away3D should auto load the
textures.

One of the things I tried from an example I found was to include an
autoLoadTextures property in the init object for the loader. During a
debug process the only message I get is that autoLoadTextures is an
unused argument.

So my question is how exactly does one load the textures associated
with the OBJ file?

Thanks,
Richard.

Reply via email to