View Full Version : Render depth WITHOUT Anti-aliasing?

02 February 2009, 12:00 AM
Im trying to render out depth with no AA but i cannot get it to work!

render camera:mCamera vfb:false renderElementBitmaps:&mRenderMaps renderMultiPassEffects:true renderElements:true shadows:false renderhiddenobjects:false useRadiosity:false outputSize:[mSize,mSize] progressbar:false quiet:true mapping:false force2sided:true autoReflect:false renderhiddenobjects:false renderatmosphericeffects:false --antialiasing:false

If i uncomment antialiasing:false i get a blank depth map :(

02 February 2009, 02:06 AM
just grab the z-buffer data (gbuffers) then?

if you don't need to do this programmatically, have a peek at the File Output render effect - that can write Z-Depth out to a greyscale image.

02 February 2009, 02:55 AM
i need to do this via maxscript as i use the depthmap in the script and throw it away when done.

02 February 2009, 03:48 AM
alright.. add "channels:#(#zDepth)" to your render() call. Take the result of that render call, and use getChannelAsMask or getChannel functions to get the z-depth values out of the z-depth g-buffer; that should certainly do the trick.

Still odd that the scanline renderer simply outputs null data when anti-aliasing is off, though

02 February 2009, 05:48 AM
ok ill give that a shot :)

02 February 2009, 02:33 PM
just a minor, but important, correction - "channels:zDepth" should be "channels:#(#zDepth"); see also the "Controlling the renderer" topic which details the render() call.

CGTalk Moderation
02 February 2009, 02:33 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.