Fast Stylized Procedural Sky

“Morning/Day/night/etc. presets (to be able to create skies that match lighting scenarios and load particular preset when lighting scenario is loaded/switched) ?”
this

and better looking weather + real rain.

We have already bought the package, couldn’t wait :wink:
Thanks for your Update! (replication)

But there are two, maybe three, things we would like to know:

-The Moon-Light does not rotate, the shadow always stays at the same place.
-At 12 pm the sun is shining directly from top to bottom.
Normalmaps and Buildings are going to look not that good anymore at that angle.
Is it Possible to add an extra rotation like in the real World? So the Sun is always shining at least a small angle?
-We thought we can disable “Time Of Day Curves” and use a “Time of Day Preset” System like the weather got.
I think “Mellnik” meant the same.
Would it be hard to implement something like this?
Because a preset System for the Time of Day System would be extremely effective and we are looking for months to get something like this.
We would even pay extra for this function!

Thanks! :smiley:

It is really hard to implement without a huge loss of efficiency in the material. I will try anyway do something related to this feature.

It’s already implemented in this system.

To move the moon in time you need to change Moon Change Speed parameter :slight_smile: I see now that value should be big because it’s divided by 60, it looks like my mistake that should be patched very soon :(.

Parameter Sun Max Altitude is fixing this.
If it’s not enough then you can even implement your own sun movement and change **SunDirection **value :slight_smile:

It is a great idea. I have to do this! It’s not hard but time-consuming so I can probably deliver this in the next month :slight_smile:

Thank you for these concepts of changes it really helps!

Hi there! On the latest version, simulating a dedicated server in PIE, I was getting the following warning spammed during play:

LogRep: Warning: FRepLayout::CallRepNotifies: Can’t find RepNotify function None for property SkyUpperColor on object BP_FastStylizedProceduralSky_206.

I changed the SkyUpperColor var from replicated to repnotify and the warning seems to have gone away. Not sure if that’s the best fix, but just leting you know. :slight_smile:

Thank you for your investigation. I will take a closer look and send fix this as soon as possible

Meanwhile, please tell me:
Which version of UE4 do you use?
Do you have the same warning on Fast Stylized Procedural Sky example map?

Currently, I can’t reproduce this problem that makes this warn harder to fix.

Could you try to change “SkyUpperColor” back to “replicated” and check if warning still exist?

Ahoy! Sorry for the late reply, using source-built 4.18.2. Switching it back to just replicated has not brought the problem back! So perhaps it was something weird on my end.

Finally, I saw the same behavior on the released package and it looks like some weird cache/save bug in the blueprint. The attribute was looking for replication function that didn’t exist and shouldn’t be used. Fixed and updated the package (version 1.41) should be ok now :slight_smile:

Thanks!

Do you have an example level of this that I could play with to learn how to do more stylized skies with this system? And/or will there be some options added along these lines as a feature? Thanks

You can achieve the same effect by changing weather settings:

Use cloudy sky weather (Select weather preset = 1) and click reload selected preset parameters in weather preset.

Now change parameters of weather:
CloudsHardness = 8
CloudsShadowSize = 0.22
CloudsShadowSoft = 2.0

If you need the hard effect on edges then change CloudsHardness to bigger value :slight_smile:


Alternative solution: Dropbox - File Deleted
Copy this preset to your project “Content\FastStylizedProceduralSky\WeatherPresets/WP_Stylized” and use according to documentation :slight_smile:

I will add this stylization as new preset in the next version of the package, but can’t tell you when it will be because I’m still working on “time of day” presets.

Hello, I recently picked this up and it looks great, but I have a question:

After deploying to my Gear VR, I noticed the procedural clouds look really pixelated compared to the preview. Any idea what could be causing this? I wish I could take a photo but well… its VR.

Let me know what else I am missing. Thanks!

That did the trick, thanks

Hello, sorry for the delayed response.

To be honest hard to say how to fix this, could you explain better what “pixelated” means to you may be filtering is broken? Do you have the same effect in the editor when using a mobile emulator?

You are using the Android mobile phone in your GearVR headset so maybe you could take a screenshot? https://www.greenbot.com/article/282…oid-phone.html

My first shot would be that its something related to sampling textures on mobile.

  1. Try to enable UV calculation in the vertex shader (it’s less accurate but faster and can help to remove dependent sampling in pixel shader)
    MI_DefaultSky.VertexShaderUV=true

  2. Open textures used in your blueprint as CloudsLayer1 and CloudsLayer2. Change the filtering mode from to trilinear to bilinear)

