Import OBJ with materials - png, jpg and mtl

I am trying to import a *.obj file with materials. The file to import is in *.obj format
The obj file has a related *.mtl file and a lot of *.png image files.
The mtl file is a text file that lists the names of the png image files (see sample below).
All the files are in the same folder.

The mesh imports successfully but in a realistic view, the images are not showing (just the grey surface).
The materials browser shows all the materials and I can individually click each material and browse to the correct image. This then shows correctly in a realistic view.

However, I have over 400 images so this is time-consuming. Is there a way of importing an obj file with the materials and images correctly referenced automatically?

I can import the same *.obj file into 3DS Max and it correctly displays the images on the mesh automatically.

Sample of contents of the mtl file as per below. I can change the "map_Kd" contents fairly easily from full path, to relative, no path, etc, and have tried a number of these options but with no success.

newmtl BuildingMat-00000
Ns 0.000000
Ka 1.000000 1.000000 1.000000
Ks 0.000000 0.000000 0.000000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 1
map_Kd C:/Users/CA_AMD_12_Core/Desktop/8-a6qfujw/8-00000-texture.png

Could you please help me to import the obj file with the texture working automatically?

I can click on the three dots circled in blue and browse to the correct *.png file


Image of desired outcome mesh with materials/textures applied:


Image of BricsCAD after manually browsing to the image file for 50 of the images (out of 400+)


Comments

  • BricsCAD support provided me with a solution as per below. Incredible customer support, well-done BricsCAD!

    For this case, I created a basic script that attaches textures to already existing materials.
    The process is based on the particular names of each material and texture file.

    To use the script, put the texture files in the folder C:\Temp\
    Then import the obj file, load the script and run the ASSIGNT custom command.
    Finally, set the visual style to Realistic.

    However, this script will not work with every obj file.
    The assignment of textures was based on similarities between the names of materials and texture files.
    This might not be the case with other situations.