Physical Starlight and Atmosphere Addon for 2.8 (v1.1)

I observed that blender keeps a value of 200 units for Cascade Shadow Max Distance, this is not adapted when working in cm so shadows are not displayed by default. Since I’ll only create a sun from within the addon I added a few lines Under “def create_sun()” :

# Sun Shadow
ShadDist = bpy.data.lights["Sun"].shadow_cascade_max_distance
if bpy.context.scene.unit_settings.system == "METRIC":
    bpy.context.object.data.shadow_cascade_max_distance = ShadDist / bpy.context.scene.unit_settings.scale_length

I also set sun to 5778K, not sure if that’s a more accurate value. I paired it with a better curve fitting temperature model from https://www.zombieprototypes.com/?p=210.

Summary
if tmp_internal <= 66:
    tmp_red = 255
    tmp_green = - 155.25485562709179 - 0.44596950469579133 * (tmp_internal - 2.0)  + 104.49216199393888 * math.log(tmp_internal - 2.0)
    tmp_blue = 0.0 if (tmp_internal <= 19) else (- 254.76935184120902 + 0.8274096064007395 * (tmp_internal - 10.0) + 115.67994401066147 * math.log(tmp_internal - 10.0))
else:
    tmp_red = 351.97690566805693 + 0.114206453784165 * (tmp_internal - 55.0) - 40.25366309332127 * math.log(tmp_internal - 55.0)
    tmp_green = 325.4494125711974  + 0.07943456536662342 * (tmp_internal - 50.0) - 28.0852963507957  * math.log(tmp_internal - 50.0)
    tmp_blue = 255
1 Like

Hi there Martin!

First off thanks for making this addon! It’s a game changer, truly.

Call me stupid, but in order to get the fogging of object in the scene, I need to connect material of each object to StarlightAtmosphere node?

Cheers!

In case it takes Martin a while to respond - I believe the answer is yes!

He noted previously he intends to automate it at some point soon.

1 Like

Thank you!

Did you guys tried to put Volume Scatter into world node or similar? It works OK for Eevee but not so much with Cycles. For sure I am missing something but… no idea.

@martinsh is it recommended to disable the sun lamp in cycles, so that the whole lighting is just being performed by the sky? Doing that should theoretically reduce the noise in outdooor scenes with no other lighting

hey, sorry for late reply.

You can use irradiance volume / probe grid (not at the pc now, I forgot the name) to “bake” shadows from HDRI in Eevee.

In my addon visual difference between cycles and eevee is minimal. Sky “indirect” lighting is calculated by the HDRI and direct lighting is simulated by a Sun lamp, that’s why you see shadows. Cycles, of course, will be more accurate, while Eevee is an approximation.

There is no limitation of how you should use the addon. mix it with anything you like.

1 Like

i added it to the development roadmap. it should be easy to fix.

The addon uses a Sun lamp, i’m not sure if the sun lamp is the best option but what else can we use…

@SPYNeox What do you mean?

In EEVEE, HDRI doesn’t produce shadows even when baking. It must be AO what you see or other lights if you see shadow. I am pretty sure about it. But correct me if I am wrong.

1 Like

Tried to install v.1.1 but it didn’t take. Do I need to do something differenty?

Hi martinsh!

I just purchased this addon, and although it’s awesome for near-ground scenes, it seem it’s incapable to simulate global (aka planetary) atmospheres, which I would really needed. Maybe it’s just me but “low orbit” scenes means many distances…

So if there’s any workaround to use it like volume, or somehow create planet-scale atmosphere? Or in the near future?

Other question is if this is a phisical-based model of the atmosphere how it comes an “atmosphere height” like 700m (real atmosphere is many hundreds km thick) and giving fairly realistic near-ground renders?

Is there a chance to get working this atmosphere with bi-directional renderers? LuxCoreRender doesn’t work with this addon…

Hey all,
It has been 10 days since my baby boy was born!
Now my 10 day “baby vacation” is over and I am heading back on working on the addon!
My focus for the next release will be:

  • physically correct solar and sky radiance values (now they are proportionally lower than real values)
  • “sun position” addon integration
  • planetary fog (to replace the flat model)
  • UI and usability tweaks
  • Sun radius fix for Intel and Iris GPUs
  • documentation and first tutorials
22 Likes

Congrats! I can’t believe you launched amidst having your child. Strong mind and strong will!

1 Like

Wow! Congratulations! Your addon is literally brilliant.

2 Likes

Congrats mate :slight_smile:

2 Likes

I m watching “your” presentation in Bconf2019 when i heard about the good news i decided to pause and come to congratulate you here. Enjoy the ride :dizzy::boom::heart_eyes::smiling_face_with_three_hearts::100::sparkler::fireworks::tada::confetti_ball::sparkles::saxophone::crown:

2 Likes

Congratulations all round! Thank you for an amazing add on. Could I ask for an option to invert the absorption? This is to allow us to pick the visible colour more directly. Thanks!

2 Likes

Getting closer to planetary scale!
Sphere/ray intersection is working. Atmosphere volume will be now calculated by subtracting atmosphere from planet. Exponential falloff will be tricky though, but not impossible.
Sun and Moon will be calculated the same way now based on radius and distance from the viewer. (opposite to a 2D disk shape projected to a dome at infinite distance)
This will allow you to physically travel to the star or moon.

8 Likes

Awesome progress! :slight_smile: