Announcement

Collapse
No announcement yet.

The Environment Community Project (The Ocean Project)

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

    [PLUGIN] The Environment Community Project (The Ocean Project)

    The Environment Project has officially released as of 06/12/2020!!!
    This is the separation and improvement of the Ocean Project into various plugins!

    PLEASE DO NOT ASK FOR HELP ON THIS THREAD. Go to the discord. Read the #FAQ first.
    I'm trying to keep this thread clean, all common issues are in the #FAQ, and as new issues arise, they get added to the #FAQ

    Discord: https://discord.gg/n5PCsSU

    Welcome to the community created Environment Project! (Ocean Project)
    The point of this project is create a nearly drop in, truly dynamic, environment that covers all the essentials for any game developer.. It aims to provide a realistic ocean water simulation that is both highly customizable, and being as physically accurate as possible. The second aspect is in regards to the weather and time-of-day setup which are realistically setup to account for everything such as time/data/lat/long/timezone ect.



    ----------------------------------------------------------------------------------------------------------------------------------------------------------
    Download:
    Github: https://github.com/UE4-OceanProject/OceanProject (Now points to the Environment Project)

    Original thread:
    https://forums.unrealengine.com/comm...n-water-shader will provide an insight to the history of this project.

    Credits at bottom of post.
    ----------------------------------------------------------------------------------------------------------------------------------------------------------



    Click image for larger version  Name:	ocean.jpg Views:	0 Size:	691.6 KB ID:	1775336Click image for larger version  Name:	buoyancy.jpg Views:	0 Size:	682.5 KB ID:	1775337
    Click image for larger version  Name:	sunset.jpg Views:	0 Size:	623.3 KB ID:	1775338Click image for larger version  Name:	eclipse.jpg Views:	0 Size:	393.8 KB ID:	1775339
    Click image for larger version  Name:	fish.jpg Views:	0 Size:	638.3 KB ID:	1775340


    This is copy paste from original thread, some of it may be outdated, but still lots of useful information:

    New Skydome Features

    High accuracy sun & moon positioning, based on the input latitude, longitude, UTC offset, and local time. The calculations for this are very complex, and boring, so I'm only going to go over the values shown in the Debug HUD.

    First, what you will see when you open the project, and how to set it all up for your desired location:

    When you open the project, you will be in a demo level named dcSkyTestMap, which is a copy of the Island Map level with the skydome added. (if you don't want to use the new skydome, the Island Map still has the old one). These 2 arrows will show you the direction of the Sun/Moon (yellow/gray) and will update themselves appropriately, and the compass is set to North == +X axis (has not been rotated, default world placement).
    Click image for larger version  Name:	Arrows.JPG Views:	1 Size:	41.1 KB ID:	1108144

    To change the date & time, select the BP_Sky reference in the World Outliner, and expand the small arrow beside Local Time in the Default section. Here you will also find the controls for Latitude, Longitude, UTC Offset Hours, whether to allow Daylight Savings time (calculated automatically if enabled), and a Time Scale Multiplier which allows you to speed up (or slow down) time. By default this is set to 10 which means 10 seconds of game time goes by every 1 second in real world time.
    Click image for larger version  Name:	DebugTime.JPG Views:	1 Size:	71.1 KB ID:	1108145

    The values are automatically clamped in code to the maximum number of seconds in a minute (59), max hours in a day (23), max days in the current month (28 to 31), etc. I had clamped the sliders to not exceed these values, but for some reason it won't allow you to change the value with it turned on, so just be aware that values greater than min/max do not have any effect.

    Finally we have the Debug HUD, this will look very confusing to most people, but is as simple as I could make it while still providing the necessary information. Here's what it looks like, the values are broken down below:
    Click image for larger version  Name:	DebugHud.JPG Views:	1 Size:	140.1 KB ID:	1108146

    The best way to verify this data is to use this website and enter in the date/time, latitude & longitude info into these boxes (or use the map, but make sure the lat/long are correct):
    Click image for larger version  Name:	Position Website.JPG Views:	1 Size:	31.5 KB ID:	1108147

    With that entered, all of the other fields will populate themselves with data. The values in game vs the values on the website will vary slightly (0.1 to 2 degrees average) and are not meant to be exact, calculating the exact position is not feasible (or necessary) for a game / simulation. Using approximations allows high accuracy, without performance concerns.

    Now, what these values mean:

    SUN
    - Time Correction Factor (TCF): The number of minutes to add/subtract to account for the variation in Solar Time within a gives time zone.
    - Equation of Time (EOT): An equation that corrects for the eccentricity of the earth's orbit and axial tilt for the given date/time.
    - Hour Angle (HRA): Converts Solar Time to the number of degrees the sun has moved. 0 == sun's highest point, so the value will be negative in the east (morning) and positive in the west (evening)
    - Declination: The earth's axial tilt for the given date/time vs the sun. This varies from -23.4397 (northern hemisphere winter) to +23.4397 (northern hemisphere summer).
    - Altitude Angle: The vertical angle of the sun in the sky measured from the horizontal, 0 = sunrise, 90 = highest point of the sun that day (time varies) **NOTE: For this value to work in UE4 coordinates we need to subtract 180 from the result, this is why the value differs in the actual rotator' pitch value.
    - Azimuth Angle: The horizontal compass direction of the sun. At solar noon this angle will be exactly due south (-180) (local time varies)
    - Current Rotator Value: The current rotation of the Sun's Directional Light.

    References used for solar positioning:
    http://www.pveducation.org/pvcdrom/p.../suns-position
    http://www.stjarnhimlen.se/comp/tutorial.html#5
    http://www.powerfromthesun.net/Book/...chapter03.html


    MOON
    - Approximations L/M/F: These are approximations for the location of the moon in it's orbit around the earth, including the inclination of the orbit, orbital eccentricity, arg of perigee, and longitude of ascending node
    - Ecliptic Longitude: The longitude location of the moon on the celestial sphere.
    - Ecliptic Latitude: The latitude location of the moon on the celestial sphere.
    - Mean Distance (km): The distance of the moon from earth, in kilometers.
    - Declination: Similar to the solar declination, this is the angle of the earth's axial tilt, but also takes the inclination of the moon's orbit into account.
    - Right Ascension: Angular position of the moon measured eastward along the celestial equator. Both right ascension and lunar declination are found by converting from ecliptic to rectangular coordinates (x/y/z), rotating to account for earth's axial tilt, then converting back into spherical coordinates.
    - Sidereal Time: A time scale (measured in degrees) based on the rate of earth's rotation relative to fixed stars, rather than the sun. This is a constant value that varies only by location (not time), which differs from the actual definition of Sidereal Time, we only use it as a reference.
    - Hour Angle (HRA): Similar to the sun HRA, however is measured against sidereal time instead of solar time. The number of degrees the moon has moved from time 0 (0 to 360 degrees).
    - Altitude Angle: Same as the sun, vertical height of the moon. Value is found by converting Ecliptic (celestial sphere) coordinates to geocentric (observer to sky) coordinates.
    - Azimuth Angle: Same as the sun, horizontal compass direction of the moon. Value is found by converting Ecliptic (celestial sphere) coordinates to geocentric (observer to sky) coordinates.
    - Current Rotator Value: The current rotation of the Moon' Directional Light.

    References used for lunar positioning:
    http://aa.quae.nl/en/reken/hemelpositie.html
    http://www.braeunig.us/space/plntpos.htm
    http://www.stjarnhimlen.se/comp/tutorial.html#7


    There is an excellent video explaining the basics of how we calculate the time of day, calendar systems, and the earth's rotation in the following video (which came out the day after I posted this). Highly recommend watching it to get a good idea how this works:
    https://www.youtube.com/watch?v=IJhgZBn-LHg


    All of the above calculations are implemented in the plugin to ensure there are no performance issues. The blueprint BP_Sky is based off the TimeManager class (in the plugin) and uses it's functions to calculate the sun/moon/moon phases in the base class. This makes the blueprint much easier to read, and reduces it's complexity considerably. These functions could be used by any actor, such as a custom skydome system, by either adding the actor as a child, or inheriting from the actor and calling the Calculate xxx functions.


    CREDITS:
    ----------------------------------------------------------------------------------------------------------------------------------------------------------

    DotCam :
    -Project creator
    -Ocean Manager
    -Ocean Shader
    -Ocean material

    Handkor :
    -Initial Shader
    -Code for Buoyancy


    TK-Master :
    -BuoyancyComponent
    -BuoyancyForceComponent
    -BuoyantDestrutible
    -Infinite Ocean System
    -Screen Space Reflections (SSR)
    -Planar Reflection support
    -Distance Blended Normals
    -Configurable Sets of Panning Normals (Small, Medium, Far)
    -Heightmap-based Seafoam & Foam Wave Caps (Thanks Tin Le!)
    -Cubmap-based Reflections (optional)
    -Exposed many parameters to BP_Ocean. - You can now easily switch between shader versions, change textures, normals, foam, cubemap, heightmap etc.
    -Underwater Distortion Effect
    -Underwater Caustics

    EvoPulseGaming :
    - Current project owner/manager
    - IWYU compliance fixes
    - Conversion into the Environment Plugin Project (Seperation of Ocean Project into individual plugins, cleanup, de-bloating)
    - Physically correct sun/moon position code.
    - Several fixes and improvements to the sky system (eclipses, clouds hiding sun/moon, sun/moon/clouds hiding stars)

    NilsonLima :
    - Various tutorials

    Nadrugal :
    -Additions to the SkyDome


    Burnrate (Justin Beales) :
    -AdvancedBuoyancyComponent
    * -------------------------------------------------
    * Created with Misc. Games and Intelligent Procedure for:
    * Fishing: Barents Sea
    * http://miscgames.no/
    * http://www.intelligentprocedure.com/
    * -------------------------------------------------

    QuantumV :
    -BuoyantMesh

    Komodoman :
    -Fish flocking AI and a variety of fish:



    Project maintainers (past and current):
    - DotCam
    - Zoc
    - NilsonLima
    ​​​​​​​- EvoPulseGaming
    - TK-Master



    BlueEagle :
    - Tons of code/project cleanup, conversion of ocean to cpp

    Przemek2122 :
    - Tons of customization settings, conversion of ocean to cpp

    Beskar_Mando :
    - New buoyancy system (In progress)

    Snarf :
    - Fixed coding conventions on Fish System, fixed GetDayOfYear crash, moved underwaterbp to c++ for 2ms speed up (not imported yet)

    ----------------------------------------------------------------

    This system uses techniques from many tutorials, however it would not have been possible without the help of the following users (Especially Handkor, he deserves a lot of credit for this!):
    Handkor - https://forums.unrealengine.com/comm...hysical-ocean=
    JBaldwin - https://forums.unrealengine.com/comm...review-Thread=
    berna - https://forums.unrealengine.com/comm...le-quot-ocean=
    ufna - https://forums.unrealengine.com/deve...hlight=vaocean
    Ehamloptiran - https://forums.unrealengine.com/deve...urface-Plugin=
    KhenaB - (dead link) https://forums.unrealengine.com/comm...ht=ocean+storm
    gregdumb - https://forums.unrealengine.com/comm...light=gregdumb
    and many others.

    For those wanting more info on how the waves are created mathematically, THIS ARTICLE goes over everything. Specifically have a look at the section on "Gerstner Waves" for the actual equations that produce the waves.
    (dead link) http://developer.download.nvidia.com...gems_ch01.html
    (new link) https://developer.nvidia.com/gpugems...atural-effects
    ----------------------------------------------------------------
    Last edited by EvoPulseGaming; 08-22-2020, 11:23 PM.
    Free Environment Plugin Project (Ocean Project) || Join us on Discord! || Includes: Time/Sky/Ocean/Fish/Buoyancy plugins
    ComputeShader CPU->GPU->CPU
    Universal GetNetwork/LocalRole

    #2
    I am really looking forward to what comes out of this

    Comment


      #3
      Thanks to everybody for their ongoing work to keep this project alive!

      Comment


        #4
        Hello, I found this project only a short time ago.
        I would be happy if anyone could use this project!
        greetings and a wow to all involved!

        Comment


          #5
          great news <3

          Comment


            #6
            How might we implement some niagara effects to the wave crests ?

            Would it not be pretty simple to use the heights of the waves, like trigger boxes or material dissolves, maybe triggering a niagara mesh curl noise effect to the displaced mesh as it enters ?


            Ive got this project loaded in 4.22, cant build from source yet, but having fun playing with it, trying to comprehend it.
            Last edited by yung23athome; 11-30-2019, 10:37 PM.

            Comment


              #7
              Great stuff here

              Comment


                #8
                How are you guys able to fake the translucency effect notably around the shores and near objects without the actual mesh itself being of translucent shading?

                I downloaded the file but didn't get the chance yet to dig deep. It will be great if someone can jump in to explain what is going on with the shading itself and if the water itself is indeed opaque to avoid self sorting issues found with translucent material.

                Thanks

                Comment


                  #9
                  Hello. How to make the joints on the water together with the water. Or they just lie on the water without moving. Thanks for the advice))

                  Comment


                    #10
                    Hi all,

                    I've been using the plugin for a while - it's amazing! However I've come across a problem and I can't for the life of me figure it out - it's probably something simple.

                    The split screen/underwater effect only works in the editor mode. Once I'm in game it no longer does the underwater distortion. I was wondering if anyone knows what causes it? I'm baffled as I can't think of anything that's particularly different between the editor and game that should affect it!

                    Cheers.

                    Comment


                      #11

                      Thanks for the set of mechanics, assets and work done. Please tell me how difficult it will be to adapt this system for an open-world multiplayer game? As an example, Sea of ​​Thieves. Is it difficult to make submarines with this system, where you can move a character (displace water effects and phisics from a submarine)?
                      Last edited by Jack_Rest; 01-18-2020, 09:08 AM.

                      Comment


                        #12
                        Wow, okay, I didn't know the redirect to this thread was active xD.

                        I don't get on here very much, but I am always available on discord. See OP for link.

                        Most of the growing pains in learning to use this project have been addressed in the #FAQ channel of the discord.

                        And as far as the future of this project, I'm not a math genius nor a graphics wizard. So anything strictly rendering related will need help from someone who knows what they are doing. AKA, the ocean itself will have little change by me
                        Last edited by EvoPulseGaming; 01-18-2020, 04:14 PM.
                        Free Environment Plugin Project (Ocean Project) || Join us on Discord! || Includes: Time/Sky/Ocean/Fish/Buoyancy plugins
                        ComputeShader CPU->GPU->CPU
                        Universal GetNetwork/LocalRole

                        Comment


                          #13
                          Originally posted by EvoPulseGaming View Post
                          Wow, okay, I didn't know the redirect to this thread was active xD.

                          I don't get on here very much, but I am always available on discord. See OP for link.

                          Most of the growing pains in learning to use this project have been addressed in the #FAQ channel of the discord.

                          And as far as the future of this project, I'm not a math genius nor a graphics wizard. So anything strictly rendering related will need help from someone who knows what they are doing. AKA, the ocean itself will have little change by me
                          I've not really gotten in to discord and it seems to be the key place to find fixes these days - I guess I'll need to learn!

                          I've tried using the system on 4.24 and all the water materials are off in the world - but look fine when checked in the editor. I've done as suggested on discord but it appears the materials are upside down? I put the Z scale to -1 and now they're the right way around (with the dark surface under the water and the reflective waves on top). Still can't get the split screen distortion effect working though in game, only in the editor
                          Last edited by Boruki; 02-04-2020, 05:08 AM.

                          Comment


                            #14
                            Is your discord link still active? Not working for me unfortunately.

                            Comment


                              #15
                              M.O.A.dev on dischord , add a server, select join a server and paste in ewadNBG

                              Comment

                              Working...
                              X