[Closed] Baking Texture Issue
I am trying to bake materials and cant seem to get it to work.
In this instance I want a diffuse map only with no lighting or shadows and with padding of 20.
I get render with lighting and no padding. I have looked over all RTT posts here and cannot see if anyone has had this work succesfully.
Here is the script
fn mapbake obj Rsize outputDir =
(
bitm = bitmap Rsize Rsize
bakeMap = diffusemap()
bakeMap.outputSzX = Rsize
bakeMap.outputSzY = Rsize
bakeMap.fileType = ".tga"
bakeMap.shadowsOn =off
bakeMap.lightingon = off
bakeMap.targetMapSlotName = "Diffuse"
bakeMap.enabled = true
obj.INodeBakeProperties.addBakeElement bakeMap
obj.INodeBakeProperties.bakeEnabled = on
obj.INodeBakeProperties.flags = 1
obj.INodeBakeProperties.bakeChannel = 1
obj.INodeBakeProperties.nDilations = 20
render rendertype:#bakeSelected vfb:on outputFile:(outputDir+obj.name+".tga") outputSize:[Rsize,Rsize] to:bitm
obj.iNodeBakeProperties.removeAllBakeElements()
)
sp = Sphere radius:35 mapcoords:on transform:(matrix3 [1,0,0] [0,0,1] [0,-1,0] [0,0,0]) isSelected:on
sp.material = standardmaterial()
mapbake sp 512 "c:\\"
when calling bakeMap, do you need to specify a filename as well instead of just C:\?
but with that method your saving a bitmap from the render buffer, which is not the difusse element made by the render to texture, that is like the All-element bitmap.
render rendertype:#bakeSelected vfb:on outputFile:(outputDir+obj.name+”.tga”) outputSize:[Rsize,Rsize] to:bitm
Yes, indeed. This will save out something that is equivalent to a CompleteMap. :\
– MartinB