Z Depth on a small scale

Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderators: ChrisHekman, aoktar

Post Reply
DJTravisty
Licensed Customer
Posts: 30
Joined: Mon Apr 17, 2017 6:34 pm

Is it possible to get better results with the z depth pass on small scale items? The 'enviroment depth' in the zdepth render AOV doesn't seem to do anything in the live viewer. Basically I'm trying to render out different passes to comp and create an image to be used with a CNC Router.

My workaround will probably be using a diffuse gradient texture in word space with white towards the camera and black far from the camera IF I cannot dial in the Zdepth
Attachments
Zdepth Pass.jpg
ack2v
Licensed Customer
Posts: 4
Joined: Wed Oct 26, 2022 8:05 am

Hi there,

we are having the same issue over here, with a similar workaround.

Wondering why Octane doesn't implement simple type-in values (or even pick objects) for Z-depth min and Z-depth max. Currently Z-depth min is always camera-dependent and in our case we want a perfectly white to black gradient on the object without having to workaround..

Any explanations?
User avatar
jobigoud
OctaneRender Team
Posts: 247
Joined: Sat Aug 15, 2015 1:28 pm

To get more customized AOV you can use a Global texture AOV with a utility texture or a custom shader.
In this case you could use the Z depth texture, it has a normalization range to map start and end values to [0..1] range. This will put black at the start (near) and white at the end (far) point, so you could plug that into an Invert texture node if you would rather have white near, then plug the output into a Global texture AOV.
To interactively find the right values you could temporarily use the auto-focus picker and check how it changed the focal depth, then put it back to its original value.

This will also change when you move the camera (like a Z depth with a min depth would) so if you really want something in world space maybe try playing with the Relative distance node into a global texture.
Attachments
zdepth.png
ShivaMist
Licensed Customer
Posts: 80
Joined: Thu Oct 11, 2018 5:07 pm
Location: Paris

jobigoud wrote:To get more customized AOV you can use a Global texture AOV with a utility texture or a custom shader.
In this case you could use the Z depth texture, it has a normalization range to map start and end values to [0..1] range. This will put black at the start (near) and white at the end (far) point, so you could plug that into an Invert texture node if you would rather have white near, then plug the output into a Global texture AOV.
To interactively find the right values you could temporarily use the auto-focus picker and check how it changed the focal depth, then put it back to its original value.

This will also change when you move the camera (like a Z depth with a min depth would) so if you really want something in world space maybe try playing with the Relative distance node into a global texture.
This is a "great" workaround. But does it have to be that complicated ? Instead of doing this manipulation per material, wouldn't it be more efficient to look into modifying the zdepth parameters and enable us to have an auto zdepth option?

It makes me think about the AOV fog setup, which is tedious to recreate but could be a real timesaver if implemented in an ergonomic manner.
ack2v
Licensed Customer
Posts: 4
Joined: Wed Oct 26, 2022 8:05 am

Hi,

thanks for the workaround, it works as expected and will be quite useful in the future. Nevertheless I fully agree with ShivaMist, it would be way easier to have those settings available when adding Zdepth AOV.

Thanks!!
Post Reply

Return to “Maxon Cinema 4D”