Simple Material Replacement
Simple Material Replacement* Addon stores and reuse material names on obejcts. Once set it is simple to write back materials to objects that already are in the material data base.
Also in the PRO version there are features for selecting items that have already been set, simple selection of "special obejcts" with the ability to quickly import the item to the current blend file. There is also the option to select items that can be hidden or deleted (will provide faster rendering if these items are deleted or moved to another layer).
*Works for cycles and is also tested with Octande render for Blender
Note: This addon does not create materials, it saves and write back the material names on objects. Also it only saves one material name for each object.
3D objects in visualized constructions are often created from 3D Cad. These 3D objects usually consist of copies of a number of basic details used to build a machine or construction. When exporting and importing from 3D cad to the visualization environment, duplicates of in-depth details are created, such as screws, nuts, plates, and more. This is done because a single detail in the 3D cadden can be represented by the same detail but that it is located in several different places. In the visualization programs, the same detail must be created for each location where it is actually located. This creates an incredible amount of 3D objects / details.
Placing the right material in the visualization program on all of these items / details is a time-consuming job. Some details can also be removed, which will not be shown in the image.
With the help of the 3D visualizer Blender and my own written addon, I have automated this process. This addon reads the name of each imported object / detail in Blender and sets the correct material next to a previously created database. There is also an option to highlight the details that can be deleted to speed up the rendering time in the program.
- Saves objects material names in Material Data Base
- Replace material on objects with information from Material Data Base
- Easy to add materials from other blend file
- Will set material to "Not Found" if the material is not in Material Data Base
- Write over material in the Material Data Base with new/other material
- Check and remove duplicated material
PRO version also include
- Select material that already exists in the Material Data Base
- Be able to make special objects in another file, do selections base on that information and also easy import selected object to current blend file (it also place the imported object to selected obejct)
- Make a second database where information can be stored about obejcts that can be removed or deleted.
- List material used by obejcts in the blend file
- Depending on the name of the imported files it is possible to change what should be the parameters that tells what parts are the same. Default is still "." (Included in the updated version 1.1.00)
Who is it for?
This addon makes it quick and easy to set material on many items, once it has been set one time before. Works very well when many obejcts from 3D cad files are imported over and over again. Me myslef has saved days of working time with the help of this addon. Mainly the addon is for those who use Blender to make 3D renders from 3D Cad or architecture.
Don't know if this addon is for you, please send me a message.
How to use
Start with a new blend file and set up all materials that is used. Make sure that they are saved inside the blend file by making them "Save this data block even if it has no users". This is done by pressing "F" for each material.
Open up our blend file to set material to objects. For the first run set the name and the folder for the materialdata base file in the addon. Also set the path to where the blender file is that contains all the material that is going to be used.
Next import our obejct to the blend file or if they already exist skip this stage. Then import the material with "Add Material from base file". Set the materials to the objects. When done select the obejcts and press "Add material to file".
Start a new file (set the correct path to material data base file and material base file) import objects to this file. Press "Add Material from base file" and then select parts to add material to press "Write mtrl to parts". All objects that are not yet found in the Material Data Base file will get the material "Not Found". Select these objects and move to a new layer. Then set material to the objects that not yet are set and add them to the Material Data base.
Objects name and about material
The name that is used for each object are based on that only the first part of the name is used. This means that cube cube.001 cube.002 cube.003 and so on will all be treated as "cube" in the Material Data Base. The effect is that only "Cube" are stored with some kind of material for example "Red". All objects with name cube will have there material set to "Red" when material is applied to these obejcts.
Note: the name that is used is everthing until the dot in the objects name.
Note2: Since version 1.1.00 it is possible to set the parameter as you like. The default is still "." This is only in the PRO version.
When dealing with materials the hole name is used. But it is good to make sure that all material is in the format: red, green, blue and so on and not red.001 red.002. To remove all these duplicates just press "Remove Dupl. Mtrl" . Material that are used and where it can found duplicates will be removed. So when using and making materials make sure they all do not have the name with .XXX at the end.
Installing Simple Material Replacement is simple:
Download the file
Select: File → User Preferences ... → Add-ons from the menu
Click ‘Install from file …’ (at the bottom of the screen) and select the: Simple_Material_Replacement.py file
Click ‘Install from file ...’ (at the top right of the screen)
Check the enable check box to the left of the add-on you just installed
The add-on will now be available in the Render tab at the bottom.
Installing an updated version of Simple Batch Render
If you want to replace a previous version of Simple Material Replacement (or PRO) you have to remove the old version first. to do this, go to File → User preferences … → Add-ons and either search for IDMapper or go to the ‘3D View’ category where it will be located. Click on the add-on and then on the ‘Remove’ button. After removing the old version follow the instructions above to install the new version.
- One blend file is needed that includes all the material that are used. One material must be called "Not Found"
- Install the Addon Simple Material Replacement
- Make a folder on the computer where the addons material data base file can be saved.
Add material to file – Whit this button parts and there material is loaded into the material data base.
Path to mtrlfile – Path and name to the material data base file. Choose where to save the file and its name.
Over writes mtrl in MDB – The default is that parts that already are in the material data base is not changed or written over. With this checked the material is deleted if part is present in the material data base and the part gets the new material instead.
Write mtrl to parts – Write material to selected parts from the material data base file. Note you need to have the same material present in the blend file that is in the material data base file. To do that press “Add Material from base file”
Add material from base file – Add material from the selected blend file in the path below.
Material import file – sets the blend file that is used to import material from.
Check for duplicate materials – Will notify if there is material used on obejcts that could have duplictated materials.
Remove Dupl. Mtrl – If there is materials with same name except from the ending (.001, .0002) it removes all materials that ends with .000X. So if material from the base file is added many times, use this to remove duplicates.
PRO Version also include
Split Parameters – Possible to set the parameter as you like. The default is still "."
Select parts Mtrl set – With this button parts that are already set in the material data base is selected. Very useful if you import new part and want to move parts where materials already are set to another layer.
Select special objects – With this button parts that are special will be selected.
Import special object – Select an object that is a special object and with this command this object will be imported from the other blend file and placed at the same position. Rotate the imported object if necessary.
File special objects: - Sets the blend file that is used to import special objects from.
Select Removable or Hidden objects – Selects objects that are set to Hidden
Mark as Removable or Hidden objects – Set selected parts to hidden in the remove/hidden file.
Unmark as Removable or Hidden objects – Remove objects to be hidden in the remove/hidden file.
File Removable or Hidden objects: – Path and name to the remove/hidden data base file. Choose where to be saved and its name.
List materials – Lists all materials that are selected. Here is i possible to see if there is duplicated materials.
Here is a link to download test files for the addon:
Download link for test files
No FAQ's found for this product.
Purchase this item to leave a review!