I couldnt find a script that did this so I made one
I am not really good with MaxScript so its janky AF but it works.
To use it:
- Open a new script (Top tool bar -> Scripting - New Script)
- Paste the code into the blanc script
- Select all the objects you want to have their materials converted.
- On the script window click Tools - Evaluate All
theObjs = selection as array
doneOjects = 0
for obj in theObjs do
(
select obj
mat = $.material --Get the material
if classOf mat == PhysicalMaterial do --Check if its a Physical Material
(
isNew = true
exisitingMat = undefined
for m in sceneMaterials do
(
if m.name == mat.name + "_standard" do --Check to see if its already converted
(
isNew = false
obj.material = m
break
)
)
if isNew == false do
(
continue
)
---------------------------------------------
--Actual conversion
---------------------------------------------
print ("Converting: " + mat.name )
newMaterial = standardMaterial name:"Temp" diffuse:(color 255 255 255)
--Rules:
newMaterial.diffuse = mat.Base_Color
newMaterial.diffuseMap = mat.Base_Color_Map
newMaterial.opacityMap = mat.trans_color_map
--Add additional Rules here if you need them
newMaterial.name = mat.name+ "_standard"
obj.material = newMaterial
doneOjects += 1
)
)
print ("Materials Converted: " + doneOjects as string + "!")
You can add additional rules but you will have to look you the properties you need in the documentation here
Standard Material
Physical Material
Adding a rule should be easy
Just add a line where :
newMaterial.<the target property> = mat.<the source property>
It's not perfect but I hope it helps at least