PDA

View Full Version : problem with multimaterial


abahena
08-13-2008, 09:43 PM
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

ZeBoxx2
08-14-2008, 12:28 AM
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 :)

abahena
08-14-2008, 01:06 AM
Thank you!
I was struggling with this for a while

CGTalk Moderation
08-14-2008, 01:07 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.