stuh505
04-05-2006, 01:29 AM
EDIT -- solved
I have a problem with render to texture...it renders the VFB fine but my bake element (a normals map) does not appear to be being rendered properly.
I would like to output into source but I do not see any "output to source" or param, so I am simply doing: be.targetMapSlotName = "Bump"
After rendering if I try to access the bitmap from the bake element directly:
($.INodeBakeProperties.getBakeElement 1).bitmap
-- Runtime error: Error opening bitmap: test.tga
Any help is gladly appreciated on this poorly documented issue, I am banging my head against the wall!
--setup the bake element
be = NormalsMap()
be.outputSzX=dim
be.outputSzY=dim
be.fileType="test.tga"
be.targetMapSlotName = "Bump"
be.filename = "test.tga"
be.useNormalBump = true
--add bake element
bi = base.INodeBakeProperties
bi.addBakeElement be
bi.bakeChannel=1
bi.bakeEnabled = true
--setup projection mod
base.INodeBakeProjProperties.BakeSubObjLevels = false
base.INodeBakeProjProperties.normalSpace = #tangent
base.INodeBakeProjProperties.projectionMod = (projection())
base.INodeBakeProjProperties.projectionMod.addObjectNode obj
--bake texture
select base
render rendertype:#bakeSelected outputwidth:dim outputheight:dim vfb:true
bi.removeAllBakeElements()
bi.bakeEnabled = false
I have a problem with render to texture...it renders the VFB fine but my bake element (a normals map) does not appear to be being rendered properly.
I would like to output into source but I do not see any "output to source" or param, so I am simply doing: be.targetMapSlotName = "Bump"
After rendering if I try to access the bitmap from the bake element directly:
($.INodeBakeProperties.getBakeElement 1).bitmap
-- Runtime error: Error opening bitmap: test.tga
Any help is gladly appreciated on this poorly documented issue, I am banging my head against the wall!
--setup the bake element
be = NormalsMap()
be.outputSzX=dim
be.outputSzY=dim
be.fileType="test.tga"
be.targetMapSlotName = "Bump"
be.filename = "test.tga"
be.useNormalBump = true
--add bake element
bi = base.INodeBakeProperties
bi.addBakeElement be
bi.bakeChannel=1
bi.bakeEnabled = true
--setup projection mod
base.INodeBakeProjProperties.BakeSubObjLevels = false
base.INodeBakeProjProperties.normalSpace = #tangent
base.INodeBakeProjProperties.projectionMod = (projection())
base.INodeBakeProjProperties.projectionMod.addObjectNode obj
--bake texture
select base
render rendertype:#bakeSelected outputwidth:dim outputheight:dim vfb:true
bi.removeAllBakeElements()
bi.bakeEnabled = false
