[Closed] problem with multimaterial
I created a multi material and when I add a standard material to the id 3 it doesn’t allow me to change the monoOutput propertie On.
multiMat[3] = standard twosided:on diffuseMap:(Bitmaptexture fileName:(p3)) opacityMap:(Bitmaptexture fileName:(p3)) monoOutput:on
thanks,
Alex
two problems…
one, scope; monoOutput is a property of the bitmaptexture, not of the material. You’re currently trying to set it on the material
-- current code
multiMat[3] = standard twosided:on diffuseMap:(Bitmaptexture fileName:(p3)) opacityMap:(Bitmaptexture fileName:(p3)) monoOutput:on
-- current code collapsed for clarity:
multiMat[3] = standard twosided:on diffyseMap:someMap opacityMap:someMap monOutput:on
-- code you want, presumably, but see below:
multiMat[3] = standard twosided:on diffuseMap:(Bitmaptexture fileName:(p3)) opacityMap:(Bitmaptexture fileName:(p3) monoOutput:on)
two, value type; monoOutput expects an integer – which is any whole number like 0, 1, 2, 3, -1, -2, -3, etc. In most cases in MaxScript, that integer represents an underlying value. In the case of monoOutput:
.monoOutput -- Mono Channel Output:
-- 0 == RGB Intensity
-- 1 == Alpha
Presumably, you’d want to switch the Mono Channel Output of the opacity map to use the input map’s alpha channel. So instead of ‘on’ (which is a boolean value… like true/false), you would use ‘1’.
multiMat[3] = standard twosided:on diffuseMap:(Bitmaptexture fileName:(p3)) opacityMap:(Bitmaptexture fileName:(p3) monoOutput:1)
I hope that makes sense