Shading Depth render for smoke/clouds
7377 10 1- wooyangkim
- Member
- 14 posts
- Joined: April 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!
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!
- RamaKrishna
- Member
- 35 posts
- Joined: Oct. 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.
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.
- wooyangkim
- Member
- 14 posts
- Joined: April 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 - June 13, 2019 16:13:02
- wooyangkim
- Member
- 14 posts
- Joined: April 2017
- Offline
- jsmack
- Member
- 8041 posts
- Joined: Sept. 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.
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.
- wooyangkim
- Member
- 14 posts
- Joined: April 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.
- jsmack
- Member
- 8041 posts
- Joined: Sept. 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.
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.
- Ivan L
- Member
- 200 posts
- Joined: Jan. 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
It samples the front voxel only as far as I know
Edited by Ivan L - June 13, 2019 19:03:35
I contribute to the beauty of this world
https://houdininotes.ivanlarinin.com/ [houdininotes.ivanlarinin.com]
https://houdininotes.ivanlarinin.com/ [houdininotes.ivanlarinin.com]
- wooyangkim
- Member
- 14 posts
- Joined: April 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 - June 13, 2019 19:10:14
- wooyangkim
- Member
- 14 posts
- Joined: April 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]
Helpful video for anyone who's trying to do this as well: https://vimeo.com/246591777 [vimeo.com]
Edited by wooyangkim - June 13, 2019 20:56:59
- petr.chel
- Member
- 5 posts
- Joined: Nov. 2021
- Offline
-
- Quick Links