I’m exporting an .obj from 3dsmax and am trying to import it in the jMP. I’ve been puzzling for a long time why i wasn’t seeing anything until i found out this has something to do with the Transparency settings.
When exported from 3dsmax my .MTL looks like this:
If i’m correct, the tags interpreted for transparency by jMP are both the “d” and the “Tr” tag. When the “Tr” tag is 0, the model is entirely transparent.
This is rather strange. When i lower to the opacity in 3dsmax to say 80, the “d” value drops to 0.8000 and the “Tr” value changes to 0.2000.
newmtl House1
Ns 127.0000
Ni 1.5000
d 0.8000
Tr 0.2000
Tf 0.8000 0.8000 0.8000
illum 2
Ka 0.8000 0.8000 0.8000
Kd 0.8000 0.8000 0.8000
Ks 0.4500 0.4500 0.4500
Ke 0.0000 0.0000 0.0000[/xml]
It looks like those values combined should be 1.0, instead of depending entirely on the "Tr" as the transparency.
Anyone cares to share some insight on this subject?
Thanks in advance!
d alpha
defines the transparency of the material to be alpha. The default is 1.0 (not transparent at all) Some formats use Tr instead of d;
Tr alpha
defines the transparency of the material to be alpha. The default is 1.0 (not transparent at all). Some formats use d instead of Tr;
It seems that the exporter you're using is beta version (0.97) perhaps you can update to stable release version?
unfortunately, then you are hit by d 1.0 tr 0.0 problem in some of the models. I would probably suggest taking max of d and tr values if both appear in model, just to stay on safer side in case obj file is broken.
In any case, change above is needed - otherwise, everything is transparent/alpha blend, which causes visual artifacts in some scenes.
And as extra hint. If you are loading sponza obj model, make sure you got to mtl file and change