8
$\begingroup$

I would like to have area lights with linear or circular gradient, so that the light is more realistic without sharp edges and constant brightness. But as soon as add a mapping node it becomes completely dark (as the bottom image). Is there any way I can add a gradient map on area light?

(I know it can be done with geometry light with emission shader, or a HDR map can be added to an area light - but I am looking for a solution where I can control area light with procedural shader/without an image)

gradient map for Blender area light

$\endgroup$
4
  • 3
    $\begingroup$ Did you try Generated or Object coordinates? Lamp object doesn't have UV data $\endgroup$
    – Mr Zak
    Commented Jan 5, 2021 at 19:35
  • $\begingroup$ I tried generated - it stayed the same - ie. black. Just now tried object co-ordinate and it does seem work! I will explore more and post the results here. Thank you!! $\endgroup$
    – saicode
    Commented Jan 5, 2021 at 20:22
  • $\begingroup$ @saicode does the lamp have to be area light? It really is easier to do what you are trying to do another way (a different light). $\endgroup$ Commented Jan 5, 2021 at 20:26
  • $\begingroup$ If I can get a reflection on the geometry I can use other lights also. Could you explain a bit what you are thinking? $\endgroup$
    – saicode
    Commented Jan 6, 2021 at 5:49

3 Answers 3

10
$\begingroup$

Bonus setup for caustics using normal:

enter image description here

$\endgroup$
8
$\begingroup$

Use the normal if you use spherical gradient change the Z scale to 0 on the mapping enter image description here

$\endgroup$
1
$\begingroup$

To get a texture on your reflections, you must use Object Coordinates.

  • For whatever reason, you also have to select the light ("Light2" in my case) for the Texture Coordinate node so that the light's transforms are transferred to the coordinates in the node tree (usually it's automatic).
    enter image description here

  • If you want to keep the coordinate values in $[0,1]$, make sure that your lamp is set to either Square or Disk with a Size of 1m, and in the node tree, add 0.5 to the $x$ and $y$.
    enter image description here
    (You can still make the light with any aspect ratio by changing the object scale.)


Examples


enter image description here
enter image description here
enter image description here
For the last example, you can reduce the noise and render time by setting the shape to Disk so that the black corners aren't being sampled.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .