Search Unity

[Please Read]Skybox feature suggestions

Discussion in 'General Discussion' started by needforbleed, Nov 7, 2016.

  1. needforbleed

    needforbleed

    Joined:
    Mar 19, 2015
    Posts:
    92
  2. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,023
    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.
     
  3. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    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.
     
  4. needforbleed

    needforbleed

    Joined:
    Mar 19, 2015
    Posts:
    92
    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.
     
  5. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Ok, but what do you mean by "modify the skybox material", and what do you mean by "very often"?

    Are you setting 6 new textures each frame? Or are you adjusting a float parameter every few seconds?
     
    Martin_H likes this.
  6. needforbleed

    needforbleed

    Joined:
    Mar 19, 2015
    Posts:
    92
    I'm adjusting two parameters almost every frame since I need a smooth color and exposure transition..
     
  7. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,023
    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.
     
    angrypenguin likes this.
  8. needforbleed

    needforbleed

    Joined:
    Mar 19, 2015
    Posts:
    92
    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!