I have a scene with a texture connected to an Output modifier then connected to the Diffuse slot of a material (CoronaMtl).
I need to loop thru multiple textures inside a folder, assign them to the material (which is assigned to an object), render it, and save the image.
Everything is working, but the Output modifier that I just can't understand how to apply. My current script already search for the files, creates the array, apply the texture to the right material, render and saves, but, without the Output adjustments, it's all pointless.
Anybody can shine a light on it?
Here's my material: https://i.stack.imgur.com/AZe1r.png
And here's the script so far:
carMake = "Chevy" -- Case Sensitive
liveriesFiles = "C:\\Path\\PaintSchemes\\" + carMake as string + "\\PAINT_*_PRIMARY.png"
glossFiles = "C:\\Path\\PaintSchemes\\" + carMake as string + "\\PAINT_*_PRIMARY_MAT_ID.png"
liveries = getFiles liveriesFiles
gloss = getFiles glossFiles
for livery in liveries do (
sceneMaterials["CHEVY"].texmapDiffuse = Bitmaptexture fileName: livery
index = findItem liveries livery
sceneMaterials["CHEVY"].texmapReflectGlossiness = Bitmaptexture fileName: gloss[index]
CoronaRenderer.CoronaFp.showvfb true
actionMan.executeAction 0 "50031" -- Render
splitString = filterString livery "\ ."
elementName = replace splitString[12] 1 6 ""
savePath = "C:\\Path\\PaintSchemes\\" + carMake as string + "\\renders\\" + elementName as string + ".png"
CoronaRenderer.CoronaFp.saveAllElements savePath
)