Skip to main content

Hi,

 

I am very new to FME and I have just created a workflow to transform DWG/DXF files into OBJ files. However, I have noticed that the .mtl file is not generated together with the .obj one.

 

I am using an AttributeManager to do the conversion and, apart from the .mtl not being generated, the .obj looks fine.

 

 

Thanks in advance for any help.

Hi @domenicoruggeri,

Are you applying any textures to the output .obj file in FME or do the source dwg features have textures? If the latter, you may need to use the Autodesk AutoCAD RealDWG DWG/DXF (REALDWG) reader instead of the Autodesk AutoCAD DWG/DXF (ACAD) reader because they read in solid/meshes differently - more in the AutoCAD DWG - Which format should I use? article. I believe the materials.mtl file should only be generated (along with a materials_textures folder containing the textures) if the output obj file has textures.

Hope that helps.

OBJ_Texture.fmw


Hi @domenicoruggeri,

Are you applying any textures to the output .obj file in FME or do the source dwg features have textures? If the latter, you may need to use the Autodesk AutoCAD RealDWG DWG/DXF (REALDWG) reader instead of the Autodesk AutoCAD DWG/DXF (ACAD) reader because they read in solid/meshes differently - more in the AutoCAD DWG - Which format should I use? article. I believe the materials.mtl file should only be generated (along with a materials_textures folder containing the textures) if the output obj file has textures.

Hope that helps.

OBJ_Texture.fmw

Hi @chrisatsafe,

Thanks for your reply and help.

My DWG file has features with textures, so I've made the change on the reader as you suggested, however, I haven't got any luck with that... still no .mtl file.

I guess it might actually be easier to share my workflow and a couple of examples of the DWG files I am trying to convert (please find them attached).

 

 

cad2obj.fmw

fmt-32 AutoCAD Drawing R11-R12 file x.dwg

fmt-34 AutoCAD Drawing R14 file 1.dwg

 

Thanks a lot in advance for your time and help.

PS: I am not sure if this is caused by the same issue (which I am starting to think it might be in the transformer), but when I try to convert the same files into a .gltf file, I get the .gltf and the .bin, but no textures.


Hi @chrisatsafe,

Thanks for your reply and help.

My DWG file has features with textures, so I've made the change on the reader as you suggested, however, I haven't got any luck with that... still no .mtl file.

I guess it might actually be easier to share my workflow and a couple of examples of the DWG files I am trying to convert (please find them attached).

 

 

cad2obj.fmw

fmt-32 AutoCAD Drawing R11-R12 file x.dwg

fmt-34 AutoCAD Drawing R14 file 1.dwg

 

Thanks a lot in advance for your time and help.

PS: I am not sure if this is caused by the same issue (which I am starting to think it might be in the transformer), but when I try to convert the same files into a .gltf file, I get the .gltf and the .bin, but no textures.

Hi @domenicoruggeri,

Thank you for uploading the workspace and sample data.

How are they textures applied in the dwg's you attached, are they materials? It looks like the texture may not have been included with the sample you provided as I can't see the texture when viewing in AutoCAD with the Realistic Visual style.

Additionally, when reading into FME, it looks like there may be some invalid parts to the surface.

 


Reply