playMaker

Author Topic: Change skybox to morning, evening, night (not animated)  (Read 514 times)

karias361

  • Playmaker Newbie
  • *
  • Posts: 7
Change skybox to morning, evening, night (not animated)
« 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?

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: Change skybox to morning, evening, night (not animated)
« Reply #1 on: May 05, 2023, 12:56:26 AM »
Yes. You can simply change the skybox settings.

karias361

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Change skybox to morning, evening, night (not animated)
« Reply #2 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? 

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: Change skybox to morning, evening, night (not animated)
« Reply #3 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!

zzap64

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Change skybox to morning, evening, night (not animated)
« Reply #4 on: May 23, 2023, 09:52:40 PM »
Lots of free skyboxes available on the Asset store.