Jump to content
Sign in to follow this  

Z-depth vith alpha

Recommended Posts

Hello I dont understand one thing. I need to do a fog for my underwater scene, so I thing best solution will be use Z-dept with post to do fog in realtime, right? But If I have a model with alpha, Zdepth is alpha too. If I use fog COP works fine but where is alpha, should be white, for infinity. Now fog COP foggy only my model not clear surround with white. Sorry for that Im not familiar so good with COPs even with POST. So my idea is. Separate Zdepth channel, add to white for full alpha places and then use this full Zdepth map again. Is that right or I miss something. Or use some shader during rendering? Uniform or Z-depth Fog? (I have no idea how to connect it. I create shaders in shop and the only thing I could do is connect as material to object. I try to use Light template but I dont now how does it works.In help I cant find some example or quick setup) I think POST is always better. Right? Thanks a lot for your answers.

Share this post

Link to post
Share on other sites

In the mantra node, Properties>Output, at the bottom add a Pz image plane. You are not restricted to rgb+a channels but can add as many as you want. You can also add your own vex variable and output that if you want.

You may not see anything in your channel because your z values are 32 bit floats and may not be in the 0-1 range. You can check if anything is in the channel at all by using mplayer's histogram. In post you can then use the depth of field node where you scale and fit everything into a good range. That will be visible in the M channel. Or, as a quicker and dirtier way, equalize the Pz channel and change the gamma.



Edited by Macha

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this