Copy diffuse slot map to bump slot...
Could you please help me with a simple script, which copies the map present in the diffuse slot to the bump slot of the same material? BUT it needs to work, both with mutltisubojects materials and also with vray materials...
So far i have this:
macroScript Bla
category:"MY"
toolTip:"Bla"
(
with undo "Map Copy" on
(
for obj in selection do
(
try(obj.material.bumpMap = copy obj.material.diffuseMap) catch()
)
)
)
But this works only on the standard materials. It doesnt work on vray materials and also it doesnt work on multisuboject materials. Could you help me please to get pass this problem?
Comments
Doesn t work on max 2017 and
Doesn t work on max 2017 and latest vray unfortunately...
vincent
[email protected]
yes...
Well yes, i gues, just apply to multimaterial do some object on the scene, it should do the job. (select then the object and run the script)
Thanks, ill try it. (I have
Thanks, ill try it. (I have max 2009 64 bit).
Just a little note for those of you, who might find this script also usefull:
Its better to add there the word "copy".
e.g.
mtl.texmap_bump = COPY mtl.texmap_diffuse
Otherwise the bump map is an instanced map, and if you want to change something in the diffuse slot only (i change mainly the blur to a lower values), then it affects also the bump slot, which is not good.
But anyway BIG thank you to you :-), im not skilled in maxscript, so i would be unable to write the script myself. Thanks :-)!
Problem found.
It works fine in max 2012, so I tested it in old max 9 and, well, it fails.
Apparently, the hasProperty() method is wonky. If I grab a standard material, showProperty mtl shows a diffuseMap property, mtl.diffuseMap accesses it but hasProperty mtl "diffuseMap" returns false. What the heck?!
Here's a variation that works both in max 9 32-bit and max 2012 64-bit, so it 'should' work with anything in between:
Thanks, but now it works only
Thanks, but now it works only for vray materials and mutlimaterial with vraymaterials as suboject materials...
It does not work on standard materials and mutlisuboject material with standard materials as subojects...
Anyone can help?
This should work:
Can it be done in a map already in the material editor
I have an multimaterial in the material editor, can i use something like what you did to copy all diffuse maps on the submaterials do bump maps?