Announcement

Collapse
No announcement yet.

[Community Project] WIP Weather & Ocean Water Shader

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Hey there, I noticed you're working on a time/sky system. I'm working on a similar thing myself, and I was wondering how you plan on implementing moon phases? I'm currently altering the color and brightness of sunlight to turn the sun "off" at night and make the sunrise/sunset colors appear correct, but this has the side effect of the moon always being completely dark at night. I've thought about using a small mesh for the moon, hidden somewhere (as opposed to the large mesh I currently use), with a spotlight orbiting it, and rendering that out to a plane somewhere in the world as a render target, but I haven't tested this.

    Comment


      Originally posted by icannotfly View Post
      Hey there, I noticed you're working on a time/sky system. I'm working on a similar thing myself, and I was wondering how you plan on implementing moon phases? I'm currently altering the color and brightness of sunlight to turn the sun "off" at night and make the sunrise/sunset colors appear correct, but this has the side effect of the moon always being completely dark at night. I've thought about using a small mesh for the moon, hidden somewhere (as opposed to the large mesh I currently use), with a spotlight orbiting it, and rendering that out to a plane somewhere in the world as a render target, but I haven't tested this.
      The basic setup I have (which needs work) currently uses a standard mesh cube at position 0,0,0 which I named "Moon Rotator". Now I added in my 3d moon mesh and made it a child of the Moon Rotator, so I now have an extremely easy way to move the moon around in an orbit. I have a few color curves, and a float curve for the sun, which similar to yours which runs the Sun rotation, and at the moment it also influences the the moon rotation. Currently I have it set that the moon is always -180 deg from the sun's position, which works great for a simple system, but it needs to be replaced soon.

      I also attach a Directional Light to 0,0,0 in the skydome and use this as the MoonLight. I have some calculations done so that the moon get's brighter on sunset/lighter on sunrise etc, and the rotation of the moon sets the rotation of the the Moon Light, so the light appears to be coming from the moon. It's a bit of a hacky way to do it, and I hope to improve it in the future, but that's basically how it works currently.

      Currently everything is based off of the Sun & time of day, so it will need to be broken apart and have more added in before

      @joshhezzell -

      I added the further details to the same Lunar Cycles card since they are related to the updated moon. A separate time scale for night will be part of the Calendar system I plan to create, it will allow you to customize the length of year/season/moth/day/night/hour/minute/seconds, or in other words let you create your own planetarey calendar, or use the default calendar. More info on that soon!
      Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

      Comment


        Originally posted by DotCam View Post
        I also attach a Directional Light to 0,0,0 in the skydome and use this as the MoonLight. I have some calculations done so that the moon get's brighter on sunset/lighter on sunrise etc, and the rotation of the moon sets the rotation of the the Moon Light, so the light appears to be coming from the moon. It's a bit of a hacky way to do it, and I hope to improve it in the future, but that's basically how it works currently.
        How large is the moon mesh, and how far is it from (0,0,0)?

        Oh, are you talking about the moon casting or receiving light?

        Comment


          The moon mesh itself is all the way out near the edge of the Skydome mesh, it's a really large distance, but I'm not sure the exact measurement.

          The moon itself uses a base color/fresnel and an emmissive channel to make it look brighter during the night, but the lighting on the ground is completely un-affected by the moon itself, since that is controlled by the "Moon DirectionalLight" in my scene. Since I need to update the moon's position each tick, I also update the Moon's directional light to be pointing in the same direction as the moon. This gives the illusion the moon is casting the light, while in reality it is just a DirectionalLight being rotated to match the moon's current position.
          Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

          Comment


            Btw, is the sun going / down broken for anyone else in 4.7 (Preview 7?) - Tried to do everything to get it to move, All the code works fine, Everything that needs to be "Movable" is movable... It just doesn't move

            Which sucks, because it worked for me in 4.6
            KITATUS
            "Information shouldn't be behind a paywall, It should be free for all!"

            Comment


              Originally posted by DotCam View Post
              The moon mesh itself is all the way out near the edge of the Skydome mesh, it's a really large distance, but I'm not sure the exact measurement.

              The moon itself uses a base color/fresnel and an emmissive channel to make it look brighter during the night, but the lighting on the ground is completely un-affected by the moon itself, since that is controlled by the "Moon DirectionalLight" in my scene. Since I need to update the moon's position each tick, I also update the Moon's directional light to be pointing in the same direction as the moon. This gives the illusion the moon is casting the light, while in reality it is just a DirectionalLight being rotated to match the moon's current position.
              Ah, I see now, that's close to what I'm doing, too.

              Thanks for the hint about the emissive channel, I'll have to look into that and see if it can help me with the moon's phases.

              Comment


                Originally posted by KitatusStudios View Post
                Btw, is the sun going / down broken for anyone else in 4.7 (Preview 7?) - Tried to do everything to get it to move, All the code works fine, Everything that needs to be "Movable" is movable... It just doesn't move

                Which sucks, because it worked for me in 4.6
                Yeah something is going weird in 4.7 preview 7... This is what happens when I try to open in 4.7: https://forums.unrealengine.com/show...l=1#post222060

                Do you use my custom Blueprint for your skydome or the default skydome? I have not had any other issues with it so far, but please let me know if there are other bugs with 4.7 you are experiencing!!! Thanks Ryan!
                Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                Comment


                  Originally posted by DotCam View Post
                  Yeah something is going weird in 4.7 preview 7... This is what happens when I try to open in 4.7: https://forums.unrealengine.com/show...l=1#post222060

                  Do you use my custom Blueprint for your skydome or the default skydome? I have not had any other issues with it so far, but please let me know if there are other bugs with 4.7 you are experiencing!!! Thanks Ryan!
                  Using your custom Skydome. Everything works fine apart from the sun / moon moving (Day / Night). Tried to see if I could fix it but nothing seems out of the ordinary :/

                  Edit: Apparently it's a known issue. Shame I didn't know about it :P - https://forums.unrealengine.com/show...229#post222229
                  Last edited by KITATUS; 02-15-2015, 10:29 AM.
                  KITATUS
                  "Information shouldn't be behind a paywall, It should be free for all!"

                  Comment


                    Originally posted by KitatusStudios View Post
                    Using your custom Skydome. Everything works fine apart from the sun / moon moving (Day / Night). Tried to see if I could fix it but nothing seems out of the ordinary :/

                    Edit: Apparently it's a known issue. Shame I didn't know about it :P - https://forums.unrealengine.com/show...229#post222229
                    Actually that is not related... I just realized why you are having problems with it (my fault sorry...), I was testing out some new features and didn't revert them back properly.

                    I'll fix it up and either show you which changes to make or re-upload (or both, but it is a fairly simple fix) in a little bit, just woke up so I need some coffee.

                    EDIT: Ok actually it's not my fault (Yay! ), tested it and everything was ok so it must just be 4.7p7 is bugged for this. Hopefully preview 8 (or better yet 4.7) gets released soon.
                    Last edited by DotCam; 02-15-2015, 12:08 PM.
                    Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                    Comment


                      Originally posted by DotCam View Post
                      Actually that is not related... I just realized why you are having problems with it (my fault sorry...), I was testing out some new features and didn't revert them back properly.

                      I'll fix it up and either show you which changes to make or re-upload (or both, but it is a fairly simple fix) in a little bit, just woke up so I need some coffee.

                      EDIT: Ok actually it's not my fault (Yay! ), tested it and everything was ok so it must just be 4.7p7 is bugged for this. Hopefully preview 8 (or better yet 4.7) gets released soon.
                      Woo! Thanks
                      KITATUS
                      "Information shouldn't be behind a paywall, It should be free for all!"

                      Comment


                        Hey DotCam and all,



                        I have made a short video to demonstrate how one would implement my flocking in the unreal engine 4 when I release the code. I cannot release it today, because I am waiting for confirmation from my academic advisers that I own the code I write. They are 99% sure I own it, they just need to double check. As soon as I have the go ahead the code will be posted here !

                        Edit: One of my teammates is interested in also contributing all the fish art that you see in the video (content browser). Again, we will have to get confirmation that it is ok, but it would be awesome if I could give you all those fish as well
                        Last edited by Komodoman; 02-15-2015, 04:12 PM. Reason: fish art

                        Comment


                          Hello Guys,

                          My name is Jorge Ponce, I write you from Germany. I am an artist and filmmaker (Independent filmmaker). Here is my website: www.jorgeponce.de


                          I 've been trying for weeks to make your collective project, this amazing ocean in Unreal 4, but I can not. It's too complex for me:

                          https://www.youtube.com/watch?v=Tkfs3zIfpPg

                          I am writing to ask if you want to use this project to make a short film. The short film ist about African migrants trying to reach Europe, but his ship sinks at sea. The scene you did in Unreal is perfect for this film. I tried my self to do the same in several programs, SFM, Blender, but Unreal is also much more realistic and the rendering time is nothing.

                          If you like the idea you can use this incredible scene that have already done. I will concentrate on the story, dialogues (German with English subtitles) and postproduction.

                          The project committed no money, but if he were to win a prize, would be divided between those involved.

                          Sincerely,

                          Jorge Ponce
                          www.jorgeponce.de

                          Comment


                            Originally posted by Komodoman View Post
                            Hey DotCam and all,

                            I have made a short video to demonstrate how one would implement my flocking in the unreal engine 4 when I release the code. I cannot release it today, because I am waiting for confirmation from my academic advisers that I own the code I write. They are 99% sure I own it, they just need to double check. As soon as I have the go ahead the code will be posted here !

                            Edit: One of my teammates is interested in also contributing all the fish art that you see in the video (content browser). Again, we will have to get confirmation that it is ok, but it would be awesome if I could give you all those fish as well
                            You seriously mean all of those fish?!?! Man... You guys are awesome! I don't know what to say other than thank you so much!!

                            Looks like I will need to "dive in" (har har) to a bit of AI programming soon, that system is looking great! How are you handling the AI for the fish? Is this done using behavior trees and blueprints or is it all done through c++? Look forward to seeing some more videos! It's great to see you guys are getting some good use out of this project, please let me know if there is anything I can do to help further. I'm working on a mesh LOD system so you will be able to get a larger ocean surface without affecting performance too much, hopefully that will help make things look a bit better off in the distance.

                            Thanks again Komodoman! Let me know if you need anything!
                            Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                            Comment


                              Originally posted by jopon123 View Post
                              Hello Guys,

                              My name is Jorge Ponce, I write you from Germany. I am an artist and filmmaker (Independent filmmaker). Here is my website: www.jorgeponce.de

                              I 've been trying for weeks to make your collective project, this amazing ocean in Unreal 4, but I can not. It's too complex for me:

                              https://www.youtube.com/watch?v=Tkfs3zIfpPg

                              I am writing to ask if you want to use this project to make a short film. The short film ist about African migrants trying to reach Europe, but his ship sinks at sea. The scene you did in Unreal is perfect for this film. I tried my self to do the same in several programs, SFM, Blender, but Unreal is also much more realistic and the rendering time is nothing.

                              If you like the idea you can use this incredible scene that have already done. I will concentrate on the story, dialogues (German with English subtitles) and postproduction.

                              The project committed no money, but if he were to win a prize, would be divided between those involved.

                              Sincerely,

                              Jorge Ponce
                              www.jorgeponce.de
                              Hi there,

                              While this project does use similar techniques to the one you linked above, that video was made by KhenaB from the forums using a different ocean system. You can find out more info on his project here:
                              https://forums.unrealengine.com/show...cean-Storm-WIP

                              You are free to use this project in any game or rendered film, but the video above is using a different ocean system.
                              Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                              Comment


                                Originally posted by DotCam View Post
                                You seriously mean all of those fish?!?! Man... You guys are awesome! I don't know what to say other than thank you so much!!

                                Looks like I will need to "dive in" (har har) to a bit of AI programming soon, that system is looking great! How are you handling the AI for the fish? Is this done using behavior trees and blueprints or is it all done through c++? Look forward to seeing some more videos! It's great to see you guys are getting some good use out of this project, please let me know if there is anything I can do to help further. I'm working on a mesh LOD system so you will be able to get a larger ocean surface without affecting performance too much, hopefully that will help make things look a bit better off in the distance.

                                Thanks again Komodoman! Let me know if you need anything!
                                All the AI code is in c++ . All it is are simple behaviors that have a hierarchy from most to least important:

                                1. Am I near the surface or the sea floor? avoid it this tick.
                                2. Am I near an enemy? GTFO this tick.
                                3. Are there any prey for me to eat? Chase them this tick!
                                4. Am I the leader? lead the pack this tick baby.
                                5. Am I a simple flocking fish? follow the leader and flock with my buddies this tick.

                                I tried to make it as simple as possible to set up a flock of fish in the ue4 environment, so a user with no c++ experience can add them to their game and customize the behavior by setting different variables.

                                I am very grateful for your help, I'll be sure to let you know if I need anything!
                                Komodoman
                                Last edited by Komodoman; 02-16-2015, 02:26 PM.

                                Comment

                                Working...
                                X