- Category: Blueprints
- Update: 1.5 (07-07-2018)
- Unreal Engine: 4.18 - 4.19
- Platforms: VR, PC, Console, HTML
Fast Stylized Procedural Sky is a unique dynamic sky material and advanced weather system that is perfectly balanced between quality and efficiency. Designed and optimized specially for Mobile, Virtual Reality, and stylized PC/Console games.
- GPU friendly works efficiently even on VR/Mobile. Unlit material without blending uses one draw call
- Over 60 parameters to customize
- Network replication supported
- Clouds lighting with scattering and shadows changes depending on sun position
- Clouds shadow casting, height fog, and static and dynamic skylight cubemaps
- Configurable sun and moon, lens effect, eclipse and stars scintillation
- Atmospheric sky gradient with tilting in sun direction
- Customizable automatic clouds UV calculation
- Moon normal-mapping and lighting calculated based on relative sun and moon position
- Time of day curves and advanced preset system
- Multilayered clouds
- Wind direction and clouds speed
- Smooth transitions between weather states based on preset system
- Landscape backgrounds interleaved with clouds, static clouds, and stars layer
- Skydome and skysphere mode
- The material is based on the new unpublished before method for fast calculation of procedural clouds lighting. You will not find this solution anywhere else!
- Sky material (ONLY 150 instructions! and ONLY 4 texture samplers used!)
- Directional light shadow material.
- 1 blueprint that uses material and implements time of day and preset system
- 1 static skylight cubemap recapture helper blueprint
- 1 Sky shadow material
- 3 Skydome and Skysphere meshes
- 10 tilled clouds textures 512×512 with encoded four depth traces on channels
- 1 Moon normal map texture 512×512
- 1 Background equirectangular texture 2048×1024 (R-stars, G-Background clouds, B-Distortion clouds)
- 8 Color curves for simulating the day and night on Earth
- 12 presets of weather (sunny, cloudy, foggy, snowy, smoky, stormy, clean, rainy, half sunny, gloomy, blizzard, overcast)
- 3 time of day presets
- 3 Landscape backgrounds textures 4096×1024 for skydome (depth encoded as alpha)
- 1 Landscape background textures 4096×2048 for skysphere (depth encoded as alpha)
- 4 example static cubemaps for default skylight
- Time of day exposed to the cinematic, editable sky in the sequencer
- Added UVHorizon parameter that changes the horizon from flat to round
- Time Cycle Duration - useful you need to set day-night cycle duration.
- Added the lightning effect with clouds scattering and skylight intensity
- Changed background clouds color from additive to translucent (more customization options)
- Updated weather presets and color curves
- Added directional light fog scattering color
- Added moon scattering
- Material cleanup
- Documentation moved to WordPress
- Added new example map (stylized anime, event-driven lighting and weather)
Version 1.5 (16.06.2018)
- Added time of day presets system and example color presets
- A second configurable layer of clouds (optional because uses 50 instructions)
- Added versioning (current version 15) - my future changes in the system should not affect your current state of work since now ;]
- Parameter: UseExternalSunDirection - allow to use direction calculated in external system.
- Fixed clouds movement on the ground when sun direction is changed manual.
- New weather preset “WP_Stylized”
- Added flag for syncing moon and sun rotation around the planet
- Fixed replication of recapture skylight, shadow casting, and directional lighting
Version 1.4 (26.03.2018)
- Added replication of sky parameters and presets. (server changes the weather)
- Added Clouds Bloom parameter.
- Added Switch for sky transformation world/local space. Sky can be properly attached to objects now.
- Fixed moon transformation (360 degrees = 1 day)
- Added MoonVisibleDuartion parameter
- Added SunVisibleDuartion parameter.
Version 1.3 (17.01.2018)
- optimization: UV calculations moved to vertex shader (10 instruction less in main shader no quality loss)
- support for precomputed blended cubemaps
Version 1.2 (03.12.2017)
- casting clouds shadow on ground
- supported change between skysphere/skydome
- 10 additional textures of clouds
- lens flare (experimental)
- additional moon movement
- tone mapping added for Mobile ES2 (same look like on PC)
Version 1.1 (17.11.2017)
- Static world backgrounds interleaved with clouds (mountains, city, big planet, ring).
- Sky light interaction recapture frequency based on time and preset change
- Height fog interaction (color change)
- Sun eclipse and stars scintillation added
- Stars/Moon Brightness multipliers added
- Lighting on scene based on preset
- Time control function (set time with transition duration and ease function)
- Presets can change scene lighting, it's dark when we select cloudy weather
Version 1.0 (08.11.2017)
- The first version of the package released.
Remember that your positive rating and comments are motivating me to do the next update.
The easiest way to start working with Fast Stylized Procedural Sky is to For start watching the tutorial that shows how to use basic parameters of the blueprint:
- Unpack FastStylizedProceduralSky into Content in your project.
- Open project and you should see a FastStylizedProceduralSky package with the following content:
- Drag & Drop BP_FastStylizedProceduralSky on your scene. (Remember to remove the old sky that you used before on your scene you don’t need this anymore)
- Select FastStylizedProceduralSky blueprint that you just put on the scene and set up lights in the external tab:
Actors Sun Light External directional light used for lighting from the sun. The system will automatically change the direction and color of this light during the time update. Moon Light External directional light used for lighting from the moon. The system will automatically change the direction and color of this light during the time update. Sky Light External skylight used for global lighting on the scene. System recapture during the update. The frequency of recapture can be changed by. Height Fog External fog used for cover the scene by fog. System changes the color of fog based on time of day.
- Press play and enjoy the show.
Remember! Only movable light can be changed by Fast Stylized Procedural Sky.
Remember! Enable dynamic lighting (no lightmaps) in projects settings to fully exploit the abilities of the time of day cycle.
Fast Stylized Procedural Sky is divided into a few basic systems that can work in cooperation as well as in separation either systems can stay inactive for manual customization.
|External data||Constant external variables that are not managed by the system. Externa data can be modified during gameplay.|
|Time of day system||Responsible for the passage of time calculations celestial movement and sampling curves of colors over time-based on sun height. Can be updated based on curves or presets.|
|Weather system||The preset system manages the weather preset selection and allows interpolation between all presets.|
|Cubemap capture||Allow capturing cubemaps of the sky. Usable optimization to avoid update the skylight dynamically.|
All default properties of Fast Stylized Procedural Sky blueprint are editable only if Weather Preset System and Time of Day System is disabled. Three steps are needed to disable both systems:
- (Time Of Day) Use Time Of Day Curves = false,
- (Time Of Day) Time Of Day Change Mode = BlueprintDefaults
- (Weather Preset) Weather Change Mode = BlueprintDefaults
From this time all default properties of the sky can be manually customized for specific weather and time of day conditions.
External options in Fast Stylized Procedural Sky blueprint allows stylizing final result for wide range types of games.
|Saturation||Changes in the color saturation of the sky allow making the scene more colorful.|
|Clouds bloom||Changes the emissive of clouds.|
|UV Scale||Scales UV coordinates of clouds. Used for changing the size of clouds on the sky.|
|UV Layers Size||Scales UV coordinates of separate clouds layers (xy – first layer, zw-second layer)|
|Clouds Layer1||The texture of clouds in the first layer.|
|Clouds Layer2||The texture of clouds in the second layer.|
|Horizon Tilt||Tilting of horizon color into the sun direction. Better color gradient when the Sun is near the horizon|
|Wind Force||Multiplies speed and direction of clouds by the force of the wind|
|Sun Radius||Size of the sun.|
|Sun Shine||Shine effect around the sun.|
|Sun Max Altitude||Max vertical angle of the sun in the middle of the day.|
|Sun Azimuth||The direction where the sun appears on the horizon.|
|Day Duration||Allow changing the day duration. Depends on Sun Max Altitude (better results is lower than 90)|
|Moon Radius||Size of the Moon.|
|Moon Shine||Shine effect around the moon.|
|Moon Roll||Moon rotation in a roll.|
|Moon Rotation||Rotation of moon direction on the sky. Yaw Azimuth, Altitude, and Zenith.|
|World Rotation Speed||Background stars and clouds rotation in time.|
|World Layer Texture||The texture used as the background landscape. Texture requires encoding depth value (distance from the camera) in the alpha channel.|
|World Layer Fog||The landscape layer hides in the fog.|
|World Layer Depth||Scale depth in the landscape layer allows for interleaving with clouds.|
|World Layer Color||Landscape world layer color multiplier.|
Fast Stylized Procedural Sky supports casting shadows from the sun on the ground.
|Grounds Shadow Material||Shadow material is mapped on the ground by light function in directional light. Example material instance in package MI_DefaultGroundShadow.|
|Ground Shadow Scale||parameter scales the UV mapping of shadow.|
|Ground Shadow-Soft||Blurs the edge of clouds shadow on the ground.|
This effect is implemented based on Light Function material that unfortunately is not supported on mobile.
Time of Day system
The time of day system is responsible for the passage of time calculations celestial movement and sampling curves of colors over time-based on sun height.
|Time Of Day||The current time of day in hours. Range: <00:00-24:00>|
|Time Change Speed||Speed of change the time in time day cycle in minutes. 1 real second = 1 minute in the game. Set 0 to stop the time.|
|Moon Change Speed||Speed of change the moon direction on the sky during the update. Yaw Azimuth, Altitude, and Zenith.|
|Use Time Of Day Curves||Activates TimeOfDay curves. When enabled overrides default parameters of blueprint|
|Time Of Day Curves||List of curves used by the system to override colors in curve mode.|
|Time Of Day Settings (Struct)||The current list of settings precalculated from preset or curves.|
|Time Of Day Preset List||List of presets used by the system to override colors in preset mode.|
|Time Of Day Preset Change||Configuration of the preset system for time of day.|
Time of day system changes a number of parameters of the sky based on time of the day like sun color, clouds colors, fog colors etc. The system can be updated in two modes:
- curve system
- preset system
Both modes exclude each other to change between these modes use flag Use Time Of Day Curves. Here is the list of parameters that can be controlled by each of the systems:
|Time Of Day Settings (Struct)|
|Sky Upper Color||Upper color of the sky|
|Sky Lower Color||Lower horizon color of the sky. Horizon falloff intensity in the alpha channel|
|Clouds Upper Color||Color of Upper dynamic clouds|
|Clouds Lower Color||Color of Lower dynamic clouds|
|Clouds Secondary Color||Clouds color multiplier for the second layer.|
|Clouds Background Color||Color of static background layer of clouds|
|Sun Color||Sun color. Alpha channel stores the intensity.|
|Moon Color||Moon color. Alpha channel stores the intensity.|
|Stars Color||Stars color. Alpha channel stores the intensity.|
|Fog Color||Height fog color.|
Time of day curves
List of all Time Of Day settings can be controlled by curves. The curve system is active only when Use Time Of Day Curves = true. All defined curves are sampled based on the sun height. Mapping from time to sun height:
|Time of day||Sun Height (curve sample position)|
If the curve is not defined in the Time Of Day system then sky uses the default parameters from the time of day preset.
A simple example that shows how to change the horizon color using the time of day system:
- Find curve to change in sky blueprint: Blueprint->SkyLowerColorCurve
- You can edit the existing C_SkyLowerColor or duplicate the curve and replace a value of the SkyLowerColorCurve parameter in the blueprint.
Time of day presets
Basically the preset is a collection of predefined Time Of Day parameters that can be loaded to the sky. The preset system allows interpolating between these parameters and load custom settings for specific conditions. Time of day presets library can be found in TimeOfDay directory there are three basic examples presets BloodyMidnight, BlueNight, Pinky.
|Time of Day Preset System|
|Time Of Day Curves||Determines whether the system uses curves or preset systems to update the time of day. Set false to use presets.|
|Time Of Day Settings||Currently loaded settings of time of day.|
|Time Of Day Preset List||List of presets from the library to use in the project.|
|Time Of Day Preset Change||Defines how the preset will change during the game.|
Time of day preset system is active only when Use Time Of Day Curves = false.
|Time of Day Preset Change|
|Selected||Index of selected preset from the list. Should be smaller than the length of the Preset List.|
|Reload Selected||Reload checkbox/button. Click to reload the selected preset and see results in the UE4 editor preview.|
|Transition Func||Transition type of interpolation between the time of day presets.|
|Speed||The speed of interpolation to the next preset.|
|Duration||Duration of transitions between presets.|
|Mode||Defines how the preset will change in time. (more details about modes below)|
|Change After Time||How long the system will way to automatic change to the next preset.|
There are multiple methods to activate preset in the project that can be defined in Change Mode:
|Preset Change Mode|
The Time of Day Preset System is disabled and sky uses properties from the blueprint. In this mode, the designer is able to change each parameter manually in blueprints. There are few functions that can be used for steering presets in this mode:
|Selected Preset||Preset System uses an index of preset that I currently selected. In this mode, the designer is able to manually select the preset used by the game.|
|Random On List||In this mode, the preset is automatically selected from the list by random function after a time defined in Change After Time attribute.|
|Next Preset On List||In this mode, the preset is automatically selected by jumping to the next preset on the Preset List. You can prepare your chain of presets that changes during the day.|
Adding a new preset to the library
The library of time of day presets can be easily extended. Few steps are needed to create and customize a new preset:
- Open Select TimeOfDay directory and preset that will be extended.
- Click right and select the option Create Child Blueprint Class.
- Set the name and attributes in default properties of the newly created class.
- Now preset is ready to use. Add preset to Time Of Day preset List in Fast Stylized Procedural Sky blueprint and start using as described in the section dedicated using a standard library of preset.
- There is no preset editor. Just edit preset settings in the blueprint on the scene. Results of your changes you will see in the scene preview. After preset is finished just copy preset settings group and paste to your preset class.
Preset settings are stored in structure so you can copy current settings of the sky to your new preset. Change in preview and then copy to preset – It is the easiest way to tweak parameters for preset. The other method to updating the presets is by modifying a preset that is set as “selected” and click “reload selected” after finishing the modifications to see the result.
Fast Stylized Procedural Sky has external functions that allow controlling the time of day for example from the level blueprint.
|SetTime||Changes the time of day with interpolation at specific duration.|
|SetTimeOfDayByIndex||Sets the time of day preset by index.|
|SetTimeOfDayExternal||Sets the time of day external preset.|
|SetTimeOfDayChangeMode||Sets the time of day change mode and duration.|
Fast Stylized Procedural Sky comes with a library of presets for different types of weather: cloudy, sunny, clean, rainy, stormy, foggy, overcast, half sunny, glowy, blizzard, stylized. Each preset is just a list of predefined parameters that will be loaded to the sky after activation. The preset system manages the weather preset selection and interpolation between them.
|Preset system parameter|
|Weather Preset List||List of presets from the library to use in the project.|
|Selected Weather Preset||Index of selected preset from the list. Should be smaller than the length of the Weather Preset List.|
|Reload Selected||Reload checkbox/button. Click to reload the Selected Weather sky preset and see results in the UE4 editor preview.|
|Weather Change Transition||Transition type of interpolation between weather states.|
|Weather Change Speed||Speed of interpolation to next preset.|
|Weather Duration||Time to start another preset based on current change mode.|
|Weather Change Mode||Defines how the weather will change in time. (more details about modes below)|
There are multiple methods to activate preset in the project that can be defined in Weather Change Mode:
|Weather Change Mode|
Weather Preset System is disabled and sky uses properties from the blueprint. In this mode, the designer is able to change each parameter manually in blueprints.
|Selected Preset||Weather Preset System uses the index of preset that is currently selected. In this mode, the designer is able to manually select the weather used for the gameplay state.|
|Random On List||In this mode, the preset is automatically selected from the list by random function after a time defined in Weather Change After Time attribute.|
|Next Preset On List||In this mode, the preset is automatically selected from the list by the incrementation function. You can prepare your weather cycle chain that changes during the day. Example:
Fast Stylized Procedural Sky system can be configured to changing presets by events from the game. There are a few functions that can be used for steering presets:
- Set Preset Change Mode – Allow to change mode and duration of preset that is used in modes other than Blueprint Default.
- Set Preset External – Sets the preset from the library. Transition duration is how long the weather will be in transition.
- Set Preset External – Sets the preset from the list of presets by index. Transition duration is how long the weather will be in transition.
Adding a new preset to the library
Sometimes the game requires unique conditions for the specific situation in the game. The library of presets is expandable and weather designers can create their own presets and share parameters with other users of the system. Each preset is defined as Blueprint Class that extends from WeatherPreset class.
Creating a preset:
- Select preset that will be extended.
- Click right and select the option Create Child Blueprint Class.
- Set the name and attributes in default properties of the newly created class.
- Now preset is ready to use. Add preset to Weather preset List in Fast Stylized Procedural Sky blueprint and start using as described in the section dedicated using a standard library of preset.
- There is no preset editor. Just edit weather preset settings in the blueprint on the scene. Results of your changes you will see in the scene preview. After the preset is finished just copy the weather preset settings group and paste it to your preset class.
|Weather preset settings|
|Clouds Scale||The scale of clouds layers multiplier. Resize clouds per preset|
|Clouds Density||The density of clouds. Covers cover of the sky by clouds|
|Clouds Harness||The hardness of clouds color layer.|
|Clouds Translucent||Translucency from cloud to background|
|Clouds Blend||Scale smooth blending of clouds edge|
|Clouds Distortion||Distortion of clouds color layer|
|Clouds Scattering||Sun scattering through the clouds|
|Clouds Upper Brightness||Light intensity in upper parts of clouds|
|Clouds Lower Brightness||Light intensity in lower parts of clouds|
|Clouds Ambient||Impact of sky color on clouds lighting|
|Clouds Shadow Size||Size of shadow under the clouds|
|Clouds Soft||The softness of shadow under the clouds|
|Clouds Background||Background clouds color intensity|
|Clouds Horizon Density||The density of clouds on the horizon|
|Clouds Horizon Alpha||The fade of clouds on the horizon|
|Clouds Horizon Scattering||Scattering of clouds on the horizon|
|Horizon Falloff||Falloff of horizon color|
|Wind Force Scale||Wind force multiplier. Controls speed of clouds per preset|
|Wind Dynamic||Scales relative movement between layers of clouds|
|Wind Dispersing||Rotates relative movement between clouds layers|
|Skylight Brightness||Sun brightness multiplier|
|Second Layer Color||The color multiplier for the second layer of clouds.|
|Second Layer Alpha||Translucency multiplier for the second layer of clouds.|
|Second Layer Scale||Scale multiplier for the second layer of clouds.|
|Second Layer Wind||Wind multiplier for the second layer of clouds.|
Fast Stylized Procedural Sky supports new lightning system since update 2.1. The example of using a lightning system is presented in the demo map Demo/Maps/AnimeLightningMap.
Basically, the BP_LightningController actor is responsible for controlling attributes like lightning source location/rotation/area/frequency and update of sky settings.
Step by step explained how to use BP_LightningController:
- Place BP_LightningController on your map.
- Setup the location of the actor to location above the scene (X=0.000000,Y=0.000000,Z=50000.000000). The volume of the actor presents the area of the lightning effect.
- Change the External Parameter Sky to BP_FastStylizedProceduralSky actor from your map.
- Select BP_FastStylizedProceduralSky to find Sky Material and open. Switch the UseLightning value in the material to true.
- Run the game I watch the lighting effect.
The BP_LightningController is automatically active on the map but can be activated by events as well. Set the activation loops value to 0 to control the activation by yourself. Then use Activate and deactivate events in your game to run the effect during the storm.
Lightning Fast is powerful combination materials and blueprints that implement a wide range of realistic and stylized electricity effects this external package can be easily integrated with Fast Stylized Procedural Sky.
Only a few steps are needed to integrate Lightning Controller with lightning Bolt from Lightning Fast:
- Drag and drop LightningFast/Blueprints/BP_LightningBolt blueprint n the scene where Lightning Controller works.
- Scale the lightning bolt actor to be visible from a large distance: Try to use Scale (50,50,50)
- Set Activation Loops in Lightning Bolt blueprint to 0. It will disable auto-activation and allow you to control the lighting effect using a controller.
- Implement your lightning effect trigger by binding to OnActivated delegate from Lightning Controller.
After these few steps lightning bolt effect will be shown at location and rotation randomized in Lightning Controller just after the lightning activation.
Lightning Fast use case is just an example, you can play sound or even spawn other effects/particles using activation event.
The Skylight actor captures the distant parts of the scene and using result data to compute lighting. This actor can be very well integrated with Fast Stylized Procedural Sky. There are two methods to update the sky during changing the weather and time:
|Dynamic||Skylight.SourceType = SLS_Capure_Scene||The system captures the scene lighting every few seconds depending on the time change and preset change. Try to avoid this method because it is very slow|
|Precaptured||Skylight.SourceType = SLS_Specified_Cubemap||Uses precalculated static cubemaps that will be interpolated during the time change.|
Fast Stylized Procedural Sky allows configuring skylight update to minimalize the costs.
|Sky Light||External skylight scene actor used for global lighting on the scene. System recapture during the update. The frequency of recapture can be changed by.|
|Sky Light Recapture Delay||The time between updates of the skylight. A bigger value makes that system run faster but the frame rate will jiggle every time the update is evaluated.|
|Sky Light Static Cubemaps||
List of cube maps used as precalculated (fast) skylight blended in time. The time between midnight to midday is divided into a number of cubempas on this list. The first cubemap corresponds to midnight and the last cubemap is midday.
|Sky Light Cubemaps Time Driven||If true use time of day to select cubemaps. When false uses the height o the sun to select cubemap.|
Using sky spheres
Fast Stylized Procedural Sky supports rendering on skydome as well as sky sphere. Skydome is set as the default option. It is required to do a few important steps to switch sky into Skysphere mode:
- Switch material to sky sphere UV: Open SkyData/IM_DefaultSky and change UseSkydomeUV = False.
- Set the sky sphere mesh in the blueprint:
Open BP_FastStylizedProceduralSky and find SkyMesh component.
Change StaticMesh=SM_Skysphere or SM_SkysphereFlat (Flat is deformed but looks better with height fog).
- Change world layer texture used on the sky to the sky sphere:
Additional material effects
There are few features in Fast Stylized Procedural Sky that are disabled in default material. It is because not all users need these advanced options and hitches on efficiency are not good enough to enable all of them by default.
To change these parameters you can create your own instance of sky material from M_BaseSky as well as modify SkyData/IM_DefaultSky. Reference to sky material instance can be set in sky blueprint parameter: External->SkydomeMaterial.
|Flare Experimental||Enable experimental flare effect (about 20 additional instructions in the shader).|
|Use Clouds Texture1||Force sky to use only one texture of clouds during sampling. Good for mobile because you will get one free sampler after enabling this option.|
|Use Skydome UV||Use this option to switch mapping to skysphere mode (false). (Read how to using sky spheres in paragraph 4)|
|Use Star Scintillation||Enable stars blinking in the sky.|
|Use Sun Eclipse||Sun can be covered by the moon when this option is enabled.|
|Use World Layer||Optimization. Whether world layer texture should be used on the sky. (optimization).|
|Use WorldSpace Rotation||Optimization that forces shader to use world space rotation of sky mesh in calculations of sun/moon and clouds.|
|Use Clouds Bloom||Fake bloom effect on clouds. Useful for mobile.|
|Use Multilayered Clouds||Activate the second layer of clouds. It’s very expensive (over 50 additional instructions).|
Shading of the Moon is always calculated based on the position relative to the Sun it is hard to set up at first but results are very realistic. This is automatic so there is no need to care about the direction of shading on the Moon. There are a few important parameters that allow setting the moon movement:
|Moon Change Speed||Rotator that describes how many degrees the moon should move during one day. A realistic model should be about 13 degrees per day.|
|Moon Synced To Sun||Force synchronization between the Moon and the Sun. In realistic mode, it should be checked as true.|
|Moon Rotation||The start position of the Moon in the sky should be set at midnight.|
Questions & Answers
How to switch on/off the background mountains
This feature can be disabled for optimization so you will have to switch it in the material instance used by the sky.
- Select the Sky blueprint on the map
- Find Sky Material used by blueprint open.
- Switch UseWorldLayer=true/false.
I Have a question …
Cool! You can always ask! I’m ready to support and add some new useful features to my product. Feel free to comment and rate my package too 🙂
Can I use skysphere instead of skydome?
Skysphere is supported by sky but you need do some simple steps to start using this feature. Check “Using skyspheres” in the documentation.
Is there any support for stars blinking?
Open the material instance that you use in the sky (by default M_DefaultSky) and change flag:
Use Stars Scintillation = True
This option is activated by static switch because costs additional calculations on material that some users don’t need and the author is not satisfied with final effect so the feature is still under development.
Why the sky appears locked-in-place even though the the rotation of blueprint has changed?
The sky is calculated in world space for optimization but this is optional and can be changed.
MI_DefaultSky->UseWorldSpaceRotation = false (fixes material rotation)
BP_Sky->UseWorldSpaceRotation = false (fixes rotation of clouds shadow mapped on ground)
About 10 shader instructions lost on this operation. Use this options only when you need.
Why there are two materials of sky instance after update?
I've changed the name of "M_DefaultSky" into "MI_Default" to stay consistent with Assets Naming Convention - Epic. M_DefaultSky Should not exist in the project anymore.
I've started to use parameters collections in the new version and old parameters are not updated anymore that is why the old material is incorrect. Best way to fix this is to remove the package from the project and download the current version of the FSPS again.
If you created any presets or day-night curves you should copy them before this operation and paste into your project. It should work fine.
Why my scene is black on mobile?
Probably you have used clouds shadow material on your blueprint. This functionality is not supported by UE4 mobile rendering. There is no function to check platform specific settings in UE4 to automatic disable this feature so it needs to be disabled manually. If you are working on mobile just clear ground shadow material.
How to achieve more realistitc effect?
The sky system is non-realistic/nonphysical based but there is a lot of options to tweak the results to make it look reliable.
Can I fly throw clouds? Is it volumetric ?
Nope. The material is not based on volumetric principles, the rendered sky is flat with the illusion of depth based on shading so the best results you will get from the ground.
13 thoughts on “Fast Stylized Procedural Sky”
Just wanted to let you know that replication is a bit on the heavy side. 14,000 under net stat. I think its because your replicating pretty much everything. You can just replicate the movement and the procedural sky bp. Then where you have the server/client split out get rid of the branch server after event tick. Take out all of the replicated vars from all functions and only set time of day to replicate. This var drives pretty much every function anyways. I’ll have to study it some more to give additional feedback but initially after testing I can tell you that so far it seems to keep the sun/moon in sync for clients and dropped net stat down to 5,000
Yes, you have a right it will work properly in most cases. There is a scenario where users can change parameters of the sky by external blueprints and it will be not replicated properly after this changes.
Anyway, I will do optimizations that you suggest:)
Replication Fix: (because everything dealing with weather that may change calls the set preset by index and the change is made there it should work with every switch on presetselection.)
1) Go through the entire blueprint and disable replication on all variables. 2) Set net update freq to 5. (limit the rate the server reps ticked vars / the client will still process its ticks and do its own calcs.) 3) Search for if server and bypass them all. (make clients do work) 4) Find time of Day and Selected Weather Preset and set to replicate. (these two drive the entire bp) 5) Find “Change Weather” Function Add is server branch –> True ->set Selected Weather in side of the “set preset by index”. False bypass set so client can still process weather settings (keeps from having to rep the struct)
Thanks! I will update FSPS as soon as possible 🙂
Is there a way to drive the time of day into the bloodmoon settings every so many days? I guess i could add a var to keep up with days (byte) that i add into every 24 hours in the UpdateDateTime function. Then if the day = 7 i could change the bool for Use Time of Day Curves to false and set the Preset to bloodmoon. The other option would be to swap the curve data on the fly for every 7 days to match the bloodmoon data?
I would recommend swapping the curves. It is better to stay in one TimeOfDay mode because the transition from TimeOfDayCurves=false -> true is not supported.
You create prepare presents for the full time of day cycle and then build the list of presets for 7 days – it will work clean and automatically without counting days 🙂
Hi Krystian, I tried changing the skydome to a skysphere by following the steps you mentioned in one of the paragraphs but it doesn’t look the way you’d expect. It seems that the bottom half of the skysphere just mirrors the top half, resulting in quite a weird look. Also, there is a dark outline in between the 2 halves of the skysphere which makes it look really strange.
Hello! sorry for the late response. I’ve just checked the skysphere and it works fine. You should change the mapping type in the material and change the texture. I’m working on the update of package to version 2.0 and just prepared the example map to present the sphere mapping configuration for you. It should be available in two weeks.
Are there any plans to add things like custom lens flare particle to the sun and a height control for the moon?
You can control the moon position right now. Additional flare is problematic because of clouds masking but I will try to find some solution for that.
Is there a way to darken the night a bit on the default curve? Studying the time of day curves it’s really difficult to understand which curve is controlling what time of day.
I found it! Haha it’s a combination of fog color, sky and clouds