Z-Depth

Started by sk8ape, April 15, 2009, 07:28:14 PM

Previous topic - Next topic

sk8ape

Hey all
  I'm almost done fully incorporating Terragen in to our company pipeline. But I have another question, being that I'm so new to this package.

  How to use or plug the distance node to get a Z-Depth render for use in comp. So far I've placed it between the Altocumulus node and the Planet Node, I also plugged the camera in to the distance shader, but so far I get a black frame.

  To be more specific, I just rendering clouds out of TG2 with an alpha channel, but I need the black and white graded Z-Depth pass render to achieve different effects in comp.

Thank for the help.

Oshyan

There's a tutorial on doing exactly this, I think: http://nwda.webnode.com/news/creating-a-dof-in-tg2/

- Oshyan

JimB

#2
That works for terrains, but I don't think clouds. There is a way that doesn't involve true Z-Depth, but should be good for most comp'ing purposes:

Switch off all shadows, GI, raytracing for anything and everything, and anything else that'll slow down your render, etc, without affecting quality in a greyscale depth pass.

Go to the Atmosphere and click on the Tweaks tab. Make the Ambient colour white. Go to your Sun and switch it off completely, and the same for any other lights. Switch off your environment lighting as well. You should see a difference straight away. By playing with the Atmosphere's Height Control and Density sliders you should get a result you're after (very low density coupled with very high exponential height). I also prefer to use only Haze or Bluesky (the former usually), so I take one or the other down to zero.

You can save all of that as a TGC if you want, to use on other setups and projects.
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

Tangled-Universe

Quote from: JimB on April 16, 2009, 07:02:36 AM
That works for terrains, but I don't think clouds. There is a way that doesn't involve true Z-Depth, but should be good for most comp'ing purposes:

Switch off all shadows, GI, raytracing for anything and everything, and anything else that'll slow down your render, etc, without affecting quality in a greyscale depth pass.

Go to the Atmosphere and click on the Tweaks tab. Make the Ambient colour white. Go to your Sun and switch it off completely, and the same for any other lights. Switch off your environment lighting as well. You should see a difference straight away. By playing with the Atmosphere's Height Control and Density sliders you should get a result you're after (very low density coupled with very high exponential height). I also prefer to use only Haze or Bluesky (the former usually), so I take one or the other down to zero.

You can save all of that as a TGC if you want, to use on other setups and projects.

Thanks for pointing out to my tutorial Oshyan.

Also thanks for sharing this idea Jim, haven't thought about that this way!
However, I have a question/remark. How are the chances you really need a DOF for the sky? I mean: you apply a DOF to the foreground, which will keep the entire atmo sharp, since it's distance is greater than the DOF. Also accounts for the other way around. Applying a DOF to the background would blur out the entire atmosphere.
I probably do miss something/an application here :)

Martin

Hetzen

#4
You could use it to allow comp'd objects to pass through the clouds for example, or to add colour corection into the distance. There's a multitude of things you can use z-depth for, but because of the anti-aliasing restrictions of the format, you need to blur the new mask created somewhat to get softer edges with the cutoff points. Clouds would be very forgiving in this.

JimB

#5
Hetzen's got it. The only time you'd need to change AA settings would be if the beauty pass had blooming set to on, but even there I'm not so sure if it would be necessary. You definitely shouldn't need to apply blurs, etc, so long as it's the same scene being rendered. You can also render RGB ID channels in one pass. This means the ambient colour of the clouds could be blue, the terrain's green(as an example), and another unique element (grass perhaps, or water, or objects...) red. When taken into Shake or Fusion or whatever, even Photoshop for stills, each channel could be separated to create a white mask for each part of the render from a single pass. I'd say the atmos/z-depth should still be a separate pass to keep it neat and tidy.

The pseudo-zdepth could also be used to dial in another render by a percentage. For example, you like the lighting and atmospheric density nearer the camera, but need to mix it with a different look for the distance (rarely, but it could most feasibly be needed). The pseudo-zdepth pass would allow you to do that and alter the distances of the mix by regrading the zdepth pass and using it as a mask.

There are actually loads of things TG2 can do, but just no automated way and you need to step back ten years (the good old days  ;))... for now anyway.
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.