Announcement

Collapse
No announcement yet.

The same level in two versions, night and day. Do i have to replicate it?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    The same level in two versions, night and day. Do i have to replicate it?

    I have a level that is possible to play two times in the game, one in night and one in day. The only things that will change are:
    1) Sky material
    2) Lights (the settings of the 2 main lights and all the other spot lights must be disabled)

    Do i have to create 2 different levels or is it possible to have this result in another way?

    #2
    copy the sky dome from the night template and copy the dominant light as well and then remove your sky dome in your map and dominant light and paste the ones you got from the night template

    Comment


      #3
      Sorry i written the question in the wrong way. What i would know is if it is possible to save space when you package the game using the same map and modifying with parameters the few changes they have.

      Comment


        #4
        It's definitely possible with a bit of work. Look at the night an day map that's included with UDK and maybe you can get an idea of what Epic did.

        Comment


          #5
          I haven't looked at how the Night and Day map was done in the example map, when I ran it it didn't run very well. If they used a moving light then that's probably why since it would have massive amounts of dynamic shadows.

          We're doing night and day maps for a project and for that one the sun doesn't need to move so the dominant light will simply be animated darker and color changed. And then material instances can be used to change the sky from a day image to a night image. As long as you don't need the light to move it's a solution for better performance.

          Comment


            #6
            I have also the problem that i work on ios so i don't have the possibility to use material instance constants but anyway i can assign the material on the sky at runtime.
            Probably disable the lights isn't a problem through unrealscript. So the problem now is that i need to change the mobile fog color and i don't know how to do this.

            Comment


              #7
              Originally posted by Ivan84 View Post
              I have also the problem that i work on ios so i don't have the possibility to use material instance constants but anyway i can assign the material on the sky at runtime.
              Probably disable the lights isn't a problem through unrealscript. So the problem now is that i need to change the mobile fog color and i don't know how to do this.
              Changing the mobile fog is easy:



              A simple way to toggle between day and night is to have all the day assets in one sub level and all the night assets in another. Load in the level you need for the appropriate situation and load out the other. Depends on how far you are going with the whole day/night aspect. If it is simple you can have all the assets in the same space and toggle them with some simple kismet logic.

              Comment


                #8
                If there was a toggleable DominantDirectionalLight, you could probably have two of those and toggle them on and off as needed, one for the day and one for the night version. As far as I know do toggleable lights store two different lightmaps for their "on" and "off" state instead of casting only dynamic shadows.

                Comment

                Working...
                X