Hello,
Having tested Infraworks briefly, I found out that most materials on exported FBX files have simply name "Material". This causes problems with certain software, like Lumion and 3dsmax in some cases. We haven't upgraded from max 2012 so I haven't tested IW <->Max2014 link yet.
Is there any way to edit material names in infraworks?
Hi,
>> Is there any way to edit material names in infraworks?
I guess sorry no, there is no way (currently) as IW works with styles and style-rules, the concept is different to that of rendering software like 3DS-Max is it.
That the export to FBX creates materials then is just because it's needed for defining surface-structures/colors within the FBX.
If the interface gets changed in future releases (IW to 3DS-Max) I would also like to have named objects (name-prefix like SURFACE, TREE,...), I also would like to have material names in FBX that's naming is depending from the style/rule from what it's generated.
Let's hope, - alfred -
Any update on this topic? I'm having a hard time with this too, when I import my FBX into 3DSmax I get a LOT of material names in my scene based on the same texture. There must be a way to consolidate the materials list based on the texture map somehow. Any thoughts?
Checking in on this old thread to see if anyone has come up with a workflow to help with this issue. Is there an input in the style metadata that corresponds to the fbx export. Perhaps there is a custom script within the data source configuration to create a "material" name.
This issue destroys the ability to repeatedly link or refresh the fbx export into a realtime renderer like Lumion or Twin Motion etc, as the material name numbering get shuffled and redefined uniquely as you add new material or styles in the Infraworks model.
I fix this by interrogating the Infraworks SQLite database and assigning materials and objects new names and materials in an ETL tool (using preset rules). If I'm going to Unreal I might then write the object metadata (or BIM attributes) with it, to the Udatasmith format.
But I agree that the way Infraworks names materials and objects is TERRIBLE.
Mesh 1, Material 1 is baffling, and I've spent untold hours renaming and working around this.
Please do this better, Autodesk...even if just for the sake of integration into your own software products....(looking at you, 3DS Max).
Yes. Infraworks needs to fix this issue. In the meantime I've created an addon in blender attached which will rename the random numbered materials with the actual referenced textures so when you make updates in your rendering software you won't have to reapply all your materials. Below is the code which you can use notepad or similar and save as "__init__.py". Once you install that .py file in Blender it will appear in the similar folder below and then you just have to manually create the "IW-TextureRename_Global" folder and drag the .py file into it, enable the addon in blender. Once installed, select the objects, navigate to the object drop down towards the upper left corner - select "rename textures" which will run the script.
bl_info = {
"name": "IW-TextureRename-Global",
"blender": (2, 80, 0),
"category": "Object",
}
import bpy
import os
class OBJECT_OT_rename_textures(bpy.types.Operator):
bl_idname = "object.rename_textures"
bl_label = "Rename Textures"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
rename_materials()
return {'FINISHED'}
def rename_materials():
renamed_materials = {}
for obj in bpy.context.selected_objects:
if obj.type == 'MESH':
print(f"Processing object: {obj.name}")
for mat_slot in obj.material_slots:
mat = mat_slot.material
if mat and mat.use_nodes:
for node in mat.node_tree.nodes:
if node.type == 'TEX_IMAGE' and node.image:
texture_path = node.image.filepath
texture_name = os.path.basename(texture_path)
texture_name = os.path.splitext(texture_name)[0]
if texture_name not in renamed_materials:
print(f"Renaming material {mat.name} to {texture_name}")
mat.name = texture_name
renamed_materials[texture_name] = mat
else:
print(f"Reusing material {texture_name} for {mat.name}")
mat_slot.material = renamed_materials[texture_name]
def menu_func(self, context):
self.layout.operator(OBJECT_OT_rename_textures.bl_idname)
def register():
bpy.utils.register_class(OBJECT_OT_rename_textures)
bpy.types.VIEW3D_MT_object.append(menu_func)
def unregister():
bpy.utils.unregister_class(OBJECT_OT_rename_textures)
bpy.types.VIEW3D_MT_object.remove(menu_func)
if __name__ == "__main__":
register()
C:\Users\(your name)\AppData\Roaming\Blender Foundation\Blender\(version#)\scripts\addons\IW-TextureRename_Global
Can't find what you're looking for? Ask the community or share your knowledge.