How to save a bitmap as 16-bit in Maxscript? -
i want read out z-buffer of camera, , render image.
i achieve following code:
--place z camera z_cam = freecamera name: "depth" position:[0.0,0.0,50.0] rotation: (eulertoquat (eulerangles 0 0 0)) z_name = "mybitmap.png" --get z buffer rbmp = render outputsize:[512,424] channels:#(#zdepth) vfb:off camera: z_cam z_d = getchannelasmask rbmp #zdepth outputfile:z_name z_d.filename = z_name save z_d close z_d
however, save image 24-bit png, 3 channels (8 bit each channel). wish save grayscale image, use 16-bit pixel representation. how can achieve max-script?
did try calling pngio.settype #gray16
beforehands?
alternatively, save exr zdepth channel , use that.
Comments
Post a Comment