문제

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
...
도움이 되었습니까?

해결책

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().

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top