Dynamic Cubemaps
Dynamic Cubemaps is a simple Cities: Skylines mod for assigning different environment cubemaps to the main day/night periods:
- Sunrise
- Day
- Sunset
- Night
The mod uses the game’s current time period to swap the active cubemap automatically. Cubemaps can be selected from the Options menu.
Open the main options menu in-game and select Dynamic Cubemaps from the sidebar. Choose a cubemap for each slot.
Click Apply Settings after changing selections.
Click Reload Cubemaps if you add or edit cubemap files while the game is running.
Dynamic Cubemaps has two night behavior modes:
- Default: Uses the selected night cubemap with the map theme’s normal nighttime horizon haze and fog colors.
- Disable horizon haze at night: Uses the selected night cubemap, but replaces the map theme’s nighttime haze and fog colors with darker neutral tones. This can help when the night cubemap and map theme colors do not match.
Existing Workshop cubemap packs using CubemapReplacements.xml can be detected and used by the mod.
The mod scans enabled mods and Workshop folders for CubemapReplacements.xml. HDRI, cubemap, and skybox names are also used as discovery hints for legacy packs. Any compatible legacy cubemaps found there are added to the dropdowns in the options menu.
Create a CubemapReplacements.xml file and one or more combined cubemap images. This repo includes a small example pack in Examples.
Example:
With this XML, the mod expects these files:
Each image should be a combined cubemap in a 4×3 cross layout. The faces must be square. For example, a 4096×3072 image contains 1024×1024 cubemap faces.
There is a free online HDRI-to-cubemap converter available here:
https://hdri-to-cubemap-converter.vercel.app/
A 2048px face size is a good starting point. Higher resolutions can look sharper, but they will use more memory.
Each entry needs:
- code: unique internal ID
- description: name shown in the options dropdown
- file_prefix: path and filename prefix before cubemap.png
This mod comes with 4 example cubemaps, hence the 28MB size.
The simplest way to include custom cubemaps is to place CubemapReplacements.xml and the texture files in the mod folder with the DLL located in workshopcontent2557103734040810
You can also package cubemaps in a separate local or Workshop mod folder using the same legacy XML format. Once the game sees the folder and the XML is valid, the cubemaps should appear in the Dynamic Cubemaps options menu.
- This mod has been tested with Lumina and Render It!, but compatibility with other visual mods may vary, especially when using the ‘disable haze at night’ mode. Report any bugs in the comments.
- Cubemap changes happen at the mod’s day period boundaries.
- Cubemaps are loaded at their authored brightness. Night cubemaps may still behave more like color overlays depending on the map, lighting, and other visual mods. Night-focused cubemaps such as cloud-layer textures usually work best.
- Split cubemap formats are not supported; use a single combined *_cubemap.png image.
source code:
https://github.com/UncleTookie/DynamicCubemaps