An alpha texture which eclipses things?

I hope you guys can help me with this one. So i have a character (frame exported as png image with transparency on):


Now what settings must i implement to achieve this?:


When i set an alpha texture for the eyes with this nodes:


the eyes disappear completely with back of character’s head visible.

How can i make the alpha to affect whole character like in the second screenshot (with shadows remained)?
I also want it to be in cycles render.

You could put the eyes on a different layer and set that layer to a mask in the render layers panel


Cube on layer 1 and the monkey head on layer 2

Hi,

what you want is a shadow catcher, which we don’t have (yet) in Cycles. To effectively cut out the rendered image, you need to assign a holdout shader to the object - but you won’t have the shadows. You can get them using the shadow pass on another renderlayer, like Richard said.

Thanks, Richard Marklew, i managed to do the same, but without shadows.

You mean that it’s possible to add the shadows separately? What is this shadow pass?

For the shadows, you can render the scene (or just the eyes using the render layers) with a complete white diffuse shader, and use the render as alpha.

Do you mean i have to add a diffuse shader to the node (i posted above)? With what am i supposed to connect that diffuse shader? Sorry, i’m a noob in those things.

here’s an example file: http://pasteall.org/blend/index.php?id=44116

two render layers, one for the solid surface and the other for the transparency. In the composite, I mixed the luminance from the second layer with the alpha from the first.


this is just an example, and other workflows are also possible.

A shadow pass is generated by cycles for each render, check under the menus in the image editor after a render is finished.

Ohhh:D it’s true!! Didn’t notice the change!!! :o

@Secrop
I did the same with my model with no effect.

  • eyes are alpha
  • there are no shadows on them
    Also:
  • is this plate in 3rd layer necessary?
  • is glossiness necessary?
  • my curve in compositing isn’t the same as yours, yet i set values the same.
    mine:

yours:

What image editor? I want pngs be saved automatically, there will be hundreds of frames, man.

Blender’s UV/Image Editor. Use the file output node (in the compositing context of the node editor) to save the shadow pass as separate pngs, then mix them (also in the compositor) on top of your regular render frames.

As for the curve, it seems you just need to invert the endpoints’ values.

Sorry, but i understand very little from what you are explaining to me. I’ve found this video:

Maybe i’ll try it.

Tell me what you don’t understand, I will explain more in detail. Do you know how to use the compositor ? The video you linked uses Blender Internal, it’s not really reproducible with Cycles unfortunately.