Author Topic: How to use Zdepth in Cinema4d?  (Read 2707 times)

2020-01-20, 17:56:24

TeoRossi93

  • Active Users
  • **
  • Posts: 127
    • View Profile
Hey guys, I can't figure out how to setup zdepth pass correctly and i can't find documentation about it.
I have my zdepth pass in the multipass tab, I set the minimum and maximum z depth according to my camera settings but I do get complete black zdepth pass.
Any quick tutorial on how to set this up correctly?
Matteo Rossi 3D - https://www.teorossi.it/

2020-01-20, 18:09:29
Reply #1

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile

2020-01-20, 21:05:50
Reply #2

TeoRossi93

  • Active Users
  • **
  • Posts: 127
    • View Profile
Can you post a screenshot of your setup?
I've managed to make it work, I put some random parameters on the zdepth pass channel. I still have to understand how to approach it properly.
Matteo Rossi 3D - https://www.teorossi.it/

2020-01-20, 21:15:29
Reply #3

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5460
    • View Profile
At a guess, those numbers aren't random :) 0 being the near point (black) and 20cm being the far point (white) seems like reasonable values for a small scale scene. If you lower the Max Z, more of the watch will get brighter (the far point for pure white gets closer, things don't need to be so far away to reach full white).

Those numbers always depend on the scale of the scene - a watch, a living room, a street, will all need different min and max values based on their scale. Out of interest, what were those values when it wasn't working?

Thanks!
Tom Grimes | chaos-corona.com
Product Manager | contact us

2020-01-20, 21:27:44
Reply #4

TeoRossi93

  • Active Users
  • **
  • Posts: 127
    • View Profile
At a guess, those numbers aren't random :) 0 being the near point (black) and 20cm being the far point (white) seems like reasonable values for a small scale scene. If you lower the Max Z, more of the watch will get brighter (the far point for pure white gets closer, things don't need to be so far away to reach full white).

Those numbers always depend on the scale of the scene - a watch, a living room, a street, will all need different min and max values based on their scale. Out of interest, what were those values when it wasn't working?

Thanks!
I thought that those values were somehow linked to the camera parameters (DOF Map front and rear blur) :)
Matteo Rossi 3D - https://www.teorossi.it/

2020-01-20, 21:32:41
Reply #5

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5460
    • View Profile
I got my blacks and whites mixed up in the previous post :)

If you set them to use Camera Clipping rather than typing in values, you should see those fields get populated. From a quick test, then the Max Z will be derived from the farthest object visible on screen (you'll be able to see the value there, even though it's greyed out and can't be overwritten). Would be interesting to see what value you were getting - was there perhaps some other object other than the watch in there, maybe a background card, ground plane, a light, something like that?

EDIT - looks like having a C4D Background object could affect it too
Tom Grimes | chaos-corona.com
Product Manager | contact us

2020-01-21, 11:15:21
Reply #6

TeoRossi93

  • Active Users
  • **
  • Posts: 127
    • View Profile
I got my blacks and whites mixed up in the previous post :)

If you set them to use Camera Clipping rather than typing in values, you should see those fields get populated. From a quick test, then the Max Z will be derived from the farthest object visible on screen (you'll be able to see the value there, even though it's greyed out and can't be overwritten). Would be interesting to see what value you were getting - was there perhaps some other object other than the watch in there, maybe a background card, ground plane, a light, something like that?

EDIT - looks like having a C4D Background object could affect it too

Interesting, with clipping the zdepth pass is perfectly linked to the camera; I will do some tests later
Btw only watch in the scene (and lights of course), no background, bounce cards or other stuff.
Matteo Rossi 3D - https://www.teorossi.it/