Conversion of obj files

Hi Brian,

Good research! The materials do not translate very well, so you'll just have to do the best you can with those. If your object(s) have mapped textures, you may be better off using obj2mesh instead of obj2rad, since a Radiance triangle mesh supports mapped textures. You'll still need to translate the texture image file(s), however.

Best,
-Greg

···

From: Brian A Karr <[email protected]>
Date: December 21, 2013 4:42:10 PM PST

Hello all,

I am a new user of Radiance and have been working through the manual, examples, list-server...

I am working to convert a .obj and .obj.mtl file created in CATIA for use in Radiance.

My understanding is as follows...

Convert the .obj file to .rad using OBJ2RAD, using a map file that can be created with the help of the -n qualifier. Its not clear to me that I really need the .map file, based on this comment "The material names for the surfaces will assigned based on the mapping rules file given in the −m option. If no mapping file is given, the identifiers given by the "usemtl" statements will be used as the material names." Looking at the .obj file, it uses usemtl statements, which is why I don't necessarily think I need the .map? Sample from the .obj is below:

mtllib light.obj.mtl
s off
v -0.279400 -0.006350 0.076200
v -0.279400 -0.006350 0.003175
v 0.482600 -0.006350 0.076200
v 0.482600 -0.006350 0.003175
vn 0.000000 -1.000000 -0.000000
vn 0.000000 -1.000000 -0.000000
usemtl appearance0
g default
f 1//1 2//1 3//1
f 3//2 2//2 4//2

Next I believe I need to convert the .obj.mtl file to a material .rad file. I found this comment
[Radiance-general] Re: Using OBJ2MESH utility

indicating there is not a direct translator. So, I believe I need to do this manually? Here is an example from the .obj.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

If this is the case, my next step would be to dig into both material descriptions. Any past experience would be appreciated!

One other question, is there a better output format than .obj that incorporates the material properties, or maybe I should be asking, has a more direct correlation between the material properties? I have a feeling its not that easy!

Thank you,

Brian