Question

I am trying to parse line items from "mtl" file and use the values as parameters to opengl functions.

I could use values of ambience (Ka), specular(Ks) and diffuse(Kd) using glMaterialfv. But I don't know the use for Ni (optical density), d (dissolve), illum (illumination) values given in the mtl file.

Which opengl function should be used with these values?

Any help with these line items?

....
Ni 1.000000
d 1.000000
illum 2
...
Was it helpful?

Solution

Dissolve means transparency. 1.0 means fully opaque object, 0.0 means fully transparent. You can control rendering of transparent objects by using functions like glBlendFunc().

OTHER TIPS

For a full definition of mtl files, including illum, please see http://people.sc.fsu.edu/~jburkardt/data/mtl/mtl.html.

Ni seems to be unsupported and can be ignored.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top