DeMatti
12-04-2010, 11:03 PM
hi everyone!
i'm writing a little script that's supposed to render the viewport you're looking at and paste a pre-alpha masked on top of that, like you would in photoshop.
now, I have a problem: according to what i've seen in maxscript help, i'm supposed to do that using the pasteBitmap() method, using the type:#composite line.
here's my code: (it's pretty short and I kept it structured)
freesceneBitmaps()
render1 = render camera vfb:on outputwidth: 1280 outputheight:720 force2sided:on
Watermark = openBitmap "C:\\Users\\Mattias\\Desktop\\NAMING TEMPLATE.tga"
finalRender = bitmap (1280) (720) color:backgroundcolor
pasteBitmap render1 finalRender(box2 0 0 1280 720)[0,0]
pasteBitmap Watermark finalRender(box2 0 0 1280 720)[0,0] type:#composite
display finalRender
finalRender.filename="C:\\Users\\Mattias\\Desktop\\Watermarked render.jpg"
save finalRender
the solution is probably something ridiculously easy, but I just can't seem to find it :S
i've already tried it with a .png image, so I don't think the file format is a problem
i'm writing a little script that's supposed to render the viewport you're looking at and paste a pre-alpha masked on top of that, like you would in photoshop.
now, I have a problem: according to what i've seen in maxscript help, i'm supposed to do that using the pasteBitmap() method, using the type:#composite line.
here's my code: (it's pretty short and I kept it structured)
freesceneBitmaps()
render1 = render camera vfb:on outputwidth: 1280 outputheight:720 force2sided:on
Watermark = openBitmap "C:\\Users\\Mattias\\Desktop\\NAMING TEMPLATE.tga"
finalRender = bitmap (1280) (720) color:backgroundcolor
pasteBitmap render1 finalRender(box2 0 0 1280 720)[0,0]
pasteBitmap Watermark finalRender(box2 0 0 1280 720)[0,0] type:#composite
display finalRender
finalRender.filename="C:\\Users\\Mattias\\Desktop\\Watermarked render.jpg"
save finalRender
the solution is probably something ridiculously easy, but I just can't seem to find it :S
i've already tried it with a .png image, so I don't think the file format is a problem
