Wahooney
09-05-2006, 11:36 AM
Hey guys,
I'm hoping someone can help me on this.
I'm busy writing a script that will rely on the Render To Texture capabilities of max but I've discovered that there is little to no documentation on the subject in the manual, except for the Bake Elements section. I tried reverse engeneering the Render to Texture dialog and discovered how you actually render to a texture, but when I do it gives me an "Error creating bitmap" message.
Here is my sample code:
(
local obj = geosphere()
obj.material = standard()
-- Bake Material
local bm = bitmap 256 256 filename:"C:\bitmap.png"
local be = diffuseMap()
local bi = obj.INodeBakeProperties
bi.bakeChannel = 1
bi.addBakeElement be
select obj
render rendertype:#bakeSelected frame:slidertime to:bm vfb:on
display bm
-- Bake Material End
)
Any and all help will be appreciated guys, thanks.
I'm hoping someone can help me on this.
I'm busy writing a script that will rely on the Render To Texture capabilities of max but I've discovered that there is little to no documentation on the subject in the manual, except for the Bake Elements section. I tried reverse engeneering the Render to Texture dialog and discovered how you actually render to a texture, but when I do it gives me an "Error creating bitmap" message.
Here is my sample code:
(
local obj = geosphere()
obj.material = standard()
-- Bake Material
local bm = bitmap 256 256 filename:"C:\bitmap.png"
local be = diffuseMap()
local bi = obj.INodeBakeProperties
bi.bakeChannel = 1
bi.addBakeElement be
select obj
render rendertype:#bakeSelected frame:slidertime to:bm vfb:on
display bm
-- Bake Material End
)
Any and all help will be appreciated guys, thanks.
