Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Can render() include camera shader?
  RSS 2.0 ATOM  

Can render() include camera shader?
Rate this thread
 
64192
 
Permlink of this thread  
avatar
  • BG4WCE
  • Posted: 06 February 2012 02:45 AM
  • Total Posts: 2
  • Joined: 04 November 2011 07: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"
bitmap 640 480 filename:rendOutputFilename numframes:1 gamma:0.40 pixelAspect:1
TIF
.setType #color
TIF.setAlpha 1
render camera
:cameraObject frame:i tob vfb:off
save b
close b


Replies: 0
avatar
  • BG4WCE
  • Posted: 08 February 2012 09:29 PM

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"
bitmap 640 480 filename:rendOutputFilename numframes:1 gamma:0.40 pixelAspect:1
TIF
.setType #color
TIF.setAlpha 1
render camera
:cameraObject frame:i tob 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


Replies: 0