Direct control of .mtl file on .obj export

How do the variables in a material definition relate to the Ka Kd Ks, etc. in an .mtl file when I do an .obj export?

For example, I want the color that I define to only be for Ka, with Kd and Ks being black. Also, I need Ns to be non-zero, I typically set it equal to 1. These settings are optimized for another program I put the .obj into.

It is tedious for me to make changes by hand. For example, here as an .mtl file that came from Rhino:

All the Ns are set to 0 by default. How does Ns correspond to the material definition?

Rhino doesn’t have a concept of ambient reflectivity (Ka). Diffuse and specular reflectivity (Kd and Ks) are supported.

Ns is the specular exponent. That isn’t something directly available in Rhino either. Maybe the Shine/Glossiness of a Rhino Custom material.

For further information on what .mtl is check out https://www.paulbourke.net/dataformats/mtl/

Interesting, thank you for the information. The main thing I try to avoid in the other program is specular reflectivity. It also works if I specify diffuse reflectivity only. What are the direct controls for these in Rhino?

Depends on the material used. If you use Rhino Custom material then make sure gloss finish is set to black and 0%, reflectivity set to black and 0%, and likely you want transparency also set to black and 0%. Also make sure that Fresnel reflectivity is not checked under the material’s advanced settings. That should give you a completely diffuse material.

Awesome, thanks!