Hello,
I have checked lots of forum and hub questions related to this question (lots of topics around there) yet couldn’t find the tip I am looking for. Anyway, I was experimenting different conditions with the blueprint system. Since I am pretty new in Unreal Engine, I have a few questions related my day / night cycle attemt. First of all, I will be trying to push my limits forward by making my scene as realistic as I can. Therefore it will use a lot of GPU, so I will try to decrease the CPU / GPU usage to prevent more hassle.
Here is my question:
I am trying to create 2 states: Day and Night. With a key input, it will switch the state. Imagine sandbox games where day/night cycles effect the whole city lights. Hopefully, I have only one flat
In day state:
- Sun will be on top
- Fill lights will be on
- Night lights will be off
In night state:
- Sun will be on bottom
- Fill lights will be off (might be on with changed values, not sure yet)
- Night lights will be on
I have already created the cycle with a timeline to demonstrate the flow and attached one of my light BP’s to make them on and off. It is working flawless, yet considering I have other light sources needs to be BP and codes within them, it sounds like I am computing unnecessary things.
I have something in my mind to simplify that logic above, but not sure if it will work. Is there a way to create such states within a variable so I can simply get Sun position to determine if different light bp’s are all on or off? I have doodled the states into nodes with pen, and logically it makes sense yet I have no idea how to achieve those with real unreal nodes.
I imagined Day and Night states predefined seperately in BP’s and cast to Level BP where the sun state calculated to set a state into 1 and the other 0 (or switch, haven’t used it tough) If this makes sense, am I supposed to get all scene lights into those state BP’s to set all values 1 or 0? If so, how is it possible to cast 1 from Level BP to those states to activate different light sources?
Sorry if I made it more confusing with my ideas
Thanks so much for your help!