I made a request for new Skybox features that could interest some poeple here.
It includes requests for multiple skyboxes, more dynamic sun positioning and much more
Some of the features you are asking for might be better delivered using layered cameras. For example, if you are changing the skybox material so often that it reduces your frame rate, then you should use multiple cameras. Instead of animating distant objects by updating the skybox material, put those distant objects in their own layer and add a camera for that layer.
A lot of the stuff you’re asking for there isn’t what I’d consider to be a part of the “skybox”. Technically speaking, the “skybox” is exactly what the name says. It’s a sky painted on a box. That’s it.
That said, there are quite a few sky systems that do many of not all of the things you’ve asked for. I’ve recently tried out trueSKY, and as long as you’re aiming for DX11 level hardware it gets amazing results. I’ve also used another system from the Asset Store (I don’t remember which one, maybe “Time of Day”?) and got different but pretty decent results there, too. In short, there are systems out there that give you drop-in solutions with excellent animated skies and day-night cycles with lighting.
On the topic of skybox material properties, are you changing the texture or are you changing shader properties? I’m pretty sure I’ve done the latter before to implement a simple fade between day and night boxes without noticeable performance impact.
Thanks for your helpful reply.
I wrote a day night script yesterday and it suffers from bad performance sometimes, sometimes not.
The result aren’t really persistent.
The problem is that I need to modify the skybox material very often based on the light intensity to display a realistic behaviour.
If it is for doing day and night cycles, why not store that into a float variable and then just update the skybox material when the float value changes? Maybe you could post a video illustrating your use case, so we could all see why you need to update the skybox material each frame.
Thats exactly what I did actually!.
I increased performance with a limit value with is the absolute difference of the intensity and the new float value.
Thanks for your tip anyway!