Rendering Z-Depth

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  01 January 2009
Rendering Z-Depth

Im trying to render z-depth with a custom near and far range for my script, however I dont seem to be able to get it to work with my custom depth ranges...

	-- paths stuff
	mPath = scriptspath + "cam_depth.tga"
	deleteFile mPath
	tgaio.setColorDepth 24 --set to 24bit output!	
	-- output bitmap
	mSize = 256
	-- setup zdepth
	mZDepth = Z_Depth()
	mZDepth.enabled = true
	mZDepth.zMin = 0.5
	mZDepth.zMax = 1.5
	mRenderManager = maxOps.GetCurRenderElementMgr() 
	mRenderManager.AddRenderElement mZDepth 
	-- render
	mRender = render camera:mRenderCam shadows:false renderhiddenobjects:false mapping:false rendertype:#normal channels:#(#zDepth) useRadiosity:false outputSize:[mSize,mSize] vfb:false superblack:true antiAliasing:false progressbar:true quiet:true 	

	-- disable this after render

	-- mooch the depth
	mDepthMap = getchannelasmask mRender #zdepth
	-- open the rendered out bitmap!
	display mDepthMap

  01 January 2009
ok this has something to do with the manual clip on my camera... all solved

  01 January 2009
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 03:41 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.