Shading Depth render for smoke/clouds

   7346   10   1
User Avatar
Member
14 posts
Joined: 4月 2017
Offline
Hey guys,
I'm trying to render out a Zdepth pass for the clouds and hitting a wall of white spec noise.
Already tried setting up Volume step rate to 32 and upping the Volume quality.
Pixel to a bit higher (5) and it's not really giving me anything better.

1. Which settings will help me get smoother render for the Z depth pass?
2. More range(gradient) on this map would be great. Is there a min max setting like 3DS Max for the Zdepth pass? I just check on the Shading Depth on.

Help would be greatly appreciated!

Attachments:
Capture.JPG (113.7 KB)

User Avatar
Member
35 posts
Joined: 10月 2008
Offline
You should be using deep AOV for volume stuff. Default Z-depth works only for surfaces it seems (as far as I know).

Mantra>images>Deep output is going to write out deep images for you. You can change the .rat extension to .exr. So that
It can write out deep exr's. This going to produce huge file sizes. You can mentions compression on metadata tab to set
the compression quality to get the manageable file sizes.

There are special deep nodes in nuke to deal with deep images. These deep nodes are slow to process. So you better pre render any deep process as regular .exr's for faster feedback while comping in nuke.
User Avatar
Member
14 posts
Joined: 4月 2017
Offline
RamaKrishna
You should be using deep AOV for volume stuff. Default Z-depth works only for surfaces it seems (as far as I know).

Mantra>images>Deep output is going to write out deep images for you. You can change the .rat extension to .exr. So that
It can write out deep exr's. This going to produce huge file sizes. You can mentions compression on metadata tab to set
the compression quality to get the manageable file sizes.

There are special deep nodes in nuke to deal with deep images. These deep nodes are slow to process. So you better pre render any deep process as regular .exr's for faster feedback while comping in nuke.

Thank you for the response!
So I was able to render out a .EXR image using the Deep output as you said.
My goal right now is to pull out a Z-depth map and heightmap for these clouds to be used in game engine.
So far when I open the .exr file in Photoshop, it gives me the fully rendered image with alpha on it. How do I extract a z-depth map out of this .exr? Do I do this in Houdini somewhere?
Edited by wooyangkim - 2019年6月13日 16:13:02

Attachments:
Capture2.JPG (27.0 KB)

User Avatar
Member
14 posts
Joined: 4月 2017
Offline
Here's an example of a zdepth map I'm trying to get out from this cloud volume.

Attachments:
Capture4.JPG (26.8 KB)

User Avatar
Member
8038 posts
Joined: 9月 2011
Offline
If you want to do a fake ‘depthy’ gradient pass, you can create it in your shader.

You'll need to integrate it as if it were a color in the volume. Since it will be opacity filtered, it will be useless as actual depth, but it seems like you want it for some game engine thing.

In a shader, multiply a zero to one remapped depth (Pz) by the integral step (dPdz), and then export that as a custom channel.
User Avatar
Member
14 posts
Joined: 4月 2017
Offline
jsmack
If you want to do a fake ‘depthy’ gradient pass, you can create it in your shader.

You'll need to integrate it as if it were a color in the volume. Since it will be opacity filtered, it will be useless as actual depth, but it seems like you want it for some game engine thing.

In a shader, multiply a zero to one remapped depth (Pz) by the integral step (dPdz), and then export that as a custom channel.

Okay I'm a noob and probably don't know how to do the above but will take some time and give it a try.
I was able to export out a .exr map, and found out that After Effects can extract the Z Depth pass from it using the EXRtractor plugin(already comes installed AE). Trying that method now, but it gave me a lot of noise so I'm guessing if I improve my rendering quality, the Zdepth will also improve in quality as well. Will update how it goes.
User Avatar
Member
8038 posts
Joined: 9月 2011
Offline
I made an error in my post above. You can get a result that looks like the screen shot you posted by multiplying the remapped depth by the Opacity (Of) from your volume shader, and exporting that.

This approach is fairly noob friendly, as you simply add a few nodes to your existing material.

Connect the Pz global to a fit node. Then dial in the source min and max to the range of depths you want to consider (the white and black point of your resulting image). Then connect the output of the fit and the ‘Of’ output from the volume shader to a multiply node. Then connect the result to an bind export node and give it the desired name.
User Avatar
Member
200 posts
Joined: 1月 2014
Offline
or you can just switch to Mantra - Extra Image Planes - Sample Filter - Opacity Filtering to Closest Surface in your z aov settings
It samples the front voxel only as far as I know
Edited by Ivan L - 2019年6月13日 19:03:35
I contribute to the beauty of this world
https://houdininotes.ivanlarinin.com/ [houdininotes.ivanlarinin.com]
User Avatar
Member
14 posts
Joined: 4月 2017
Offline
jsmack
I made an error in my post above. You can get a result that looks like the screen shot you posted by multiplying the remapped depth by the Opacity (Of) from your volume shader, and exporting that.

This approach is fairly noob friendly, as you simply add a few nodes to your existing material.

Connect the Pz global to a fit node. Then dial in the source min and max to the range of depths you want to consider (the white and black point of your resulting image). Then connect the output of the fit and the ‘Of’ output from the volume shader to a multiply node. Then connect the result to an bind export node and give it the desired name.

Would it be possible for you to screenshot a shader node for me to follow? I just have the cloud material on this thing by default. I tried to look for Pz in the VEX Builder and had no luck. I'm probably going at this all wrong but I'm up for learning. It seems like I can't get rid of all those dots and can't get the gradients to have more range within themselves to get a better gradient with the EXRtractor at the moment. Plus I think your method will get the result I need with less time as it's just shader work.
Yes, I'm trying to use this depth map in game with a shader that supports heightmap/depthmap.
Edited by wooyangkim - 2019年6月13日 19:10:14

Attachments:
Capture5.JPG (71.7 KB)

User Avatar
Member
14 posts
Joined: 4月 2017
Offline
figuring it out little by little… can't seem to get the value just right but I think I'll edit in photoshop
Helpful video for anyone who's trying to do this as well: https://vimeo.com/246591777 [vimeo.com]
Edited by wooyangkim - 2019年6月13日 20:56:59

Attachments:
Capture6.JPG (75.9 KB)

User Avatar
Member
5 posts
Joined: 11月 2021
Offline
Maybe someone search real fix for z-chanel of volumetrics?
Method from previous post not worked.
Edited by petr.chel - 2021年11月8日 13:15:36

Attachments:
Скриншот 08-11-2021 150757.jpg (683.1 KB)
Скриншот 08-11-2021 150743.jpg (370.9 KB)

  • Quick Links