Fast Stylized Procedural Sky

Yes, the moon takes about 27 DAYS to orbit. 27 DAYS = 27 spins of the earth. 1 spin = 1 Day/night
The movement of the moon itself affects moonrise time, position and the relative angle from the sun (that’s why the full moon appears once a month).
If you want to see these things, you should record the moon’s rising position every day for a month. The moon’s rising position will move slightly every DAY. It’s hard to recognize to normal people.

On the other hand, the earth spins once a day. We are on the earth. The sun, moon, stars move at the (almost) same speed **when we see them from the earth. **Think about a person on a turning swivel chair in a room. The objects in the room and everything will move at the (almost) same speed when he sees them from the chair. That’s why the sun and moon are synced when we see them.

If you want to make the moon’s 27 days movement, you should separate it from day/night movement, and it’ll be complicated. I don’t know the moon’s 27 days movement is really necessary for games.

Sorry for this lengthy explanation. No offense really.

Attached the image. Server looks good. I guess some brightness values are not replicated, or not assigned to the lights.

Now I understand what you mean by synced thanks for the explanation :slight_smile: I will try to implement this properly.

That is strange. Did you notice the same problem on demo map? Checked for sure and it looks like the light color is replicated properly.
If you could help me to reproduce bug then I will fix this easily.

@zrael23

One small modification needed in the blueprint to sync moon and sun.
Find function called “UpdateCurves” add rotator:

I feel that controlling the moon is becoming harder after all modifications so I’ve decided to rewrite this functionality from scratch witch on visualization of the solar system.

The problem is fixed when the skylight actor’s Source Type is set to ‘SLS Specified Cubemap’. I didn’t investigate sufficiently, but it works.:slight_smile:

I made the moon simple as needed for my game, but the accurate moon is also great. Thank you for your good work.

I agree with zrael23 on this one. For a game, I think a more simple approach, moon at night, sun during the day, would be sufficient. I always worry about accuracy when I’m developing a game but I’m when playing a game, I find that I rarely pay attention to such details. Besides, not every game is necessarily based on Earth.

Yes, it’s true. That is why I’m trying to do something flexible to adjust parameters to conditions on other planets than on Earth. The configurable solar system should be sufficient but I think that I have too many features to polish in version 1.5 so this one needs to wait :slight_smile:

Thank you once again kind sir … tips hat:slight_smile:

I’ve put an object in your default scene. The side which is not directly lit by the sun casts way too dark shadows. Different intensities don’t seem to help.
Any idea? Thanks.

dark.PNG

Try to change the parameters of actors:
Skylight: like intensity, source type.
MoonLight: Intensity
SunLight Intensity

Honestly, I can’t see anything on this screen it is too small probably forum script changed image size and it’s hard to say where is the problem.
Could you send me the mesh that you put on the scene?

I’ve sent you a private message.

The launcher shows me a new update, what has changed?

By the way, Moon and Sun renders at the same time even when you cannot see either of them. This is a problem on huge landscapes. Could you please investigate this?

Version 1.5

  • Added time of day presets system and example color presets
  • Added a second configurable layer of clouds (optional uses 50 instructions)
  • Added versioning- my future changes should not affect your current state of work ;]
  • 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 movement on the sky
  • Fixed replication of recapture skylight, shadow casting, shadow casting and directional.

Sun and moon intensity is changed dynamically during the day/night depends on the direction and height and weather preset. I will take a look on huge landscapes but what kind of problem do you mean?

Great update, thanks for your work!
The “ReloadSelected” button in Time Of Day Preset Change doesn’t seem to work.
When hovering “Mode” it shows Weather Preset System. Guess it should say Time Of Day Preset System.

fastsky.JPG

It’s bad for performance. For me disabling the moon at day and the sun at night saves me 3-4ms.

You have to disable “Use time of day curves” to use time of day presets. After that “ReloadSelected” should work :wink:

There are two types of presets since update:
weather - changes clouds settings
timeofday - changes colors of the sky during the day

Sorry that I’ve not updated documentation yet. I’m moving all my documentation on WordPress site right now to make it more comfortable to read than pdf.

Thanks for the suggestion! I’m going to add this as an automatic functionality of sky.

Please don’t overestimate WordPress. The PDF works fine! Googledocs with a contents page could work better than a wordpress site (or any site) for documentation.

Yes, you are right googledoc is very functional.
I believe It will be fine with WordPress that supports gif, video, image comparison sliders and a cool functional content menu.
Additionally, there will be a cool section about “tips and tricks” in UE4 for everyone who would like to learn how to create optimized materials :wink:

I have bought your sky package and looks great! I work 4.19. version and when I Package the game got this error here;
UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogProperty: Error: UStructProperty::Serialize Loading: Property ‘StructProperty /Game/FastStylizedProceduralSky/TimeOfDay/TimeOfDayPreset.TimeOfDayPreset_C:Data’. Unknown structure.

What should I do for fixed it? PLEASE HELP!!

I’ve resolved this bug and fix is already waiting for review.

It was some strange behavior of TimeOfDayPreset after resaving on this structure everything started to work properly :>

Hi ,

I’m having a little drama with using “selected” and trying to manually control the presets for weather.

Everything is working in terms of the “drawing” on the screen, the weather picks what I want and stays that way. I have created an event on tick to output the current preset by getting the blueprint, assigning it to a variable and then pulling out “selected weather preset” and assigning it to a variable. My hope is to say, “if rain, do xxxxx”. See Get Preset posted by anonymous | blueprintUE | PasteBin For Unreal Engine for a graphical explanation of what I’m doing.

The problem is that the variable is changing between all the presets every tick. It is not pulling out the selected variable, it’s rotating through some of them, but not all which is weird. It seems to be 0, 2, 3, 11.

Any ideas why the get “selected preset” is rotating between an array of some kind?

EDIT: Nevermind, I’ve got no idea, but simply closing UE4 and reopening fixed it… must have picked up something weird somewhere along the way…

Thanks,
Milports

You should use SetPresetExternal or SetpresetByIndex when you want to change the weather on the specific event, not every frame (check the documentation and example level blueprint).

Hi man,

I have seen this asset was on sale a few days ago. Any idea when you are planning to do it again as I’m looking forward to getting it.