[Radiance-general] Conversion of obj files

Terrance McMinn t.mcminn at iinet.net.au
Sun Dec 22 23:44:09 PST 2013


Hello Brian,

A quick check of http://www.fileformat.info/format/material provides 
some information on the file format which could be used as a guide.

Using your {mtl} file:
newmtl appearance0
Ka 0.793125 0.793125 0.793125
Kd 0.793125 0.793125 0.793125
Ks 0.119 0.119 0.119
Ns 119.04
d 1
illum 2

To list all materials in the mtl file listing all line containing the 
newmtl string:
     grep newmtl {mtl}

     In your case the first materials name is appearance0
     According to http://www.fileformat.info/format/material:
         The Ka statement specifies the ambient reflectivity using RGB 
values.

"r g b" are the values for the red, green, and blue components of the 
color. The g and b arguments are optional. If only r is specified, then 
g, and b are assumed to be equal to r. The r g b values are normally in 
the range of 0.0 to 1.0. Values outside this range increase or decrease 
the reflectivity accordingly.

         The Kd statement specifies the diffuse reflectivity using RGB 
values.
         The Ks statement specifies the specular reflectivity using RGB 
values.

Therefore a simple material definition for your appearance0 might be:
void plastic appearance0
0
0
5 0.793125 0.793125 0.793125 .1 .1

The last two parameters (.1 and .1) are the specularity and roughness. 
Specularity fractions greater than 0.1 and roughness values greater than 
0.2 are not very realistic.


*Terrance McMinn
***
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20131223/03fc4945/attachment.html>


More information about the Radiance-general mailing list