How do i make rectangular gradient?

I am pretty new at blender and i am experimenting with lightning.
What i want to do is to make a rectangular emission-plane (material) that has soft falloff on all edges proceduraly so i can make the light any shape and the falloff follows the shape.
Any help would be greatly appriciated !

Example. (not my picture, found in in another thread. Here)


Maybe you can use the addon brick tricks for this ;

1 Like

Thanks alot !
It worked pretty good. Did some test renders below. Only thing that would add too it would be more control over the corner opacity like having it go even further into the center. Tried playing with the ramp but did not really get thicker/longer gradients into the center Is that possible ?


Here’s something you could try:

Vertex color is just to make the center vert (which is white; marginal verts are black). Gradient is created by interpolation of vertex color along the face, then tuned as you want. I’m using an RGB curve node, those are comfortable for me, and hopefully you can see how you could use this to tune opacity pretty completely.

Not limited to a rectangle (obviously), can be animated in a number of ways including shapekeys, keyframes for curve handles. Potentially vulnerable to topology issues since you’re relying on interpolation across triangles to create the gradient-- avoid long, skinny tris/rectangles, avoid trapezoids,you should be okay.

If you want fixed width border, can create a loop cut around the pole and control it, but part of what’s nice about this, IMO, is how easy it is to just translate the pole and get a different distribution of light.

Edit: occurred to me that I might have finally found a use for parametric, and yup, it looks like it works. If you don’t want to use vertex color:

Note that I’m not sure how it determines which vert is which for parametric, so no guarantees this will work with your particular topology.

Also demonstrated a curve with a vector handle so you can see how to use it to “clamp” a light border.

1 Like

Looks great and with more precise control ! Will try em out tomorrow.

Hmm, i tried both but i did not get it to work but I am pretty new at blender and 3D-software so very possible i made some mistake ! I have not yet messed around with vertex-groups so mayby i did it wrong. Assigned to center of fan vertex Col ? Also i am on 2.8.

In the screenshot i made a plane and a trianglefan circle and tried your second method.

What did i do wrong ?


something like this?

3 Likes

That worked great, thanks !
I think i stick to this method for now as i am a semi-beginner as more advanced methods might be above my head for now :slight_smile:
Thanks for all the help guys.
Great community !

Yeah, I’m not certain how the parametric assigns coords-- it probably depends on vertex order, which is kind of esoteric. I wouldn’t recommend parametric, it was just kind of an observation.

The vertex color however should work. You mention vertex groups in your reply-- I’m not using vertex groups, I’m using vertex color. You can’t access vertex groups using an attribute node.

can you give the values for the Color ramp

thanks
happy bl

Ricky, they’re not important. You shape it however you want.
Unless I need to control both sides separately, I would set it up so that I control falloff only on one side which is then mirrored. Controlling x and y separately may be beneficial though, since square may be a rectangle.

Yeah i meant vertex color but possible i made some mistake. Will try again when i get back from vacation.