ObjParser supports now mtl colors if found in material blocks and if they do not hold map information Only diffuse color is supported for now.
svn updated. Fabrice On Apr 1, 2011, at 12:29 PM, Páll Zoltán wrote: > Right, I've opened the OBJ and saw how it's linked to the MTL. The only > problem now that remains is the model from my colleague. In the OBJ there's > this line, referencing the material file: > > mtllib test.mtl > > later on, using a material defined in the MTL: > > usemtl initialShadingGroup > > MTL looks like this: > > newmtl blinn1SG > illum 4 > Kd 1.00 1.00 1.00 > Ka 0.00 0.00 0.00 > Tf 1.00 1.00 1.00 > Ni 1.00 > Ks 0.50 0.50 0.50 > newmtl initialShadingGroup > illum 4 > Kd 1.00 0.05 0.00 > Ka 0.00 0.00 0.00 > Tf 1.00 1.00 1.00 > Ni 1.00 > newmtl lambert2SG > illum 4 > Kd 0.89 0.89 0.89 > Ka 0.00 0.00 0.00 > Tf 1.00 1.00 1.00 > Ni 1.00 > > Unfortunately the loaded model is still textured with the checkerboard. > > Z. > > On Fri, Apr 1, 2011 at 12:20 PM, Fabrice3D <[email protected]> wrote: > sure you can, its automatically handled by the objparser. > even if you embed. But the reason some users want to get rid of the mtl is > because they want a single independant swf file > embedding the obj when you have an mtl, still requires a load relative to swf > for external resources. > this has nothing to do with the mtl mechanism on itself. > In short they cry for awd2 :) > > please take a look at examples files. > The manager handles all automatically for any supported parser/fileformat > so basically unless you specify the parser, the url is the only thing you > need to change for every format you want to load. > therefor you can look at all examples regarding loading, they are all similar. > > Fabrice > > > On Apr 1, 2011, at 11:57 AM, Páll Zoltán wrote: > >> One more question: My colleague exported an OBJ from Maya, and it spit out >> an MTL file too. That's the texture/material def, if I'm not mistaken. How >> do I load that? Does the ResourceManager help with this? Or is it possible >> at all to load MTL files? >> >> Z. >> >> On Fri, Apr 1, 2011 at 11:16 AM, Páll Zoltán <[email protected]> wrote: >> Will try that, thanks a lot :) >> >> Z. >> >> >> On Fri, Apr 1, 2011 at 11:08 AM, Darcey Lloyd <[email protected]> wrote: >> >> I need to work out how to get blender to export the texture files, save & >> create a uv from what is already in the files etc. I'm not sure who designed >> the GUIs for Blender, Max or Maya but I think they just wanted to make them >> as non user friendly as possible. >> >> >> > >
