IFC file conversion to Obj

Hi All,

Has anyone successfully converted IFC file to OBJ file with a valid .mtl file for rendering a floor plan of a building.

Its been difficult to find a converter that successfully does this. The IFC files I’m working with have colour properties contain in them, as i can see these surface colours in various IFC viewers.

Are there any converters out there, anyone would suggest using that they have tested and can confirm will produce a valid obj and mtl file from an IFC file?

Thanks,
Vince

Hello Vince,

Have you tried Blender with the Bonsai extension for IFC. Blender is able to then export to many other formats.

Kind Regards
Terrance McMinn

I’ve tried blender with bonsai, the resulting obj files would not run through oconv to be compiled into an octree, and there was no error returned in the terminal.

Did you manage to have this workflow work successfully?

Thanks,
Vince

Hello Vince,
I have tested the obj export option from Blender with two different approaches:
obj2mesh

obj2mesh Untitled.obj > b.rtm

Created the simple b-head.rad file:
void plastic tiled_mat
0
0
5 0.4 0.4 -0.4 0 0

tiled_mat mesh tiled_mesh
1 b.rtm
0
0

Then to view the rad file I used:
objview b-head.rad

obj2rad. This gives more control over materials.

To get the list of materials used in the obj file use the -n option in obj2rad:
obj2rad -n Untitled.obj > a.mat

Modify the mat file with actual radiance material definitions. See an old discourse post on “Conversion of obj files” for some basic information to interpret the mtl file. As far as I can see there is no automatic conversion tools from mtl to radiance material definitions.:

Create the rad file:
obj2rad -m a.mat Untitled.obj > a.rad

Then to view the rad file I used:
objview a.mat a.rad

Kind Regards
Terrance McMinn

1 Like

Yes, as Terrance implied in his response, oconv does not accept OBJ files directly. You must either use obj2mesh or convert to Radiance scene language using obj2rad or robjutil.

-Greg