OBJ materials -> Octane materials
Posted: Tue Feb 21, 2012 1:01 am
Hi,
Recently I have been tinkering with Solidworks API to write out .obj from parts,assemblies. In the course of that I have been looking at what happens to the .obj materials when it is imported into Blender, worked on and then exported to Octane, and also what happens when the SW.obj materials are used directly by Octane from SWX.
Presently some of the .mtl parameters are not used by Octane or how they are interpreted is not so helpful.
Here is what we (Refractive) might do.
Ka - is not used at all. XXXX
Kd - used by Octane for Specular-Transmission, Glossy-Specular and Diffuse-Diffuse colours.
Ks - used by Octane for Specular colour, if zero flags a Octane Diffuse mat otherwise its a Specular mat. Conversion is scaled in the preferences setting.
d - currently not used but could be used for Opacity, same range 0-1.
Ns - used by Octane for Diffuse mat and Glossy mat Roughness (but not for Spec mat bug?) but with a strange scale conversion, should be 1000-0 > 0-1.
Ni - used by Octane for IOR, if 1.0 then it flags an Octane Glossy mat.
Tf - currently not used but could be used for Medium Absorbtion (sss) colour if RGB.
illum - currently not used but could use for flagging transparency ie use a Octane Specular mat, and also for flagging Octane Diffuse and Glossy mats.
I realise some of the eqivalent parameters for texture maps are supported already but for mats conversion is incomplete or unhelpful/inconvenient.
The trouble I have is basically with the Glossy and Spec flags upsetting conversions between programs.
I would rather flag a Spec mat by the illum parameter. While SWX delivers a value for Ni it can't be set just using the usual 'Appearances' interface. This means all mats arriving in Octane are specular by default rather than glossy.
The obj specification says illum 4,6,7,9 involve transparency but illum 7 would be handiest for Blender round trip since it has mirror, fresnel and raytrace (as opposed to z transparency).
If illum 2 was used the imported mat would be a Glossy mat. Diffuse mats would be flagged by illum 1.
Really I suppose I am asking for alternative flags rather than replacements.
So any thoughts from the community about using d for Opacity, Tf for sss, fixing the Roughness, and alternatively illum 1,2,7 for Diffuse, Glossy and Specular respectively?

Recently I have been tinkering with Solidworks API to write out .obj from parts,assemblies. In the course of that I have been looking at what happens to the .obj materials when it is imported into Blender, worked on and then exported to Octane, and also what happens when the SW.obj materials are used directly by Octane from SWX.
Presently some of the .mtl parameters are not used by Octane or how they are interpreted is not so helpful.
Here is what we (Refractive) might do.

Ka - is not used at all. XXXX
Kd - used by Octane for Specular-Transmission, Glossy-Specular and Diffuse-Diffuse colours.
Ks - used by Octane for Specular colour, if zero flags a Octane Diffuse mat otherwise its a Specular mat. Conversion is scaled in the preferences setting.
d - currently not used but could be used for Opacity, same range 0-1.
Ns - used by Octane for Diffuse mat and Glossy mat Roughness (but not for Spec mat bug?) but with a strange scale conversion, should be 1000-0 > 0-1.
Ni - used by Octane for IOR, if 1.0 then it flags an Octane Glossy mat.
Tf - currently not used but could be used for Medium Absorbtion (sss) colour if RGB.
illum - currently not used but could use for flagging transparency ie use a Octane Specular mat, and also for flagging Octane Diffuse and Glossy mats.
I realise some of the eqivalent parameters for texture maps are supported already but for mats conversion is incomplete or unhelpful/inconvenient.
The trouble I have is basically with the Glossy and Spec flags upsetting conversions between programs.
I would rather flag a Spec mat by the illum parameter. While SWX delivers a value for Ni it can't be set just using the usual 'Appearances' interface. This means all mats arriving in Octane are specular by default rather than glossy.
The obj specification says illum 4,6,7,9 involve transparency but illum 7 would be handiest for Blender round trip since it has mirror, fresnel and raytrace (as opposed to z transparency).
If illum 2 was used the imported mat would be a Glossy mat. Diffuse mats would be flagged by illum 1.
Really I suppose I am asking for alternative flags rather than replacements.
So any thoughts from the community about using d for Opacity, Tf for sss, fixing the Roughness, and alternatively illum 1,2,7 for Diffuse, Glossy and Specular respectively?

