Custom Sky

_images/icon11.webp

A space skybox with a moon.

File location

/assets/minecraft/optifine/sky/world*/*.properties

/assets/minecraft/optifine/sky/**/*.png

Custom Sky changes the skybox texture and can apply different sets of skies depending on the time, biome, heights, weather, and more.

_images/settings7.webp

Video Settings ‣ Quality

Files are placed in the folder for the world they apply to.

  • For the Overworld, this is ~/sky/world0/.

  • For the End, this is ~/sky/world1/.

Mods which add their own worlds with overworld skies can be targeted with ~/sky/world<world number>.

Warning

Because the Nether does not use the standard sky rendering, Custom Sky cannot be used for it (so, world-1 is invalid).

Each file represents one layer of the sky. OptiFine will load them in order by their number, applying one on top of the previous.

Additionally, two special properties files are applied to the sun and moon if present. This is mainly intended to allow overriding the blend method used by the sun and moon:

  • ~/sky/world0/sun.properties: replaces sun.png.

  • ~/sky/world0/moon_phases.properties: replaces moon_phases.png.

_images/sun.webp

The Vanilla sun.png.

_images/moon_phases.webp

The Vanilla moon_phases.png.

Instead of a full skybox, the source texture should match the layout of sun.png or moon_phases.png.

_images/skybox.webp

A simple template for a skybox, with directions labelled. Image is from this merge request

_images/star_sky.webp

An example of how a skybox might look.

Properties

Note

speed does not affect the fading in and out; this always occurs on a 24-hour cycle.

startFadeIn

Type: String

Values: Time in hh:mm 24-hour format (e.g., 06:00)

Optional

Start time for fade-in (brightness rises from 0 to 1).

If no fade times are specified, the layer is always rendered at full brightness.

endFadeIn

Type: String

Values: Time in hh:mm 24-hour format

Optional

End time for fade-in (brightness reaches 1).

startFadeOut

Type: String

Values: Time in hh:mm 24-hour format

Optional

Start time for fade-out (brightness begins dropping from 1 to 0).

Important

startFadeOut does not need to be specified; its value is uniquely determined by the other three fade times.

endFadeOut

Type: String

Values: Time in hh:mm 24-hour format

Optional

End time for fade-out (brightness reaches 0).

source

Type: String

Values: File path

Default: Implied from filename

Optional

Path to the source sky texture (PNG file).

Multiple properties files can reuse the same source texture.

The default is skyN.png where N is the number in the properties filename.

blend

Type: String

Values: add, subtract, multiply, dodge, burn, screen, replace, overlay, or alpha

Default: add

Optional

Blending method between this layer and the previous layer (or vanilla sky):

  • add: Add this sky bitmap to the previous layer. Overflow becomes white.

  • subtract: Subtract this sky bitmap from the previous layer. Negative values become black.

  • multiply: Multiply previous RGBA values by this layer's RGBA values.

  • dodge: Lightens the previous layer.

  • burn: Darkens the previous layer.

  • screen: Inverts both layers, multiplies, then inverts the result.

  • replace: Replaces the previous layer entirely (no gradual fading; full value if brightness > 0).

  • overlay: Brightens (>0.5) or darkens (<0.5) based on RGB value.

  • alpha: Weighted average using alpha channel.

rotate

Type: Boolean

Default: true

Optional

Whether the sky texture should rotate with the time of day.

speed

Type: Float

Values: Positive float

Default: 1.0

Optional

Rotation speed multiplier relative to the default (one full 360° cycle per game day).

  • 0.5 ⇒ rotates once every two days.

  • Long values can prevent repetitive cloud patterns day-to-day.

axis

Type: String

Values: x y z

Default: 0.0 0.0 1.0

Optional

Axis of rotation for the skybox.

Default (0.0 0.0 1.0) rotates along the southern axis (rises in east, sets in west).

Valid cardinal direction examples:

east = 1 0 0 west = -1 0 0 up = 0 1 0 down = 0 -1 0 south = 0 0 1 north = 0 0 -1

The axis can be any non-zero vector.

days

Type: List of integers or integer ranges

Values: From 0 to daysLoop-1

Optional

Days of the cycle on which this layer is rendered.

daysLoop

Type: Integer

Values: Positive integer

Default: 8

Optional

Length of the day cycle loop for the days property.

weather

Type: List of strings

Values: Any of clear, rain, thunder

Default: clear

Optional

Weather conditions under which this layer is rendered.

biomes

Type: List of strings

Values: Space-separated biome IDs

Optional

Biome IDs where this sky layer applies.

Modded biomes are supported using their IDs.

heights

Type: List of integers or integer ranges

Optional

Y-level ranges where this sky layer applies.

Example: (-3)-64 for underground to sea level.

transition

Type: Integer

Values: Positive integer

Default: 1

Optional

Transition time (in seconds) for smooth brightness changes between layers or conditions (e.g., biome borders).

Time format

All times are in hh:mm 24-hour format.

Time format reference

Sunrise

6:00

/time set 0

Noon

12:00

/time set 6000

Sunset

18:00

/time set 12000

Midnight

0:00

/time set 18000

The fade times control brightness when blending, as follows:

  • between startFadeIn and endFadeIn: 0 up to 1

  • between endFadeIn and startFadeOut: always 1

  • between startFadeOut and endFadeOut: 1 down to 0

  • between endFadeOut and startFadeIn: always 0

Blender model

Note

This Blender model was contributed by usernamegeri.

You can generate the vector coordinates that are required for the axis of rotation of the skybox by using a pre-made tool for Blender. It can be found here.


Assumes the latest OptiFine & Minecraft versions.
Updated to commit 83d482c3.