Notifications
Clear all

[Closed] Render depth WITHOUT Anti-aliasing?

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

5 Replies

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.

i need to do this via maxscript as i use the depthmap in the script and throw it away when done.

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

ok ill give that a shot

just a minor, but important, correction – “channels:zDepth” should be “channels:#(#zDepth”); see also the “Controlling the renderer” topic which details the render() call.