Finaly pinned down the problem for the  .obj textures autoloading issue .

Started to comapre the mtl output from Max and PreFab . You won't believe
guys how simple is the solution !!!!

Appears that the exported from Max mtl looks like this:

newmtl my_text

Ns 10.0000
    Ni 1.5000
    d 1.0000
    Tr 0.0000
    Tf 1.0000 1.0000 1.0000
    illum 2
    Ka 0.5880 0.5880 0.5880
    Kd 0.5880 0.5880 0.5880
    Ks 0.0000 0.0000 0.0000
    Ke 0.0000 0.0000 0.0000
    map_Ka myText.jpg  /////////////here must change to realtive path
    map_Kd myText.jpg /////////////here must change to realtive path

and from PreFab it comes out like this:
newmtl awmat_0
Kd 1 1 1
Ka 0.2 0.2 0.2
Ks 0.2 0.2 0.2
Ns 128
Tr 1
D 1
map_Kd images/aw_0.png

NOW , you sure think that it is a problem of the difference between tags or
numerical representation . Nope! That what I was thinking . But after trying
to exclude or format different parts in order for them to look like the
Prefab mtl , I found it : look at the position of map_Ka and map_Kd  in both
examples ! in Prefab there is no space between the left margin and the
string but in the Max it is aligned with all the parameters . If you delete
that space and align the strings to the left  so it is aligned with newmtl
my_text you are done . It works!

Can't believe wasted some 4 hours to figure it out.

Cheers

-- 
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|
www.neurotechresearch.com
Tel:054-4962254
[email protected]
[email protected]

Reply via email to