21
$\begingroup$

In Cycles, a sun lamp is treated as infinitely far away - only the angle matters, not the position. Other lamps have their sizes defined in blender units: a point lamp with size 1 emits light from a area with size of 1. But if a sun lamp at infinity had a size of 1 blender unit, the angular arc of that sun would be nonexistent.

Clearly, when you change the size of a sun lamp, shadows get fuzzier or sharper. But what does that actually mean? What are you changing?

$\endgroup$
3
  • $\begingroup$ The scatter radius basically $\endgroup$
    – J Sargent
    Commented Jan 10, 2016 at 20:55
  • $\begingroup$ Care to elaborate on what you mean by that? @NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ $\endgroup$
    – Kaia
    Commented Jan 10, 2016 at 21:04
  • $\begingroup$ Basically the sun lamp object is just to establish the light of the sunlight, and the size is the scatter ratio, or how much the shadows spread. $\endgroup$
    – J Sargent
    Commented Jan 10, 2016 at 21:19

3 Answers 3

8
$\begingroup$

size looks to be tangent of half-angle of actual size multiplied by 1 meter (if units are metric or imperial)

in other words, size is radius of shadow cast by point 1m (or unit) from surface receiving shadow

$\endgroup$
1
  • $\begingroup$ I can confirm this - it's seems to be circularly-shaped uniform intensity with the tangent of the half-angle = size. Try a pinhole camera to check. $\endgroup$
    – uhoh
    Commented Feb 1, 2016 at 10:21
20
$\begingroup$

cegaton's answer nicely covers the practical impacts of the size setting (i.e. the shadows), but what you are actually setting is the apparent size of the sun lamp.
In other words, the size controls radius of the sun as seen by the camera (or any other light ray), regardless of distance.

To see this in action, create a perfectly reflective plane and point a sun lamp straight at it:

enter image description here

Enable Multiple Importance Sampling on the sun lamp to allow caustics, then look straight down at the plane in rendered view (so that the sun lamp should be reflected back towards you)

If you are not in ortho perspective (in which case the sun lamp will appear infinitely large), you should see a circle which varies in size depending on the sun lamp's size setting.

This circle — a reflection of the sun lamp — shows that the lamp always appears the same size regardless of the distance to the camera, unlike the reflection of a sphere positioned a finite distance away:

enter image description here
In this gif the sphere is invisible to camera rays, so in rendered view only its reflection is visible

So you could say the sun lamp size is defined in camera space, rather than world space.

$\endgroup$
16
$\begingroup$

A lamp with size 0 will give you a very sharp shadow:

enter image description here

As you increase the lamp's size it will give you much softer shadows.

enter image description here

enter image description here

What you are increasing is the Penumbra

from Wikipedia:

The umbra, penumbra and antumbra are three distinct parts of a shadow, created by any light source after impinging on an opaque object. For a point source only the umbra is cast.

enter image description here

A: Umbra

B: Penumbra

The penumbra (from the Latin paene "almost, nearly" and umbra "shadow") is the region in which only a portion of the light source is obscured by the occluding body

An illustration using a mesh as emitter:

A small light source=sharp shadows, most of the light is blocked by the object:

A larger light source=softer shadows, the light source is only partially blocked:

enter image description here

enter image description here

$\endgroup$
6
  • 11
    $\begingroup$ I know that increasing the size of a sun lamp makes softer and wider shadows. My question was more intended as "What does the size mean". In your example, the final sun is set to 50 cm. The sun lamps are said in documentation to be treated as infinitely far away. A 50 cm object at infinite distance clearly doesn't even appear, so the renderer must be doing something different - the size field must have a different meaning than just the size. But thanks for the answer, it's a good illustration of the concept. $\endgroup$
    – Kaia
    Commented Jan 10, 2016 at 22:10
  • 1
    $\begingroup$ This answer is almost certainly false, as according to the devs, a sun lamp is infinitely far away, thus any change to size has no effect. It has to be a more mathematical approach derived from the vector of the incoming ray and the distance to the place where the shadow is cast. $\endgroup$
    – J Sargent
    Commented Jan 13, 2016 at 21:46
  • $\begingroup$ @NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ in theory yes, but changing the size does affect the shading... $\endgroup$
    – user1853
    Commented Jan 13, 2016 at 22:11
  • $\begingroup$ But not like the physical method you show, rather a mathematically determined scattering based on the direction of the sun lamp. It is equal at any infinite point, while a planet like sun would actually have a circular effect. I do agree that is what the method is derived from in order to approximate though. $\endgroup$
    – J Sargent
    Commented Jan 14, 2016 at 0:17
  • $\begingroup$ @NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ Last three images I put it there just for illustration purposes. Feel free to edit, delete or correct what you need. $\endgroup$
    – user1853
    Commented Jan 14, 2016 at 0:18

You must log in to answer this question.

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