Notifications
Clear all
[Closed] Heavy Banding when baking Redshift Lightmaps via Maxscript
Apr 30, 2019 3:42 pm
So I’ve been writing a small script that renders lightmaps in Redshift for me, but I very quickly ran into an issue where when I save the files they have very heavy banding making them unusable.
I have to use the Redshift Renderer and this is my script so far
fileName = (getFilenameFile maxfilename)
select (for g in geometry where g.name == fileName collect g)
theObj = selection
select theObj
bakeProps = theObj[1].INodeBakeProperties
bakeProps.bakeChannel = 2
diff = RsDiffuseLightingRawBake()
bakeProps.addBakeElement diff
-- Lightmap Properties
diff.filetype = outputTexture = thePath+fileName+ "_lm" + ".tga"
targa.setcolordepth 32
diff.filename = filenameFromPath diff.filetype
diff.outputSzX = diff.outputSzY = 2048
diff.enabled = true
macros.run "Render" "BakeDialog"
renderBitmap = bitmap renderSize renderSize hdr:on
render rendertype:#bakeSelected vfb:false to:renderBitmap outputHDRbitmap:true
close renderBitmap
Now, the issue is this: If I let the script run through, I get very bad banding. Example here:
If I bake the texture with the UI it looks normal:
And this happens with both TGA and TIF, especially the former where I cannot even get a clear render by baking with the UI.
Would be great to get any more ideas here. I already tried changing to gamme but to no effect.