New Sky Texture

About the fireflies problem I mentioned above. Apparently the problem only occurs with CPU. I was using GPU (CUDA) + CPU on my machine (That could explain why sometimes I got only one dot/firefly). In the blend file above switch from GPU to CPU.

The sun disc produces noise, that’s it, and that’s why you can disable it really. You can use a bigger map for Multiple Importance to reduce noise, but there will always be some anyway

Ok, I understand for normal fireflies noise. But those big dots that appear and don’t tend to disappear by increasing render samples sounds strange to me. As I said I am getting those dots with Sun Disc disabled and with CPU, not with GPU, which makes the problem even weirder. Also tile size seems to influence CPU. With 16x16 I don’t get the dots, with 64x64 I get some dots.
Edit:
My mistake, also getting the fireflies with small tile size in CPU. (GPU still safe, I don’t have the problem with GPU)
But perhaps it is a problem of Cycles and not of New Sky Texture. I will continue doing tests.

maybe we can create a separate “sun lamp” node that would convert selected sun lamp object’s rotation and output it as Vector output for nacioss Sky Node Vector input. Also if Sun Size input would be exposed in Sky Texture node, then we could incorporate SunSize from lamp into Sky Texture

I set drivers like these:
Elevation = radians(90)-var (var=Sun X rotation)
Rotation = radians(180)-var (var=Sun Z rotation)

Thanks @nacioss ! The white line is fixed now :slight_smile:

Quick tip to get rid of fireflies:

Once happy with the position and look, render out a 360 panorama of just the sky, save it out as EXR and use it as a regular environment texture. Set the texture interpolation to anything other then linear = no fireflies.

Just in case one does not want to use a seperate sun light.

As many others have said though, a sunlight picker inside the node would be great :wink:

2 Likes

Ran some tests with the updated build. The issues seem to have been resolved. Thank you.

I have another bug to report. When the sun elevation and rotation is 16.7 degrees, the sun disk isn’t fully taken into consideration when lighting materials. At this current point in time, spot checking other elevations and rotations I’m unable to find other angles that cause issues. But if they are there, hopefully the fix for 16.7 will fix those as well.


As some feedback, are you able to unlock the sun rotation so we can drag the slider to any value? All the way from negative infinity to positive infinity. Elevation is in my personal opinion is fine being locked to a maximum of 90 degrees.

This would be useful for animations because if we wanted to animate the suns path across the sky throughout a day, we have to go through at max 180 degrees of rotation across the sky. If our scene was orientated the wrong way and objects had a bunch of keyframes already made to them, setting up the animation I described could be a hassle. (E.G. We’d might have to move the sun through 300 degrees to 400 degrees which would be impossible with this current method without using the vector input)

At the moment the vector input can be used to rotate the sky to get things working as expected, but it’ll be more intuitive if we could set this angle ourselves from within the node.

Thank you for making this. Also, thank you to @LazyDodo for building this for us.

I know it’s not much, but generally when I play around with new lighting systems I try to eliminate the materials as what “makes the scene look bad”. And looking at your implementation of the new sky, it looks quite good. Once again, thank you for doing this.

Another test. Only took about a minute to setup and in my personal opinion looks better than what I originally made for this file that took roughly an hour of trail and error. Getting the right sun and sky colour and brightness can be difficult in some scenes. Especially when you’ve had little experience working with custom skys and suns as was the case for me in this scene.

Both scenes (without the new sky node) can be downloaded from here:
Computer: https://drive.google.com/open?id=1qFQpddWF2mFtbUK798L4Yy7sHZaWsJrK
Bedroom: https://drive.google.com/open?id=1JmOZjxLrE7QHdi7XGcdMKg5rTukBfGqQ

3 Likes

For the sun disc not illuminating the scene, try a multiple importance map of 2048, maybe the automatic one is so small the it doesn’t sample the tiny sun disc

Changing the multiple importance map solves the issue but there is definitely something wrong with 16.7, 16.7 or the sampling method. Because using that angle with a sun size of 20 degrees and a multiple importance map value of 1024 produces really bad sampling issues. This shouldn’t be the case as the sun is quite large.

Actually, I believe it may be a issue with Cycles. Not 100% sure. Using literally any other multi-importance sampling number other than 1024 fixes it (within reason).

For example, I’ve setup your sky to have a elevation and rotation of 16.7 degrees and a sun size of 20 degrees. With a multi-importance sampling value of 1024 it produces really bad sampling. But with 1025, it’s back to normal. Even using low values like 128 still produce better results than 1024. Obviously as the sun disk gets smaller (E.G. Default ~0.5 degrees), a larger value than 128 is required.



I will leave it up to you to decide if this is a bug with the node or with Cycles and I’ll leave it to you to make the report if it’s a bug with Cycles.

3 Likes

Man, how can you even find all these issues :slight_smile: . So, definitely the problem here is Multiple Importance, so i will for sure show these issues to the devs when in review process. Thank you for testing by the way!

9 Likes

How do I find these issues? Mostly by accident.
For the first one, I reduce the elevation to -5 degrees because I wanted to see what the sky could reproduce when the sun had just set and I found the first issue with the blown out lighting. I then started playing around with extreme values and found the second issue with the blown out lighting due to the high altitude. Then you fixed both of those and I downloaded the new build and I accidentally set both the elevation and rotation to 16.7 and found this issue.

Really just pure luck.

3 Likes

+1 on adding value socket control for parameters. It is expected in the node editor for most nodes now (see the new mapping node redesign for example)

Great stuff!

What on earth is going on with Cycles importance sampling that this can work? :face_with_raised_eyebrow:

Probably it’s not possible to expose those parameters as input sockets because of how the model works… we will see

You can read about it here: https://developer.blender.org/T69745

Awesome that you are working on this . Just downloaded to try, first impression is that it looks really nice. Will report back if i find any bugs…

1 Like

Added OSL support!

24 Likes

So, I don’t have a degree in computer graphics (yet), but I was just wondering about how haze in the sky texture would integrate with having a volume shader added to the world material. I mean, hypothetically, if I’m rendering a cityscape with a sky texture having a high haze value, but I also want a foggy volume as part of my world material, is there a recommended way to use both (I’m asking mathematically and physically rather than artistically)?

if you add a volume shader in the world it will actually render the environment as black, that’s how Cycles works. You can add “artistically speaking” a cube object and use volume scatter to simulate Mie Scattering, that has an anisotropy of about 0.76.

3 Likes