scriptingrenderingalpha3dsmax3ds

Render the alpha channel into an RGBA .jpg file with 3ds Max and maxscript


I have simple script where I render an object with the following command:

Render camera: $Camera001 outputfile: "test.jpg" outputsize:[1920,1080] vfb:off outputHDRbitmap: true 

However, the output file is 24 Bit RGB, I wonder if there is a possibility to render RGBA with the same command or another method with the some simplicity?

I could only find solutions with bitmaps that went over my head.


Solution

  • I would suggest to use PNG with alpha instead of JPG.

    The command is totally correct, however as a preparation step you may also need to access PNG settings with maxscript, as you normally do with this PNG configuration dialog:

    PNG settings 3ds max

    pngio.setType #true48
    pngio.setAlpha true
    pngio.setInterlaced false
    

    Complete documentation for pngio you may find here: https://help.autodesk.com/...F08AA370DEB8_htm