Want to master Blender? Click here! and get our E-Book
When you purchase through links on our site, we may earn an affiliate commission. Affiliate Disclosure
Last update: May 27, 2021

Setup a skybox using the sky texture in Blender

The light coming from the sky is often one of the primary light sources. In Blender terminology, we rarely hear the word skybox. Instead, we use phrases like world material or environment, but they are all the same thing.

To set up a sky texture, go to the world material tab, expand the surface section and press the yellow dot next to color. Choose sky texture from the list. For Eevee, change the sky type from Nishita to Hosek/Wilkie or Preetham as Nishita isn't supported in Eevee.

In the rest of this article we look at adding a sky texture through the node editor, how to configure it and animate it. We will also briefly cover adding an hdri image as an option.

Related content: Blender: lighting basics tutorial

How do I use the Sky texture in Blender?

In the introduction we looked at how to quickly add a sky texture to light our scene through the properties panel. The interface in the properties panel has the same data as the node editor. only presented in a different way. Normally, we use the node editor instead, since it gives us much more control and a better overview.

To set up the sky texture in Blender's node editor, follow these steps:

  • Go to the shading workspace in the Blender interface header.
  • In the top left corner of the node editor, switch from object to world.
  • Make sure that “use nodes” is checked.
  • Go to Add->Texture or press Ctrl+A in the node eidtor and choose sky texture.
  • Drop the sky texture to the left of the background node.
  • Click, drag and drop a connection from the sky texture yellow color socket to the background color input socket.
  • Eevee does not support the default sky texture type, so change the sky type from nishita to hosek/wilkie or preetham to get a sky in Eevee rendered mode or material preview mode.

Related content: The complete beginners guide to Blender nodes, Eevee, Cycles and PBR

Related content: Blender viewport shading guide

If we don’t want to use the node editor we can use the properties panel to setup a sky texture as well, just like we did in the introduction. Follow these steps:

  • Go to the world tab in the properties panel. That is the red globe icon.
  • Expand the surface section.
  • Where it says color, click the yellow dot and choose sky texture.
  • If using Eevee, change the Sky type from Nishita to Hosek/Wilkie or Preetham.

It is a different interface, but the result is the same.

I would encourage you to use the node editor since that is what you will use most of the time if you dive into learning how to set up and use materials.

Sky texture settings

We have three kinds of sky textures.

  • Nishita
  • Hosek/Wilkie
  • Preetham

Each of these are mathematically generated sky textures that use different algorithms. Each type has it's own settings we can use to change the look of the sky.

Nishita sky texture settings

Nishita is the only sky texture that only has numerical parameters. The other kinds have a vector input we change by draging the interface to change the position of the sun. While these vectors can be animated, Nishita is easier and more precise.

The Nishita sky texture has no inputs. We can control the parameters by using drivers but not with other shader inputs.

The first setting is Sun Disc. This toggles the direct sunlight on or off. Effectively also removing Sun size and Sun intensity. But we can still use sun elevation and sun rotation. The result is an overcast sky eliminating any sharp shadows from the sun.

While the sun disc is active, the sun size will soften the shadows the bigger the value, while the intensity will intensify the contrast between light and shadow. So if you don't want to turn off the sun direct light completely, you can increase the size and decrease the intensity for a softer look. Something that is often desirable.

The rotation and elevation control the sun position in the sky by rotating it and adjusting the height. This also have an effect on the color of the rest of the sky.

The rest of the parameters have to do with the atmosphere rather than the sun itself. The altitude changes how high above the earth surface our scene is perceived to be.

With a higher altitude value we go from a warm indirect light to a much cooler blue indirect light from the atmosphere, just like if we were approaching space and the ground has less of an effect.

Dust will darken the lower part of the atmosphere, making it appear more and more as if there is a layer of dust in the air as we increase the value.

And last, with Ozone, the higher the value, the more saturated the blue sky will be. With a high altitude and Ozone value you will get an almost complete blue skybox.

Hosek/Wilkie sky texture settings

Hosek-Wilkie is supported in both Cycles and Eevee. It has three settings.

  • Vector, direction
  • Turbidity
  • Ground Albedo

We can click and drag the orb interface to change the direction of the light.

Both Hosek-Wilkie and Preetham have a lot fewer settings than Nishita. But both use the term turbidity. Turbidity is a term describing how transparent something is. So, my understanding is that turbidity is a way to tell how many particles and how much smog there is in the air. But they implemented it differently. In Hosek-Wilkie there is a color shift from a more light blue and white to a green-brown ish color across the sky dome.

To decide what value to use, I usually think of what feeling I want to convey for the scene. A higher turbidity would give more of a sickly atmosphere telling the viewer that something is not right. Perhaps for an urban scene with high pollution.

