Jump to content

Z-depth vith alpha


blackchicken

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.

Link to comment
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.

post-4013-129038027365_thumb.jpg

post-4013-129038028808_thumb.jpg

Edited by Macha
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...