Sometimes this kind of bugs can be related to the device, did you tried to run this game on another phone?

Re using this with World Composition, any experiences or practices to share? Should I move the skydome relative to how the player pawn moves? Thanks

It’s good practice to transform skydome actor to the camera position. In some cases, you can achieve the better effect by moving only on X and Y axis, the Z stays constant.

If you have different settings for each map then you can use SetPresetExternal/SetPresetIndex and SetTime to do some transition.

I’ve never tried this system with World Composition but I will think about better support for this feature. Thanks! :slight_smile:

What are your recommendations on getting a realistic day/night cycle? I can’t seem to get the sun and moon to sync up correctly. It seems like it was working as expected when I first purchased this and checked it out a while ago, either in 4.18 or before your patch, but I think World Rotation was different? I remember after slowing down the cloud speed, I had to also slow down the world rotation, but that’s set to 0 with World Rotation Speed at 1.0 by default now. I don’t remember what it was before.

What’s happening is after the sun goes down, the moon just sort of appears out of nowhere and when it goes down, the terrain fills up with these crazy flickering lines and shiny/wet looking spots until the light completely passes over the terrain. Then after the next sundown, the moon doesn’t appear at all. I’ve spent several hours of trial and error and playing around with the moon rotation speed/angles but nothing seems to produce a typical day/night cycle. The angle seems strange no matter what I try too, like it’s following a normal angle until it gets close to the terrain and then sort of turns and starts skimming along the edge.

I increased the Time Speed Change so I wouldn’t have to wait so long to watch it and I know I’ll need to change the Moon Change Speed again when I bump that back down to something more realistic. Is there a good formula to use to get all of these settings to compliment one another, to achieve a realistic earth-like day/night cycle?

Also, can you recommend a good way of manually switching between weather presets from C++ while still retaining the Weather Change Duration?

This is probably a horribly inefficient way of doing this but it seems to work…

Just checked “World Rotation Speed”… and it is not working correctly in current version :frowning: When I was changing blueprint for on replication I have moved code related to World Rotation Speed and forgotten to connect DeltaTime after that. The fix should be available soon as version 4.2.

What do you mean by ‘sync up correctly’ in the realistic model of sun/moon on earth these two astronomical bodies are not synced together. The Moon makes a complete orbit around Earth with respect to the fixed stars about once every 27.3 days and realist movement of this Moon is really complicated. I’ve tried to implement realistic model but it didn’t work very well for games so decided to implement the simplified model.

Show me some screenshot or video it will be easier to understand and fix this.
Remember that the Moon is not appearing from anywhere, when the atmosphere is dark you can see the light from the sun reflected by The Moon - it’s closest to a realistic model I could get.

Probably you can’t see the Moon because you set it by MoonChangeSpeed and Moon moved to the opposite side of earth near the sun and it is invisible.

I see the problem now.

In version 4.2 i’ve added small change for you. After the update setup your blueprint like this:

  1. Set Time of the day at midnight (0:00)
  2. Set up where the Moon should be positioned at midnight
  3. Set rotation speed MoonRotationSpeed
    MoonRotationSpeed.x - can be anything because it is the horizontal movement, the moon will never disappear.
    MoonRotationSpeed.y - degrees per day, if you want full cycle day/night then setup 360’ degrees.
    MoonRotationSpeed.z - degrees per day, if you want full cycle day/night then setup 360’ degrees.
  4. Set Time of Day back as you need.

In version 4.2 you will be able to force visible moon always on the sky by using MoonOverHorizon= true but for me, it is a temporary solution.

You can use delegates or implement an interface that will change whatever you want.
You can use SetWeatherPresetByIndex or SetWeatherPresetExternal to change the preset - if you don’t need to change time duration then set transition time parameter to -1 (in version 4.2).

I believe the new version of Fast Stylized Procedural Sky will fix problems related to moon direction. I’ve sent you link to the new version in PM, please check if everything works like you wish.

Instead of moving Actor every frame just use AttachToActor with disabled relative rotation.

I understand how the sun and moon work, lol. By syncing up, I just meant having the sun out and bright during day and moon and stars out and darker at night, in reference to time, something I was having trouble achieving with the BP settings.

Thanks for the quick response. I’ll give this a try and let you know how it turns out.

Moving the X and Y works fine, thanks

Hi. I started using the system for the first time tonight and its excellent except I can’t seem to find a way of making the night darker, its as if the skylight is turned up too much as it has more affect on distant terrain? Turning the moon shine off helps with the upper sky but what about the ground? Also the moon does not appear to be moving?
Regards