Rendering Z-Depth

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Search this Thread 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
	freeSceneBitmaps()
 	
	-- setup zdepth
	mZDepth = Z_Depth()
	mZDepth.enabled = true
	mZDepth.zMin = 0.5
	mZDepth.zMax = 1.5
	mRenderManager = maxOps.GetCurRenderElementMgr() 
	mRenderManager.removeallrenderelements()
	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
	mRenderManager.removeallrenderelements()

	-- 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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 02:50 AM.


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