Any way to cut out alpha in shading precisely

Hey guys!
I am looking for a solution to cut out an alpha precisly in the shading editor of an object. I am currently using a gradiant map connected to an empty, to animate an alpha cut out. I would love to cut out the alpha with a cube shape, or even better, with the geometry of a second object ( like a boolean, but without the boolean operation). ( Only other way i know of would be to blend in a texture/alpha).
Is it possible in blender ? Thanks for your help!

Welcome :tada:…

You may have to elaborate this to get a more suited answer.

I think with alpha cutout you mean making some part of an object complete transparent instead of using a boolean ? If the alpha is pure transparent/non-transparent then it is a yes/no mask… if not a simple treshhold compare will give a boolean answer… and why animate ??

Hey Okidoki , thanks for your answer!
Yes, thats what i mean :slight_smile: I have an object, where i want to cut out a cube shape of an object, so that I can look inside of it. If i can animate the cut out, even better.
Currently I control the cut out through a empty, connected to a gradiant, color ramp and then the alpha, which is fine for a lot of things, but i cant define the shape properly

Preferably without a texture, because a lot of my objects dont have a Uv/ only a simple material

Ahhh… now i understand… hmm… but… is this “nothign more” than a comparison of the empty position in al firections ± cube size to determine if the alpha should be 0 or 1… ??

I think it is, the problem is, it always works over the distance of the origin of the empty, which isnt able to create a cube or quadratic shape. The options of the gradiant map feel rather unprecise. This is usually the set up I am using right now, and i want to get the shape in green, without a uv based texture :thinking:

Since you want the locationof the empty… as controlling coordinates and you can’t get another object location into the shader directly… i used drivers… and some math…


2 Likes

Great, thanks a lot okidoki! i am not super familiar with drivers, but i will give it a go and try out your nodetree :)!

Very simple… right click the values you want to “drive”… and add some “code”… :wink:

2 Likes

@Okidoki
Maybe i miss something.
I’ve set the ControlXYZ values to 0 and used the empty in the Texture Coordinate Node as the object. I don’t need drivers.
Does this method produce an error later on or why do you use drivers?

The drivers are needed for getting the position of the empty…

…in your initial version you got the object texture coordinates of the empty… IDK how this helps…

I’m not the OP.

So there would be the potential error of moving the whole texture with the empty, if you take the empties texture coordinates for the rest of the material too.
Adding a second texture coordinate for the rest of the material could solve this problem. Unless i’m mistaken.
The driver solution is probably the better one.

Thank you. I actually didn’t see this potential error.

1 Like

Ahh yes… my fault… :cold_sweat: