Reactive materials
If you build your own terrain, prop, or foliage materials and want them to receive snow, rain, and wind from the sky system, use the included Material Functions. They read from the simulation’s published values (snow amount, wet amount, wind direction and speed) and inject the right effects without making you rewire your shader graph.
The material functions
Section titled “The material functions”| Material Function | Use it on | What it does |
|---|---|---|
MF_Snow | Any opaque surface (terrain, props) | Layers snow on horizontal-facing parts of the surface. Drives intensity from the sky’s simulated SnowAmount. |
MF_SnowandRain | Same as above, when you also want wet/puddle effects | Combined snow plus wet-surface (puddles, ripples, drips, splash flipbooks). |
MF_GrassWind | Grass blade materials, in WorldPositionOffset | Procedural sway. Driven by the system’s wind direction and speed. No inputs, just plug it in. |
MF_BushWind | Bush/tree materials, in WorldPositionOffset | Higher-quality wind for larger foliage. Has an AdditionalWPO input so you can chain other deformations (player-crush, hit reactions). |
MF_2DClouds | Sky-dome / horizon cloud overlays | Cheap horizon clouds at a configurable altitude. |
Adding snow to a material
Section titled “Adding snow to a material”- Open the material in your project.
- In the Details panel, set Use Material Attributes = true.
- Build your normal material as a Material Attributes bundle (everything goes through
MakeMaterialAttributes). - Route that bundle into
MF_Snow(orMF_SnowandRain). - Connect the function’s output to the material’s Material Attributes output pin.
Snow now appears automatically on horizontal faces whenever the sky says it is snowing. No per-material configuration needed. You can override snow textures, tiling, and color via the function’s exposed parameters.
Adding wind to foliage
Section titled “Adding wind to foliage”MF_GrassWind and MF_BushWind both go into the World Position Offset pin of your material:
- Open the foliage material.
- Find the World Position Offset pin on the material output.
- Plug
MF_GrassWind(for grass blades) orMF_BushWind(for bushes/trees) into that pin. - For
MF_BushWind, optionally chain other WPO deformations through theAdditionalWPOinput.
Wind direction and speed are read from the system automatically. The strength and frequency follow the simulated wind speed, so calm days are gentle and windy days lash.
Adding 2D horizon clouds
Section titled “Adding 2D horizon clouds”MF_2DClouds is for sky-dome cloud overlays, useful when you want cheap horizon clouds layered on top of (or instead of) the volumetric system. Drop it into a sky-dome material and configure the altitude parameter to taste.
Where to next
Section titled “Where to next”- Material functions reference: every exposed parameter on each function
- Weather states: what
SnowAmountactually depends on - Troubleshooting custom materials