2
$\begingroup$

I want to get this material that works similar to the Layer weight shader, but I can't get the effect I want.

I want to have a plane that is largely transparent with emission boundaries. I have attached a diagram that shows the basic idea, along with a basic idea of what shader basis I have going. This material needs to work well with a non-square plane. The sphere needs to be able to be stretched/manipulated to fit any shape, even if that means one side of the ellipse is wider than the other side.

PS I'm using EVEE. alpha

$\endgroup$
2
7
$\begingroup$

Some function of (distance from object origin) will give you a circle to do what you want with.. here, using a Map Range to soften the mask, which is plugged into the alpha-channel of an emissive material. If you need to have the center of the circle somewhere else, you could use another object's origin, using the option near the bottom of the Texture Coordinate node.

enter image description here

$\endgroup$
5
$\begingroup$

If you want the transparent "circle" to stretch to fit the shape of the plane (so there are uniform boundaries), you can use a Generated texture coordinate. You will have to use a mapping (or vector transform) node to "center" it in the object (by subtracting 0.5 from both the X and Y axes). Then, you can use a Spherical Gradient and a Math Node set to Greater Than to form the mix factor for your "circle".

EmitCirc

This even works with irregularly shaped planes (to an extent), however you will have to change the Math Node threshold, or else some corners get clipped. Unfortuantely, the circle does not "deform" to the shape of the plane, only it's general "size". See below:

WarpedPlane

If you don't want a harsh cutoff, you could substitute the Greater Than Math Node for some other form of control, such as a ColorRamp.

ColorRampEmit

$\endgroup$
3
  • $\begingroup$ Agreed... this is probably what the OP means.. :) $\endgroup$ – Robin Betts Dec 18 '20 at 21:30
  • $\begingroup$ This works pretty well, but how about if one side is shorter than it's opposite side, forming almost a triangle? Sorry, I should have specified that in the question. What you got is good so far! This would require the hole to be an oblong elipse. $\endgroup$ – RBlong2us Dec 18 '20 at 22:55
  • $\begingroup$ Yeah, sorry, I'm not sure how to do that. Like many custom effects such as this, I'm sure it can be achieved with an ungodly number of math nodes, but how to do so is beyond my experience thus far, I'm afraid. $\endgroup$ – Christopher Bennett Dec 19 '20 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.