|
I am using mental ray renderer. To my knowledge, there are two ways to excute render from Max Script. One is
render()
the other one is
max quick render
I noticed that when I use render(), my setup for camera shaders/Lens/Distortion doesn’t work. I think render() command did not include the camera shader. Is there a way to solve this problem?
Here is my Max Script code:
renderers.current = mental_ray_renderer() renderers.current.Enable_Camera_Lens_Shader = true
distMap = Distortion() distMap.Barrel = true
distMap.Pin_Cushion = false
distMap.amount = 1.8
renderscenedialog.update()
rendOutputFilename=outputdir+"\\"+fileName+".tif" b = bitmap 640 480 filename:rendOutputFilename numframes:1 gamma:0.40 pixelAspect:1
TIF.setType #color TIF.setAlpha 1
render camera:cameraObject frame:i to: b vfb:off
save b
close b
|
|
|
BG4WCE 06 February 2012 02:45 AM
I am using mental ray renderer. To my knowledge, there are two ways to excute render from Max Script. One is
render()
the other one is
max quick render
I noticed that when I use render(), my setup for camera shaders/Lens/Distortion doesn’t work. I think render() command did not include the camera shader. Is there a way to solve this problem?
Here is my Max Script code:
renderers.current = mental_ray_renderer() renderers.current.Enable_Camera_Lens_Shader = true
distMap = Distortion() distMap.Barrel = true
distMap.Pin_Cushion = false
distMap.amount = 1.8
renderscenedialog.update()
rendOutputFilename=outputdir+"\\"+fileName+".tif" b = bitmap 640 480 filename:rendOutputFilename numframes:1 gamma:0.40 pixelAspect:1
TIF.setType #color TIF.setAlpha 1
render camera:cameraObject frame:i to: b vfb:off
save b
close b
Sorry. The above code is almost correct, and render() does include the camera shader. I just forgot the following line.
renderers.current.Camera_Lens_Shader = distMap
|
|
|