Custom Sky¶
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.
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: replacessun.png.~/sky/world0/moon_phases.properties: replacesmoon_phases.png.
The Vanilla |
The Vanilla |
Instead of a full skybox, the source texture should match the layout of sun.png or moon_phases.png.
A simple template for a skybox, with directions labelled. Image is from this merge request¶
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¶
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¶
End time for fade-in (brightness reaches 1).
- startFadeOut¶
Start time for fade-out (brightness begins dropping from 1 to 0).
Important
startFadeOutdoes not need to be specified; its value is uniquely determined by the other three fade times.
- endFadeOut¶
End time for fade-out (brightness reaches 0).
- source¶
Path to the source sky texture (PNG file).
Multiple properties files can reuse the same source texture.
The default is
skyN.pngwhere N is the number in the properties filename.
- blend¶
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¶
Whether the sky texture should rotate with the time of day.
- speed¶
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¶
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¶
Days of the cycle on which this layer is rendered.
- daysLoop¶
Length of the day cycle loop for the
daysproperty.
- weather¶
Weather conditions under which this layer is rendered.
- biomes¶
Biome IDs where this sky layer applies.
Modded biomes are supported using their IDs.
- heights¶
Y-level ranges where this sky layer applies.
Example:
(-3)-64for underground to sea level.
- transition¶
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.
Sunrise |
6:00 |
|
Noon |
12:00 |
|
Sunset |
18:00 |
|
Midnight |
0:00 |
|
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.