Announcement

Collapse
No announcement yet.

[BP] Geographically Correct Sun System

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

    [BP] Geographically Correct Sun System

    Hey guys,
    [Edit] - new version of the product is up on Gumroad with improvements and real time UMG controller of key parameters.

    New video: https://www.youtube.com/watch?v=a2MI...ature=youtu.be
    Link to download: https://gumroad.com/l/SunSystem

    Old post:

    I'm an architect and I was very surprised when I've learned that UE4 doesn't have a proper sun system, like 3ds max or just about any 3d package I guess. That's why I've built one. I'm currently considering adding some things to it or around it and I'd welcome your suggestions. I'm thinking that this could do well in the marketplace but I'm afraid that currently it doesn't meet their "volume" criteria, even though I wouldn't consider pricing this anything steep.
    So let me know what you think. You can find it here:
    https://gumroad.com/l/SunSystem
    And here you can see it in action:
    https://youtu.be/ulJ40YgUO0o
    Regards,
    George
    Last edited by cgiteach; 11-22-2015, 04:19 AM. Reason: updated link information
    George Cretu
    founder & executive CGArtefacts

    Marketplace content - Photo Studio Pack
    BP-Geographically-Correct-Sun-System

    #2
    This is amazing, thank you!

    Comment


      #3
      You're welcome!
      George Cretu
      founder & executive CGArtefacts

      Marketplace content - Photo Studio Pack
      BP-Geographically-Correct-Sun-System

      Comment


        #4
        Just watching your video...do you have a true night time in this system? I'm guessing you'd need to disable the sun during the night hours since game worlds aren't the physical size of Earth and the sun isn't that far away from the landscapes, otherwise you'd have secondary lighting coming from beneath your landscape.

        It was hard to tell from the video how you handle when the sun is not in the sky (and the moon should be - do you have a moon?).

        Comment


          #5
          The sun doesn't turn off when it's night time and there's no moon yet. You can download the BP to check it out if you want. I've did several experiments but the reason I don't have a moon in the released version is because I found no easy way of making it fall behind the clouds while also be lit by the sun. I like not turning the sun off since it casts lighting on the moon (when I was testing with it) generating accurate moon phases. Turning the sun off as it crosses a certain elevation isn't a big deal and concerning under-lighting, it would only happen on the extents of the scene and only if you place something vertical right there, so I'm not concerned with this. A better fix would be extending the edges of the world just slightly.
          Regarding the moon, my attempt was to make it as geometry, and use similar equations as the sun's to drive it. To get it behind the clouds I figured I need to track it's position on the sky material (just the way the sun is tracked and drawn currently) and mask the sky and not the clouds while keeping the geometry of the moon just slightly further away than the sky sphere. If anybody has a better solution to this I'm looking forward to hearing it. In so far I wasn't able to do what I've just described because I haven't spent enough time with the sky material and I'm also considering the necessity of rebuilding it considering that it's strongly linked with the sun system and currently is a very cluttered affair.
          And just as the day is a true day, the night is a true night, basically the sun has the azimuth and elevation that an architectural visualization software (3ds max, revit, etc.) would tell you it should have at a particular time and in a particular location. This means the length of the day, and subsequently, night is accurate. Otherwise the sky's colors during the phasing in and out of day are the default ones, and it's debatable to which extent they are "true". Maybe, in the winter, the atmosphere is a bit different or maybe a haze parameters ought to be inputted but this is a different story.
          Thanks for the input and, again, let me know if you have any suggestions for implementing a moon behind clouds.
          Last edited by cgiteach; 05-18-2015, 08:07 AM.
          George Cretu
          founder & executive CGArtefacts

          Marketplace content - Photo Studio Pack
          BP-Geographically-Correct-Sun-System

          Comment


            #6
            Kleiner Baer, has a tutorial series that is the same is this. here is the link to the tutorial series

            Comment


              #7
              I know those tutorials, they were part of the inspiration for this, but they're definitely not the same. Kleiner Baer uses approximations of the sun's movement which is rather strange since he ends up with quite a heavy set of nodes. This is why he has, apparently, so many exceptions, around the poles/equator, etc. The formulas I use which you get if you download the archive, work irrespective of particular locations on the globe. He also acknowledges no way of getting the moon behind the clouds in so far and I've commented on one of his videos. Feel free to download my version and cross check it with what you see on Little Bear's tutorials.
              Cheers
              George Cretu
              founder & executive CGArtefacts

              Marketplace content - Photo Studio Pack
              BP-Geographically-Correct-Sun-System

              Comment


                #8
                I just tested your BP and it looks fine to me. Good work! I wrongly asumed that using simple approximations would make it easier. So it's funny to see that by using exact calculations you end up with a much more streamlined blueprint.
                I am flattered that you took some inspiration from my version of a Day/Night cycle. However the core of your version which is the calculation of the sun's pitch and yaw is completely different than mine. Also I'd like to mention that cgiteach even tried to contact me before he even started this thread which I think is very kind. I just didn't reply because I'm a little shy
                Regarding your WIP: I know you like my idea of creating the moon phases with the sun directional light as in reality but I myself don't think it's a good idea anymore. I suggest turning the sun off at night. There should be ways to create moon phases that will not cause as much trouble as a directonal light shinning through from below and that will use up less system power. I like the idea of projecting a moon texture into the skysphere (I don't know how as "SkysphereImage" doesn't work for me). Moon phases could then be created using a texture atlas (I have never done that before).
                Also I had a minor bug. The sun would freeze close to the end of the day (before midnight) and then jump to the starting position of the next day. Maybe I did something wrong.

                Comment


                  #9
                  I would also recommend making the moon a mesh that emits its own light and has its own light attached and operates similar to the sun. It's the most cost efficient way to achieve great looking results.

                  Comment


                    #10
                    The PDF covers that glitch at the end of the day. It happens for some positions on earth (latitude/longitude). I think that in the end I'll remake the sky system entirely so as to have more control over it. Thanks for all the feedback guys.
                    George Cretu
                    founder & executive CGArtefacts

                    Marketplace content - Photo Studio Pack
                    BP-Geographically-Correct-Sun-System

                    Comment


                      #11
                      How would you go about setting up a print string to display time of day/date/year etc on screen? Could you use a similar approach to Keiner Baer in his tutorial?
                      Paul Knight
                      Visualiser
                      Associate Partner
                      PLP Architecture

                      Comment


                        #12
                        When I was testing this I placed a print string component inside the event graph, because I couldn't get it to print inside the editor(so in the construction script). Check this image I've put up for reference. Obviously this is done inside the blueprint controlling the animation.
                        https://www.dropbox.com/sc/zkmwgbcda...DR_rYfq5Ud-VVa
                        George Cretu
                        founder & executive CGArtefacts

                        Marketplace content - Photo Studio Pack
                        BP-Geographically-Correct-Sun-System

                        Comment


                          #13
                          Hello Guys,

                          Cgiteach, Thanks for jumping in on the other forum, this is exactly what I was thinking of! Using the color curves is a great way to control the color shifts for the different parts of the sky!

                          I merged it into my own project and did not use the provided map, so I'm not sure that it functioned as intended, but the sky light was not recapturing with animated time of day or in the editor. I am a beginner, so I was poking around with it and I was able to integrate the skylight with the script and get it updating both in the editor and in game, very handy! In my customized version, I added categories to the interface to streamline it further and provide extra information (one category was called: "Select actors to control"). I tried to organised it so that the most used options would show at the top in each category. Ill do some research into streamlining further for our own use, but if you are interested I can share my modifications.

                          I think we could get text display working in the editor same as the game view with a "txt actor"...? I would like to have some interface in game so the user could set the time of day and speed of the animation. When they drag the slider it goes to the time of day interactively and when they release it will animate the day/night cycle from that point based on the speed (or not if speed is zero). Ideally, this would be built in UMG though, so we would not get display in the editor, but it would allow more flexibility in game. We could have the interface off screen and have it slide in when summoned (maybe a swipe in from the right edge for touch interface and a key press for PC?)

                          Well, I'm full of ideas here. lets see if any of these resonate with you guys and we can chat more if they do.

                          Thanks,
                          Ryan Dashkevicz
                          SmithgroupJJR
                          ______________
                          Ryan Dashkevicz
                          Visualization Specialist
                          SmithGroupJJR

                          Comment


                            #14
                            Hi, I just bought your amazing control. I opened the default.map and did a copy/paste on the blueprints into my map. I can edit the controllers just fine, but nothing seems to change in the map. What do I need to do? Never mind my question, what I did was imported the assets into the default.map instead Thanks for the great effort in this system!
                            Click image for larger version

Name:	Untitled_1.jpg
Views:	1
Size:	128.7 KB
ID:	1079097
                            Attached Files
                            Last edited by ÅsmundSchei; 05-29-2015, 04:26 PM.
                            System
                            ASUS ROG Maximus IX Forumla - ASUS ROG GeForce GTX 1080 8GB - G.Skill RGB 16GB, Samsung M2 500GB

                            ArtStation
                            Artwork thread

                            Comment


                              #15
                              Hey, I wanted to do that! I'll probably just use yours as a base and add more features. I want to add a geographically based night star map as well, and maybe the moon. You could also intergrate tides or add lighting changes for dawn/dusk or sunrise/sunset.

                              For the moon, I'd probably create it's own personal light that's hidden and only affects it.

                              Comment

                              Working...
                              X