Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: karias361 on May 03, 2023, 05:20:08 PM

Title: Change skybox to morning, evening, night (not animated)
Post by: karias361 on May 03, 2023, 05:20:08 PM
Pretty new when dealing with skyboxes. But I wanted to change it after an event.  Morning time, after an interaction or completed task, it jumps to evening, then again after another event, jumps to night, and repeat. Sort of like a 2d visual novel.  It's not a game object, so I'm not sure if this is possible?
Title: Re: Change skybox to morning, evening, night (not animated)
Post by: Christoph on May 05, 2023, 12:56:26 AM
Yes. You can simply change the skybox settings.
Title: Re: Change skybox to morning, evening, night (not animated)
Post by: karias361 on May 22, 2023, 12:51:48 AM
As far as I know the skybox is rendered through the main camera.  How or where do I find the settings? 
Title: Re: Change skybox to morning, evening, night (not animated)
Post by: Christoph on May 22, 2023, 11:08:15 AM
Go to Window/Rendering/Lighting. In Environment tab you have the skybox material that you can set. There is an action called 'Set Skybox' with which you can set this at runtime (not sure anymore if it's included in Playmaker or if you have to get it in the Ecosystem). It has a 'every frame' boolean checkbox so you could even animate it from one to another (fading from day to night).

You will need a skybox shader and depending on how complex and realistic you want it to look you might want to go with a more complex solution from the asset store. I attach you a really cool gradient shader with an example material that could be potentially your day background. This way you can play with it and duplicate the material and maker another one for your night settings. I can't remember where I got this from but I think I downloaded it from git several years back. Credit doesn't belong to me.

Let me know if that helps. Cheers!
Title: Re: Change skybox to morning, evening, night (not animated)
Post by: zzap64 on May 23, 2023, 09:52:40 PM
Lots of free skyboxes available on the Asset store.