Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] General Discussion => Topic started by: kmwhitt on 2019-07-09, 17:59:01

Title: Creating displacement map using ZDepth
Post by: kmwhitt on 2019-07-09, 17:59:01
I'm attempting to create a displacement map using the ZDepth pass.  For some reason the entire ZDepth pass is not rendered - see attached result.  What am I doing wrong?  Thanks!
Title: Re: Creating displacement map using ZDepth
Post by: TomG on 2019-07-09, 18:04:49
I am not sure that would work - since the zdepth is distance from the camera, the edges of image will be at a different distance than the center of the image, and since you'd have to set a really small difference between near and far for something like bricks, then you would likely get what we see here - it would work in the center of the image, but out at the edges, since the distance is significantly different to those points (given the small range of the distance map settings required), they'd show up as all black and all white depending on settings for near and far.
Title: Re: Creating displacement map using ZDepth
Post by: kmwhitt on 2019-07-09, 18:19:27
Hi Tom.  Thanks for the quick reply.  You may well be right.  I have tried other camera types to no avail - even super telephoto.  This is a technique I was able to use with Vray before making the switch to Corona.  I wonder if it's possible with C4D's native renderer.  If anyone has any ideas on how to create a displacement map of roof shingles, I would be greatly appreciative.  I have Substance Designer, but not too proficient at it...
Title: Re: Creating displacement map using ZDepth
Post by: lollolo on 2019-07-09, 18:23:34
It is possible. Change the projection of the camera to Parallel Projection.

It worked pretty well in my case.

Edit: I used the same technique for a test a few month ago. See below.
Title: Re: Creating displacement map using ZDepth
Post by: kmwhitt on 2019-07-09, 18:46:14
That worked great.  Thanks for the help!