Sky Texture + HDRI - how to do it correctly?

Guys,

I’m trying to mix Sky Texture with environmental image (HDRI). The idea is to “force” environment image intensity to be same as sky texture so when I change time it should bright/dim accordingly. I have achieved this by doing this:

day time:

night time:

Problem is that, of course, I’m losing colors of sky texture to be appeared in the environment image, which otherwise should be like this if I connect sky texture directly to world output:

So my question is (besides how to remove this giant black hole on the ground), how to blend colors of sky texture to the environment hdri image?

Thanks

Here is one way…

You will have to manually adjust the sun rotation and angle of the SKY to fit to the Hdri, but it is really easy to do since they both appear in your shadows…the first mix node on the left, adjust the ratio of SkY and HDRI…the next one will switch from Day to Night ( Full Black) but scene lights will stop it from becoming full Black ie: Night…
Also, notice I matched the horizon line as they are different in SKY and HDRI, use the mapping node for Z Location…

If using this for animation, you should be able to, by keyframing the nodes…

thanks, but it needs manual adjusting of intensity, right?

I kinda managed to blend it with sky texture but this black hole thing… can this black area be “filled” with hdr image and at the same time preserve its colors? can’t get rid of it no matter what I do

Get rid of the Lightpath> Camera Ray…you are in effect removing it from the world…

So let me ask, what are you trying to accomplish with it, a window to the sky texture?

yes, to lit up my room according to exact day time and also see outside world through window. I’m afraid I don’t understand what you mean by saying to remove lightpath… remove it from world settings? there is no difference…

Full-size Nodes…

what version of blender do you have? doesn’t seem to work :confused:

I use 3.3 for most of the things I want to keep as I can always load them into a more current version if needed ( for now) I believe that will change by the time 4.0 comes out…I never use the WIP versions till they are fully stable…and my plug-ins have been updated to work with them…this file should work ( except for the mix rgb node which needs to be a Mix node after 3.3) up to 3.6.

well, I copied your nodes just exactly how it is, the shadow now gone but the hdri image stays bright when day time changes. I have to manually adjust as you mentioned earlier, right?

Do I have anything wrong here?

What is the value in the left second-up node? NM I see on an enlargement it was 27.5 That controls the Blend between HDRI and Sky texture and the HDRI is blown out…
You have the upper one set to .2 which is almost full HDRI…

This does Multiple mixes so if the middle value node is at 27.5 on a full HDRI and the bottom which is the Day/Night switch set to 5.0 Full Day then yeah, the HDRI is way too bright…

Of course it will also have to be adjusted for a very bright HDRI or a Very Dark…but I find these settings best… for the HDRI I used…

The upper Value Node at about .3
The Middle Value at 1.0
and the Lower one a range between .02 > 5.0 for Night and day…zero of course will be full BLACK which you don’t want !
And of course you can also still add to the Air, Dust and Ozone for the Sky …

yes you are right, that value I have changed prior sending you screenshot for some reason, but the result don’t really change much, I’m talking about the black area being changed in size, but it’s still visible. Looks like we are unable to completely remove it from the scene, rather change its size.

Yes you can…I didn’t see it as I was looking at the model and not the ground…it the sky texture that does it so I had to make that invisible to the black and get the HDRI in it’s place…just a few tweaks to the nodes and…


Straight down view …GONE…

and you still get the Sky Texture Functions…

are you sure the whole scene changes light when you change this value? from complete dark to complete bright? Copied your settings, yes we’re blending nishita to hdri but the main idea was to control day/light by just one value

image

I haven’t used the time of day, have to find it it will not therefore be orientated to the sun in the HDRI so you will have multiple shadows and look weird…that’s why I set the location of the Sky sun disk, at the exact location as the HDRI…

To adjust to Day/Night you just need a simple change ( though you will lose the reflection/shadow control…)


You still have to adjust the HDRI or the objects will be too dark…

You can’t have a simple one-click solution…unless you can somehow write something up in Python…

thanks a lot for your help, really appreciate. Would be just great if there is some way (besides writing the script) to get to day/night value, not just a generated image from nishita sky, but value. Then this can be used in Strength as a simple node! Would be just fantastic. Otherwise, I’m just unable to blend (fill) this black area to hdri :frowning:

and yes, unfortunately, I’m getting double shadow if I don’t set hdri to compute only camera ray at the beginning.

1 Like