Notifications
Clear all

[Closed] Copy material Channels

Hello all.

I have a scene where I have to work with about 80 materials, where the only difference is that the diffuse texture map is different. I want to be able to copy the diffuse into the opacity and possible other channels like bump or self -illumination. I found some scripts that people have built to do similar things but I cant seem to make them work for my scene, this probably has to do with me being a new to scripting, If anyone can point me in the right direction it would be awesome.

(
for Obj in objects where isValidNode obj do
(
local mat = obj.material
if superClassOf mat == material AND classOf mat.diffuseMap == bitMapTexture do
(
mat.opacityMap = copy mat.diffuseMap
mat.opacityMap.output.invert = true
)
)
)

http://www.scriptspot.com/forums/3ds-max/scripts-wanted/diffuse-alpha-channel-to-opacity-channel

for i = 1 to 24 do (
local MultiMatCount = undefined
try MultiMatCount = meditMaterials[i].materialList.count catch()
if MultiMatCount != undefined do (
for t = 1 to MultiMatCount do (
meditMaterials[i].materialList[t].bumpMap = meditMaterials[i].materialList[t].diffuseMap
)
)
)

http://www.scriptspot.com/forums/3ds-max/general-scripting/script-problem

2 Replies

It depends on the type of material being used and the parameter names for the desired map slots. What you posted will only work for materials that use those specific names for the map parameters.

-Eric

I am planning to use a standard material. By “parameter names for the desired map slots” do you mean diffuse,bump etc…? With the second script It says at scriptspot that it should go through the material editor and copy the bump into the diffuse, something like that should work for what I need to do.