【发布时间】:2018-09-22 00:29:20
【问题描述】:
我有一个场景,其纹理连接到输出修改器,然后连接到材质的漫反射槽 (CoronaMtl)。
我需要遍历文件夹内的多个纹理,将它们分配给材质(分配给一个对象),渲染它,然后保存图像。
一切正常,但我无法理解如何应用的输出修饰符。我当前的脚本已经搜索文件、创建数组、将纹理应用到正确的材质、渲染和保存,但是,如果没有输出调整,这一切都毫无意义。
任何人都可以照亮它吗?
这是我的材料: https://i.stack.imgur.com/AZe1r.png
这是目前为止的脚本:
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
)
【问题讨论】: