[Radiance-general] Conversion of obj files
Brian A Karr
brianakarr at yahoo.com
Sat Dec 21 16:42:10 PST 2013
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
http://www.radiance-online.org/pipermail/radiance-general/2003-May/000727.html
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20131221/ab968acf/attachment.html>
More information about the Radiance-general
mailing list