What units does sun size in Cycles use? (+accurate sun size)

Blender documentation is conspicuously silent on just what size means for a sun lamp. Since the sun has no actual location to the scene and just outputs parallel rays from a given direction, it cannot be in Blender Units/meters which is what the manual specifies for the rest of the lamps. Presumably it must be some measure of angular diameter.

In this thread tjdolphin arrived at a value of ~0.0031 for a realistic sun through experimentation (quite far from the default value of 1!):

However, while the logic there seems sound to me, I’ve also found some other opinions on correct sun size, and I haven’t found anything definitive on it. The sun’s angular diameter on Earth is about 0.53 degrees, and I can’t think of any unit for angular diameter with which a figure of 0.0031 would make sense. 0.0031 radians, for example, is ~0.18 degrees.

I’m both interested in having an accurate sun size for regular scenes on Earth and also rendering scenes set in other solar systems at various distances from their stars. I can handle calculating the appropriate angular diameter of a star at a given distance, but to use it in Blender I’d need to know what the unit for sun size is, or alternatively to have some confidence that the 0.0031 figure I have for our sun is correct. I’d imagine Blender would use some real world unit for this, but if not, a correct size for our sun would at least enable me to calculate other cases as multiples of that.

1 Like

I’ve been rounding to 0.005 as a basis for the sun disc. This accuracy isn’t really needed as you typically want to account for the corona and atmospheric conditions as well. You need welding glasses to see the disc size. Even flat on 4% reflectivity would be way overexposed and include the corona as part of the reflection.

But recently sun size is now given in angular size. I haven’t tried it yet, but I assume 0.5 is a good start for the sun disc size. But again, you want to increase this to “unrealistic” sizes.

Basically, the workflow should be something like:

  1. Set it to 0.5 (degrees) as a starting point.
  2. Setup your model to real world scale.
  3. Increase the sun size until you get the approximate shadow quality you need for the corona and atmospheric conditions at hand.

0.5 should only be for moon and space scenes - near earth :slight_smile:

This is how I understand it, which is based on tweeking by eye rather than science…

If you give the sun a size of 5cm, then the blur on the shadow will be 5cm. This is not super exact, as the angle of the shadow and the distance between the object casting the shadow and the surface the shadow is cast on, but it’s a good rule of thumb.

Also - (again - stop me if I’m wrong) if it’s a slightly overcast day, the sun will be effectively bigger but less bright - the shadows will be less crisp.

They actually just changed the units this past week, now it is specified as angular degrees. Here is a snippet from the development meeting minutes:

So, if you get a new build, it will have a new unit.

Also, if you don’t want to be super exact about it, you can add a sphere with sharp glossy and a sunny HDRI. Adjust HDRI strength to extremely low (or CM/exposure), and use trackball rotation to adjust the sun angle to match the HDRI sun. Then it’s easy to get a ballpark figure for the sun (and usually corona).

Another thing to consider is to vary the color temperature according to timeofday/solar elevation angle. And as already mentioned adjust strength acc to atmospheric conditions.

That’s amazing! The ambiguous sun size setting has bothered me for years, and just as I decide I want to figure it out for good, they’ve fixed it.