Announcement

Collapse
No announcement yet.

alpha doesn't affect Z-depth - problems & solutions?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • alpha doesn't affect Z-depth - problems & solutions?

    Is there any way to have the alpha of a material affect the Z-depth?
    This causes problems when applying depth of field, as the alpha is ignored, and parts of the face which should be ignored via the alpha aren't.

    To explain:

    rgb:


    alpha:


    z-depth:


    problem:


    The alpha information is discarded in the z-depth channel. Is there a way around this? I've look on the threads about "tool to convert opacity mapped faces into geometry" but don't think that this works by tracing the alpha channel and converting that face into the shape of the alpha. This would be really handy, but is there a way to have "alpha affects z-depth"?

  • #2
    You're right about the opacity map convertor that it doesnt trace alphas. Another way to do the z depth is to make everything black in the scene and use a fog effect that goes from black to white - you can use the environment ranges of the max camera to tell it where to start and end. Neil blevins has written a blurscript called atm pass that does this.

    Comment


    • #3
      you put yourself in a hell of a proposition: i think the quickest way is the one Jo described.
      On the other hand, there are more extended channels you might wish to try out and hand combine in combustion to get the proper effect.
      For instance, a multiply of the alpha (or rendernodeID) of the plant times the Z buffer would give you the Z with the opacity taken into account.
      But you'd have first to have saved a rendernodeID channell, or different passes for various bits, to be able to do this without hand masking.
      And this is a simple scene, with hundreds of overlapping leaves, you might be in real trouble

      Prolly easier to use the blurscript.

      Lele

      Comment


      • #4
        this may sound dumb but in some situations where I've run into the same problem I've actually put vray displacement on the object at a very low amount and then used the "water level" to clip out the stuff I didn't want. that way it trims out all the geometry that is transparent.

        It worked for what I needed.

        V Miller

        Comment


        • #5
          Thanks for all your replys. As usual, i'm trying to find the way that involves the least amount of effort to get around this.


          I've actually put vray displacement on the object at a very low amount and then used the "water level" to clip out the stuff I didn't want. that way it trims out all the geometry that is transparent.
          this sounds quite promising - could you explain a little more about the process? I am trying to find the most automated way possible to save time.


          Thanks for pointing out the other methods - i've downloaded the blur back and will begin looking at this as an option. I was hoping there was a hidden option i didn't know about - similar to "affect alpha" in the material settings, but for the z-depth channel.

          (Wishlists?)

          Comment


          • #6
            you basically use the alpha of the bitmap you are using for the texture on the leaf (the leaf shape) and put that in the slot in the vray displacement rollout. then you give it a slight value for displacement amount and then you use water level to clip somewhere below that amount.

            this technique will slow down your renders and I don't recommend it if you have lots of plants to do this way.

            if you do, going the approach of rendering a fog pass would be your best bet.

            Vance Miller

            Comment

            Working...
            X