[Closed] How do I Script – Specifying Gamma Output when Saving Rendered Thumbnails
Im troubleshooting an asset collector script.
Everything works perfectly, but for some reason, although the thumbnails are getting rendered at a 1.8 gamma (which is correct for our studio), the script saves them darker (Im guessing at a 1.0 gamma)
How can I specify in the script to save the image with an override gamma of 1.8?
(Id prefer to specify the gamma rather than relying on “system default gamma” (although system default is 1.8) – Just to be sure!)
Thanks!
The first thing to check would be the “Bitmap Output Gamma” in the Gamma & LUT preferences.
Then for some Maxscript related issues check this thread: http://forums.cgsociety.org/showthread.php?f=98&t=654587&highlight=gamma
Apparently MaxScript ignores your gamma settings when loading images into it’s controls.
Marco:
My Input/Output in Gamma & LUT is set to 1.8
Thanks for the link – i was reading it earlier. Isn’t it directly refering to gamma adjusting thumbnails that are used as image buttons in max interface/ui?
My trouble is just with saving them directly to an image format with the correct gamma.
If i render the scene through the Render Setup (F9) the whole thing works fine, VFB shows 1.8 gamma and saving the image as system default gamma saves at 1.8.
However, the script uses “render camera” and the only workaround that I could find was to do render camera and use the “to:” to send it to a parameter definition that has a gamma set darker than i need.
The thumb renders darker now, but then, when the image saves, its similar to what i get natively through Rendering with F9.
bm = bitmap 100 100 gamma:0.56 filename:(databaseRootPath + "_thumbs\\" + currObj.name + ".jpg")
render camera:newCam outputwidth:100 outputheight:100 vfb:on force2sided:on to:bm
save bm
close bm
But there has to be a cleaner way to solve this, shouldn’t there?
Does it make sense to explore changing the output value back down to 1.0 in the LUT?
Honestly I think your solution is as good as it’s gonna get. Seems like MaxScript has no interesting in considering the gamma values :shrug: