gtjuggler
12-03-2009, 05:36 PM
Hi all,
I have a script that renders a lightmap at 1024x1024 on channel 3. It works fine and renders to disk just like I ask it to but it doesnt seem to be paying attention to my map render choice. This line: beInstance=LightingMap() should dictate the map output type but I will always get the same output: A pre-multiplied lightmap + diffusemap , aka a CompleteMap. I'm beating my head against the wall here and have relinquished this to the community. Any help would be extremely appreciated!
Below is the renderLightmap function, and everything is basically hardcoded inside of the function (channel, size, maptype, etc) so this should be the only relevant code:
fn renderLightmap obj fullFileName virtualFrameBufferState =
(
obj.iNodeBakeProperties.removeAllBakeElements()
beInstance=LightingMap()
channel = 3;
Xsize = 1024;
Ysize = 1024;
fPath=getFilenamePath fullFileName
fName=getFilenameFile fullFileName
fType=getFilenameType fullFileName
beInstance.outputSzX=Xsize
beInstance.outputSzY=Ysize
beInstance.filename=fName
beInstance.fileType=fType
beInstance.filterOn = true
beInstance.shadowsOn = true
beInstance.directOn = true
beInstance.indirectOn = true
beInstance.enabled = true
obj.INodeBakeProperties.addBakeElement beInstance
obj.INodeBakeProperties.bakeChannel=channel
obj.INodeBakeProperties.bakeEnabled = true
select obj
render rendertype:#bakeSelected outputwidth:Xsize outputheight:Ysize outputfile:(fPath+fName+fType) progressBar:true vfb:virtualFrameBufferState
obj.INodeBakeProperties.removeAllBakeElements()
obj.INodeBakeProperties.bakeEnabled = false
format "rendering node:% channel:%\n" obj.name obj.INodeBakeProperties.bakeChannel
)
I have a script that renders a lightmap at 1024x1024 on channel 3. It works fine and renders to disk just like I ask it to but it doesnt seem to be paying attention to my map render choice. This line: beInstance=LightingMap() should dictate the map output type but I will always get the same output: A pre-multiplied lightmap + diffusemap , aka a CompleteMap. I'm beating my head against the wall here and have relinquished this to the community. Any help would be extremely appreciated!
Below is the renderLightmap function, and everything is basically hardcoded inside of the function (channel, size, maptype, etc) so this should be the only relevant code:
fn renderLightmap obj fullFileName virtualFrameBufferState =
(
obj.iNodeBakeProperties.removeAllBakeElements()
beInstance=LightingMap()
channel = 3;
Xsize = 1024;
Ysize = 1024;
fPath=getFilenamePath fullFileName
fName=getFilenameFile fullFileName
fType=getFilenameType fullFileName
beInstance.outputSzX=Xsize
beInstance.outputSzY=Ysize
beInstance.filename=fName
beInstance.fileType=fType
beInstance.filterOn = true
beInstance.shadowsOn = true
beInstance.directOn = true
beInstance.indirectOn = true
beInstance.enabled = true
obj.INodeBakeProperties.addBakeElement beInstance
obj.INodeBakeProperties.bakeChannel=channel
obj.INodeBakeProperties.bakeEnabled = true
select obj
render rendertype:#bakeSelected outputwidth:Xsize outputheight:Ysize outputfile:(fPath+fName+fType) progressBar:true vfb:virtualFrameBufferState
obj.INodeBakeProperties.removeAllBakeElements()
obj.INodeBakeProperties.bakeEnabled = false
format "rendering node:% channel:%\n" obj.name obj.INodeBakeProperties.bakeChannel
)