A low turbidity may convey a more fresh and free feeling.

The ground albedo changes the tone of the ground to a more pastel while keeping the underlying color from the turbidity. It can often give a more cartoony and light feeling.

Preetham sky texture settings

For preetham we also have the vector input tool to change the direction of the light. Preetham is much like the Hosek-Wilkie sky texture with a high ground albedo value. It has a kind of pastel feeling to it. But be careful with edge values in both the vector rotation widget and the turbidity.

With a turbidity lower than 2 you can get some quite weird results. For instance, at 1.6 I get no light at all for my testings and a value of 1 seem to flip the world upside down. So keep it above 2.

Also, rotating the vector input too much will give you highly saturated colors either intense blues or yellows. This can be good to keep in mind if you intend to animate since you could cross a value that destroys the colors for a frame or so. It could be better to stick with Nishita or Hosek-Wilkie.

Personally I rarely use Preetham, but occasionally it can be useful in Eevee since it is supported there.

How to animate the sky texture?

One benefit with the sky texture over a hdri image is that we can animate the parameters. By animating the sky texture we can create a time lapse, making the sky change over time. The easiest sky type to animate is the Nishita sky texture because here we only deal with parameters and not the vector. The downside being that it is only available in Cycles.

With Nishita, the easiest way to get started is to animate the sun elevation and rotation values. Make sure that you have a 3D viewport, the shader editor and a timeline editor available in your interface and follow these steps.

  • Set the timeline to frame 1, sun elevation to 0 and sun rotation to 0.
  • Hover the mouse over elevation and rotation and press I over each so that the property becomes yellow. Now we have inserted keyframes for each property.
  • Move the play head to frame 100 in the timeline.
  • Change sun elevation to 30 and sun rotation to 90 and press I while hovering the mouse over each property to insert new keyframes on frame 100.
  • Move the play head to 200 and set the elevation to 0 and rotation to 180. Press I again to insert the last keyframes.

If you now play the animation, it is likely that you won't see what happens because Cycles can't render the frames in real-time. Instead, we need to render a scene. Press Alt+F12 to render an animation from the camera.

Related content: How to move the camera in Blender

Related content: How to render in Blender

The finished animation is stored in c:\tmp\ by default.

With Preetham or Hosek-Wilkie we can animate the sky by moving the orb.

  • Move the play head to frame 1 on the timeline
  • Drag the orb widget to the left side so that only a portion of the white is shown. Press I to insert a key frame.
  • Move the play head to frame 100.
  • Drag the orb across to the middle and press I to insert a key frame.
  • Move the play head to frame 200.
  • Drag the orb to the right side and press I to insert a key frame.

To preview the animation, switch to Eevee and press play in the timeline editor.

How do I setup an hdri environment in Blender?

To set up an hdri as the world material in Blender, follow these steps:

  • Go to the world material tab in the properties panel.
  • Expand the surface section and press use nodes.
  • Press the yellow button next to the color value.
  • Choose Environment texture and press the open button that appears.
  • Browse for an hdri image and press “open image”.
  • Preview the result inrendered viewport mode.

In Eevee, we consider the light coming from the environment indirect, and therefore does not cast shadow. For any shadows to appear we need to bake the lighting using an irradiance volume.

Related content: Eevee lighting interiors

You can find free hdri images to light your scene here:

External content: HDRIHaven.com

My sky texture in Blender is all white.

This is a common error for beginners.

There are three types of sky texture modes on the sky texture node in Blender. The default, Nishita, is not supported in Eevee and instead produce a white sky. To solve this, switch from Nishita to Hosek/Wilkie or Preetham instead or switch your render engine to Cycles. All sky texture types are supported in Cycles.

Final thoughts

We have now covered how to set up and configure a sky texture in Blender. We looked at most settings for the sky texture types and also covered how to set up an hdri as an alternative.

Together with emission shaders and light objects, the world material covers all our ways to light. Sky textures is then one part of how we can use the world material or skybox. Just like with texture nodes, we can further expand how the world material should behave with additional nodes.

Related content: Blender: lighting basics tutorial

Thanks for your time.

Written by: Erik Selin

Editor & Publisher

Erik Selin
3D artist, writer, and owner of artisticrender.com

Recent posts

Free HDRI images for subscribers!

Subscribers to our newsletter enjoy more value! How about a collection of 40 HDRI skies for free!

Subscribe to our E-Mails

Subscribers to our newsletter enjoy more value! How about a collection of 40 HDRI skies for free!
We don’t spam! Read our privacy policy for more info.
Modal newsletter form (#6)