Notifications
Clear all
[Closed] Padding setting in render to texture not saved
Mar 23, 2011 10:11 am
Hi…people
I am pretty new to script. Recently I was asked to do a render to texture tool for my work
All it does is that it will render lightmaps from all the models in a scene.
It seems to work until I noticed that even though I set the nDilation values. It doesnt seems to save in the output file. And I looked at other people’s example . I am pretty sure it is almost the same as what I have done. But the padding setting just don’t seem to be rendered or saved in the output file. Here is the code. Can anyone please help me with this problem…Please let me know where I did wrong or a direction where I should be looking…
thanks
function createLightMap objArr OutputSizeInt =(
for i = 1 to objArr.count do(
local filename = (originalMesh[i].name+"Lightingmap"+outFileType) --Use original mesh's name for file name not duplicate
local outFullPath= outFilePath +"\\"+ filename
-- This is setting up light map parameters --
local LM = lightingMap()
LM.enabled=true -- Allows baking
LM.outputSzX = OutputSizeInt
LM.outputSzY = OutputSizeInt
LM.filterON =true
LM.fileType = outFileType
LM.fileName = outFullPath
RTT_data.FileOutput_FilePath= outFilePath
a=objArr[i]
a.INodebakeProperties
a.INodeBakeProperties
a.removeAllBakeElements()
a.bakeEnabled = true
a.nDilations = 6
a.bakeChannel = 1
a.addBakeElement LM
select a
-- Render --
local z = render renderType:#bakeSelected vfb:off outputwidth:OutputSizeInt outputheight:OutputSizeInt outputfile:outFullPath disableBitmapProxies:true
-- Clean up --
a.removeAllBakeElements()
a.enabled=false
display z
)
)
1 Reply