[Radiance-general] Conversion of obj files

Brian Karr brianakarr at yahoo.com
Mon Dec 23 18:37:53 PST 2013


Thanks all. Ill spend some time looking at the material format versus the
radiance definitions. For now Terrance's suggestion will work. I created a
materials.rad file with the definitions. 

 

I had some trouble with missing source auxiliary files, but have added them
in. I must have made a mistake during the installation. 

 

So I have inserted my sample Catia object with materials.rad description
into the red ball/light example. 

 

Brian 

 

 

From: Terrance McMinn [mailto:t.mcminn at iinet.net.au] 
Sent: Monday, December 23, 2013 2:44 AM
To: Brian A Karr; Radiance general discussion
Subject: Re: [Radiance-general] Conversion of obj files

 

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/039b6fc4/attachment.html>


More information about the Radiance-general mailing list