To my knowledge you won’t be able to import a mesh with a material name and have it auto-magically map to a same name material in Blender (or any application for that matter). You will have to select the mesh and use the material pulldown to re-assing to the new material. It’s really not difficult and even with a few dozen materials doesn’t take all that long to do.
Beyond that, you could try to delete the .mtl file (material library) with the .obj but I doubt that will do it. MeshLab I think has some tools to do this, but it’s such a detailed application that I haven’t been able to successfully do anything regarding materials with it. I know that doesn’t answer your question, but hopefully helps to get some direction.
I’m sure you don’t wanna waste your time with re-assigning 30 materials in a scene every time you update it.
My Workflow in architecture visualization is modelling in Sketchup (because it’s very easy, fast and intuitive to use), exporting to an OBJ-File and importing it in Blender. In Blender I add vegetation (tenthousand of instanced grass patches, trees and so on because Cycles supports instanced Objects and saves me ALOT VRAM).
And normaly I have to modify my Sketchup-Modell 3, 4 or n-times because the customer wants some changes.
So I have to restart importing it an assign my 30 materials again… I’m sure you wouldn’t wanna do such a boring and timeconsuming task
It’s no problem to expand the OBJ-Importscript with an automaticly “Assign existing Materials-Function” (Cambpell told me it wouln’t be such a big task for him ;-)).
Sorry, I was trying to offer you possible workarounds. If you are questioning my personal workflow, it’s usually a mute point, I don’t usually have to do multiple exports/imports. In the event that I actually do, I want to simplify the scene and reduce memory (in other words I want my models to be complete, but if something is obscured, I don’t want the textures loaded, same as you, VRAM consideration). I also like to examine every material (even though I have nodes pre-built) to ensure correctness.
Too bad he can’t also fix the importer such that it has the 2.49b options. Often when I import mesh I need it separated by material otherwise the import fails. Right now I import to 2.49b, save the blend and append to a new scene in 2.61. I long for the days I don’t need 2.49b anymore.
With the help of Calli (the autor of the german Blenderbook “Das Blender-Buch”) I expandet the script with a checkbox-option “Use Blender-Materials”.
It works pretty well and covers all my needs now.
I hope it does for you as well
Just overwrite the two files in the …\Blender Foundation\Blender\2.61\scripts\addons\io_scene_obj with the ones in the attached Zipfile.
I’ve only tested it for Window.
See the Post below for the update of the Script, this one here does not work anymore.
Alain, very, very thanks. It works perfectly, will save a lot of my time.
I have blank file with tens of my tuned materials and I often import into this file objects with tens of materials. These materials have the same name and with this patch they are immediately assigned according its name…
A couple of second after import, I can render with tuned materials. It is fantastic, could be in trunk, i think.