User Tag List

Page 3 of 48 FirstFirst 1234513 ... LastLast
Results 81 to 120 of 1891

Thread: [Community Project] WIP Weather & Ocean Water Shader

  1. #81
    0
    Infiltrator
    Join Date
    May 2014
    Posts
    11
    If anyone here is familiar with Hankor's mathematical ocean tutorial, and was able to replicate it successfully, I could use some help finding what's causing this issue: Name:  ScreenShot_20150102140850.png
Views: 3747
Size:  478.7 KBName:  ScreenShot_20150105133645.jpeg
Views: 3278
Size:  201.8 KBName:  ScreenShot_20150105133719.jpeg
Views: 3420
Size:  210.9 KB

  2. #82
    0
    Have anyone tested this in the 4.7 perview?
    System
    ASUS G550JK - 12GB ram, Nvidia GeForce 850 2GB

    ArtStation
    Artwork thread

  3. #83
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by Edkenway View Post
    If anyone here is familiar with Hankor's mathematical ocean tutorial, and was able to replicate it successfully, I could use some help finding what's causing this issue:
    Hey there, sorry for the delay, had a huge ice storm knock out power for 2 days.

    It is hard to tell from the images what is causing that look, if you could zip up a copy of the project and upload it to DropBox or other similar site and then PM me the link I will certainly take a look for you! Or if you could PM me some more images showing the Gerstner formula & Cluster I can try and figure it out for you. It's most likely an issue with the Gerstner formula itself, or the values you have set for the WaveLength/Amplitude/Steepness values in the Gerstner Cluster.
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  4. #84
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by Frequia View Post
    Have anyone tested this in the 4.7 perview?
    Hey Frequia,

    Yes I have and can report that 4.7 Preview 1 does not work due to an engine problem preventing MaterialParameterCollections from working. Good news is that 4.7 Preview 2 has this fixed and it will work perfectly. I managed to download it yesterday before it was pulled from the launcher due to a major issue that needs to be fixed before release. It should be up on the launcher within the next couple of days, so wait for that before upgrading if you have the Ocean in your project.

    EDIT: 4.7 Preview #2 was just released! Download it from the launcher and you can use this material in 4.7
    Last edited by DotCam; 01-08-2015 at 12:37 PM.
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  5. #85

  6. #86
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by Nesjett View Post
    Hey DotCam, do you have any bouyancy implementation time in mind? its just for record, Im interested in what youre doing

    Keep up the good work
    IT WORKS! I just got Buoyancy working!!! Woohoo!!!

    I need to do a bit more polishing and test it out with a few different objects with different shapes, but it actually works! Man I am so happy right now. I will try to model a simple boat and some other shapes for you guys to play around with.

    Expect a new release WITH buoyancy in a couple of days!

    Thank you so much Handkor in case you read this, I had to brush up on my C++ skills for a couple of weeks and learn the API (and coding conventions), but I finally figured it all out. Your BuoyancyComponent works great! I plan on modifying it a bit to automatically detect the shape of the object for the test points, with adjustable COM and weight of the object to increase or decrease the displacement of the object (for example the draft on a ship).

    And thank you everyone for your patience on this, sorry it has taken so long... I'm finally able to work on this again so stay tuned!
    Last edited by DotCam; 01-09-2015 at 07:27 PM.
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  7. #87
    0
    Looking forward to that! This is the most complex watersystem I`ve ever seen in any game-engine.
    EDIT: Will you add underwater-effects as well?
    Last edited by Frequia; 01-09-2015 at 06:49 PM.
    System
    ASUS G550JK - 12GB ram, Nvidia GeForce 850 2GB

    ArtStation
    Artwork thread

  8. #88
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by Frequia View Post
    Looking forward to that! This is the most complex watersystem I`ve ever seen in any game-engine.
    EDIT: Will you add underwater-effects as well?
    Thank you for saying that, but it is nowhere near as complete as it needs to be, it will get much more complex before I'm happy with it. The new (upcoming) release will be Alpha ver 0.2 since it will be a major update, but still lots more work to do to get to version 1.0! I have had to move Buoyancy (and a few other things) to code, Buoyancy had to be done that way, but I have also moved quite a bit of the Tick code from the blueprints over to code as well. So far it is performing really well! Adding in buoyancy has not had any impact on performance! You still control all of the features from a blueprint, but the logic has been moved out.

    As far as underwater effects go, I have a partial solution that is already implemented and will be released in the coming days as well as buoyancy. These include swimming, underwater camera effects, water on the camera lens effects, some bubble particles, etc. I need to add a couple more pieces, but it should be a great starting point for expanding upon to suit your game's needs. Now that the major issues are dealt with, stuff like this will get updates much quicker.

    Ahh man I am just so pumped!!! Spent weeks on buoyancy getting nowhere and now suddenly it just works... BOOM!! haha love it
    Last edited by DotCam; 01-09-2015 at 07:51 PM. Reason: clarified what already implemented means
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  9. #89
    0
    Great to hear this DotCam, but I have a suggestion for you, I think you should release separated demo projects, one for the water like now, and other where you will add the swim capabilities.

    I say this because its probable that some people doesnt want to have a swimable water

    Just a suggestion!

  10. #90
    0
    Quote Originally Posted by DotCam View Post
    IT WORKS! I just got Buoyancy working!!! Woohoo!!!

    I need to do a bit more polishing and test it out with a few different objects with different shapes, but it actually works! Man I am so happy right now. I will try to model a simple boat and some other shapes for you guys to play around with.

    Expect a new release WITH buoyancy in a couple of days!

    Thank you so much Handkor in case you read this, I had to brush up on my C++ skills for a couple of weeks and learn the API (and coding conventions), but I finally figured it all out. Your BuoyancyComponent works great! I plan on modifying it a bit to automatically detect the shape of the object for the test points, with adjustable COM and weight of the object to increase or decrease the displacement of the object (for example the draft on a ship).

    And thank you everyone for your patience on this, sorry it has taken so long... I'm finally able to work on this again so stay tuned!
    Any progress with that update?

  11. #91
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by Nesjett View Post
    Great to hear this DotCam, but I have a suggestion for you, I think you should release separated demo projects, one for the water like now, and other where you will add the swim capabilities.

    I say this because its probable that some people doesnt want to have a swimable water

    Just a suggestion!
    Thanks for pointing this out, I meant to explain this a bit better. I am actually planning to add in multiple BP Wave Controllers each with a optional components, such as:

    - The original version for those who need an ocean in the distance and really don't care for anything else
    - The original version + Underwater Effects
    - The original version + Buoyancy
    - The original version + Buoyancy + UnderWater effects.

    On top of all of that, I will be adding in a 8 wave solution for all of the above, along with the 16 wave version for all above. 8 wave Sets is really all you need for the open ocean, and saves a lot of processing. Also the Original Version mentioned has had some other updates, more on that soon.

    I have been planning this for a bit now, the use cases for something like this are so different that creating a single monolithic blueprint is not feasible, so there will be a few to choose from.


    Quote Originally Posted by Ardivaba View Post
    Any progress with that update?
    There has been progress, but it has only been a day...

    I will have this out to you guys early this coming week!
    Last edited by DotCam; 01-10-2015 at 10:56 PM.
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  12. #92
    0
    Infiltrator
    Join Date
    May 2014
    Posts
    11
    Quote Originally Posted by DotCam View Post
    Hey there, sorry for the delay, had a huge ice storm knock out power for 2 days.

    It is hard to tell from the images what is causing that look, if you could zip up a copy of the project and upload it to DropBox or other similar site and then PM me the link I will certainly take a look for you! Or if you could PM me some more images showing the Gerstner formula & Cluster I can try and figure it out for you. It's most likely an issue with the Gerstner formula itself, or the values you have set for the WaveLength/Amplitude/Steepness values in the Gerstner Cluster.
    I really appreciate that you're willing to help. Here's the link to my project: https://www.dropbox.com/s/fiuhrzxfvi....uproject?dl=0 Thanks for the help, and great job on the buoyancy!

  13. #93
    0
    Found out that it had the kinda underwater effect I was looking for Amazing work so far DotCam.

    Name:  Capture.JPG
Views: 2797
Size:  179.0 KB
    System
    ASUS G550JK - 12GB ram, Nvidia GeForce 850 2GB

    ArtStation
    Artwork thread

  14. #94
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by Frequia View Post
    Found out that it had the kinda underwater effect I was looking for Amazing work so far DotCam.
    It does render the ocean on each side of the mesh, but it does not have the PostProcess effects for underwater in that version, it should look like you are underwater from that view (ie have a blurred depth of field that gets stronger for farther away objects, along with color grading & a blueish color to make it look like water). Sort of like this (this is an old image, it has been modified since this image was captured):

    Name:  underwater.PNG
Views: 3012
Size:  760.4 KB


    Hmmm... I have a question for you though, your ocean appears to not have any specularity/reflections at all. Did you change your settings to make it look that way or is t not working correctly? Here is an image showing what it looks like by default:
    Name:  0before.PNG
Views: 2969
Size:  932.9 KB


    You do need to have a movable SkyLight in your scene to enable that look, but if that is how you want it to look then it's no problem, just curious.
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  15. #95
    0
    Yes, I changed the settings to make it look like that and its working just fine Im going for a toonish-water look, so I dont need so much advanced postprocessing.
    System
    ASUS G550JK - 12GB ram, Nvidia GeForce 850 2GB

    ArtStation
    Artwork thread

  16. #96
    0
    Samaritan
    Join Date
    May 2014
    Posts
    106
    Quote Originally Posted by DotCam View Post
    IT WORKS! I just got Buoyancy working!!! Woohoo!!!

    I need to do a bit more polishing and test it out with a few different objects with different shapes, but it actually works! Man I am so happy right now. I will try to model a simple boat and some other shapes for you guys to play around with.

    Expect a new release WITH buoyancy in a couple of days!

    Thank you so much Handkor in case you read this, I had to brush up on my C++ skills for a couple of weeks and learn the API (and coding conventions), but I finally figured it all out. Your BuoyancyComponent works great! I plan on modifying it a bit to automatically detect the shape of the object for the test points, with adjustable COM and weight of the object to increase or decrease the displacement of the object (for example the draft on a ship).

    And thank you everyone for your patience on this, sorry it has taken so long... I'm finally able to work on this again so stay tuned!
    Yes this is something I wanted to add in the future too. Let the user enter custom point or lets them choose from a set of predefined hulls (Cube, sphere, cylindre, boat,...) where the user can just choose point density.

  17. #97
    0
    Quote Originally Posted by DotCam View Post
    IT WORKS! I just got Buoyancy working!!! Woohoo!!!

    Expect a new release WITH buoyancy in a couple of days!

    stay tuned!
    Really awesome cannot wait for this!

    Is it possible to get it looking as good as cryengines dx11 water?

    Or would that be a job for waveworks? Not sure if waveworks will only work on nvidia for a long time I wish your material could look this beautiful

    Last edited by CyberDev; 01-13-2015 at 07:57 PM.

  18. #98
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Just a quick video update showing the buoyancy is almost working! There are some obvious issues with it, so it's not quite ready for release. Mostly it is a matter of tweaking values to get it operating as expected, so nothing major (I hope!), and I will update you guys again soon.



    Quote Originally Posted by Handkor View Post
    Yes this is something I wanted to add in the future too. Let the user enter custom point or lets them choose from a set of predefined hulls (Cube, sphere, cylindre, boat,...) where the user can just choose point density.
    Yeah it would make things so much simpler and is something I will be looking into, but right I have bigger problems to deal with...

    Did you do anything special inside the graph on the buoy and/or change the values (such as Buoyancy, test point volume radius or directional damping)? As you can see from the video it is acting pretty strange. If I turn off "Simulate Physics" for the Buoy it bobs up and down perfectly with the waves (just no side to side angle rotation). I may have a bug somewhere in the code, will take a look again to see what's up. Thanks for any insight on this!
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  19. #99
    0
    Will the buoyancy work on the blue character as well as custom characters too? Im going to try the system in 4.7.0 preview 3 by the way
    System
    ASUS G550JK - 12GB ram, Nvidia GeForce 850 2GB

    ArtStation
    Artwork thread

  20. #100
    0
    Samaritan
    Join Date
    May 2014
    Posts
    106
    Quote Originally Posted by DotCam View Post
    Just a quick video update showing the buoyancy is almost working! There are some obvious issues with it, so it's not quite ready for release. Mostly it is a matter of tweaking values to get it operating as expected, so nothing major (I hope!), and I will update you guys again soon.



    Yeah it would make things so much simpler and is something I will be looking into, but right I have bigger problems to deal with...

    Did you do anything special inside the graph on the buoy and/or change the values (such as Buoyancy, test point volume radius or directional damping)? As you can see from the video it is acting pretty strange. If I turn off "Simulate Physics" for the Buoy it bobs up and down perfectly with the waves (just no side to side angle rotation). I may have a bug somewhere in the code, will take a look again to see what's up. Thanks for any insight on this!
    If physics is off I set actor location to the water surface, that is intended behavior to allow none physical object to be able to snap to the water's surface.

    In the video it almost looks like your damping values are too high along the z-axis. The directional damping is like normal linear damping but it allows an object to have different values along each axis. This was added to let a boat keeps its momentum going forward but have heavy drag going sideways. There might be a bug where the damping is applied even when a point is out of the water though.

    Buyoancy you can leave to 1.
    Test point volume is meant to place a sphere around each testpoint so that when a point is near water it offers a percentage buoyancy of it's spherical volume instead of just a black and white over/under water. It allows the force to be applied more gradually as a point crosses the water level.

  21. #101
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by Handkor View Post
    If physics is off I set actor location to the water surface, that is intended behavior to allow none physical object to be able to snap to the water's surface.

    In the video it almost looks like your damping values are too high along the z-axis. The directional damping is like normal linear damping but it allows an object to have different values along each axis. This was added to let a boat keeps its momentum going forward but have heavy drag going sideways. There might be a bug where the damping is applied even when a point is out of the water though.
    Ok that makes sense, I was using the default damping on Z (5), now that I know it was for a boat I will try out some different values. I fixed the majority of the angular rotation issues, and the buoy no longer stops suddenly at a certain level like it did in the video.

    The performance is getting a bit better, still fairly heavy on the CPU (22ms for the scene in the video, 45fps on a GTX 980 / i5 4670k), just the ocean simulation runs at 120fps without the added CPU calculations, so it is just a tad bit concerning... I intend to try reducing the large waves down to a single cluster of 8 and use those to calculate buoyancy, and use the other cluster for detail waves. The other thing I have been testing is only applying force when the test point is under water, and letting the built in gravity do the rest. I might leave this for now and release an "early adopters" version with the system as is then update again once I get the performance to a reasonable level.

    Actually I think I just realized what is causing the performance drop... Will post an update later on if I'm right!

    Buyoancy you can leave to 1.
    Test point volume is meant to place a sphere around each testpoint so that when a point is near water it offers a percentage buoyancy of it's spherical volume instead of just a black and white over/under water. It allows the force to be applied more gradually as a point crosses the water level.
    The problem I have currently is setting the buoyancy value to 1 causes the object to sink almost to the bottom, come back up and jump out of the water, then sink back down again. Once it finally settles, it still sinks down too far. Is it possibly the mass of the object is too high? Or should the test point volume be increased to compensate? I'm still trying to find the best solution, other objects work just fine at 1, but to keep the buoy on the surface I have to bump it up to a minimum of 4 currently... :/

    So it's coming along, getting closer. Thanks again for all your help!
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  22. #102
    0
    Hey DotCam, I see you did some progress with the buoyancy sweet.

    Is it possible that you send me your current files? I have a buoyancy system which I made like a gazillion months ago that is just gathering dust in some dark corner of my hard drive, aching for some action lol.

    My buoyancy system is basically a function that takes in a vector array (with the buoyancy point offsets, I also have an auto-generating system that generates points based on the mesh collision and some parameters but that's another story!), damping variables, a mesh density variable (float) and a water density variable which basically calculates the buoyant force based on the difference in density and depth, the density variable can be super easily adjusted and fine-tuned for different kind of objects, I think it even works for helium balloons if you adjust the density and apply it when out of water

    Now the main thing that my buoyancy function is missing (other than a lot of polish, some rewriting and perhaps some wave-drag force) is a way to get the wave height from your ocean at each specific array point, seems you already have that part working based on Handkor's work so perhaps we can merge our work or something

    I'm assuming you feed the parameters from the material instance to the wave height calculations in order to be able to sync the waves dynamically? that's the part that I never got to finish xD

    I made an attempt to get the height data from WaveWorks with no luck unfortunately.. my C++ skills failed me q_q.. didn't want to try the render target approach as it's super slow.

  23. #103
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by TK-Master View Post
    Hey DotCam, I see you did some progress with the buoyancy sweet.

    Is it possible that you send me your current files? I have a buoyancy system which I made like a gazillion months ago that is just gathering dust in some dark corner of my hard drive, aching for some action lol.

    My buoyancy system is basically a function that takes in a vector array (with the buoyancy point offsets, I also have an auto-generating system that generates points based on the mesh collision and some parameters but that's another story!), damping variables, a mesh density variable (float) and a water density variable which basically calculates the buoyant force based on the difference in density and depth, the density variable can be super easily adjusted and fine-tuned for different kind of objects, I think it even works for helium balloons if you adjust the density and apply it when out of water

    Now the main thing that my buoyancy function is missing (other than a lot of polish, some rewriting and perhaps some wave-drag force) is a way to get the wave height from your ocean at each specific array point, seems you already have that part working based on Handkor's work so perhaps we can merge our work or something

    I'm assuming you feed the parameters from the material instance to the wave height calculations in order to be able to sync the waves dynamically? that's the part that I never got to finish xD

    I made an attempt to get the height data from WaveWorks with no luck unfortunately.. my C++ skills failed me q_q.. didn't want to try the render target approach as it's super slow.
    Sorry for the delayed response, I just read this now, but I will package up an "Early Adopters ONLY" project and upload it here in the morning. It will basically be the current download + buoyancy, and some other small tweaks. For all those wondering when the other features will be added, I will release an actual version 2 as soon as possible (as soon as the performance gets better).

    It would be awesome if you (and any others) can help me test out some solutions to getting better performance. This is the reason for the delay, I really hoped to have it ready a few days ago, but the CPU usage spiked fairly high.

    It sounds like your system for buoyancy is very similar, so it will be great to possibly merge the two together. Anyways I'll go into more detail tomorrow morning. I will post it in the thread here instead of adding a link to the main page, as this will be more of a beta test than a release.

    Thanks for offering to help TK! I need some fresh eyes on this, I'm probably doing something very simple very wrong.
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  24. #104
    0
    "Early Adopters ONLY" sounds good I will start adapting my code as soon as I have the project files.

    I'm curious though, where is the CPU usage you are talking about coming from? I had tried Handkor's gerstner waves and it runs fairly fast, unless you use many clusters of waves.

  25. #105
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by TK-Master View Post
    I'm curious though, where is the CPU usage you are talking about coming from? I had tried Handkor's gerstner waves and it runs fairly fast, unless you use many clusters of waves.
    EDIT: For anyone reading this now, the following 2 paragraphs outlining how the OceanManager works was not the performance problem whatsoever, this runs amazingly fast even for multiple objects. I will leave it here for reference but wanted to make it clear this is not a performance issue. Thanks!

    --------------
    The waves themselves work great, really high FPS without any issues since it is calculated on the GPU, but to add in buoyancy requires duplicating the Gerstner wave formula (& wave clusters) in code which is called by the BuoyancyMovementComponent. To get realistic buoyancy you need to have at least 4 test points around an object, each one has its own location on the water surface. To find out how much force (and whether the force is gravity or upwards buoyant force) we need to create a snapshot of the current wave height for each of the 4 points, which requires going through the entire formula 64 times per frame (2 wave sets, 8 waves per set, 4 test points).

    This is where the problem arises, all of those 64 calls to create a Gerstner wave are performed on the CPU which is much slower than GPU calculation. I am researching ideas on how to improve this, I have a few ideas that might work, but need to be tested. The most obvious way to cut it down is to reduce the wave count down to one cluster calculated for buoyancy, but still use the second cluster as small surface waves to increase the realism, which could work. But more on that later.
    ---------------

    For now I am off to create a new demo project containing all of this, once again for early adopters only due to performance issues... Hopefully it won't take to long, just need to migrate it all out of my master project. Will update again soon!
    Last edited by DotCam; 01-24-2015 at 03:01 PM.
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  26. #106
    0
    Hmm seems you are right about the performance.

    I opened an old project of mine from 4.4 and did some stress testing on gerstner waves..


    Don't pay attention to the fps from the video, it's all wrong because of fraps .. the actual fps difference was from about 130fps to about 85fps which is a big performance hit actually but keep in mind each crate from the video was simulating 64 test points (so about 1000 points total)! which is an exaggeration, normally you would need 4 points each.

    An optimization that I can think of is to not run the buoyancy when the object is not near the water (by adding volume(s) roughly surrounding the ocean parts) but that's not going to help for objects that are actually in the water :\
    Another option could potentially be to run the calculations with CUDA but that means no AMD support etc.

    At the end of the day I think you would indeed have to reduce the number of gerstner waves if you really need to simulate many buoyant objects but if we are talking about a single ship or boat for example then at least that should be perfectly fine
    Last edited by TK-Master; 01-18-2015 at 03:23 PM.

  27. #107
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by TK-Master View Post
    Hmm seems you are right about the performance.

    I opened an old project of mine from 4.4 and did some stress testing on gerstner waves..

    Don't pay attention to the fps from the video, it's all wrong because of fraps .. the actual fps difference was from about 130fps to about 85fps which is a big performance hit actually but keep in mind each crate from the video was simulating 64 test points (so about 1000 points total)! which is an exaggeration, normally you would need 4 points each.

    An optimization that I can think of is to not run the buoyancy when the object is not near the water (by adding volume(s) roughly surrounding the ocean parts) but that's not going to help for objects that are actually in the water :\
    Another option could potentially be to run the calculations with CUDA but that means no AMD support etc.

    At the end of the day I think you would indeed have to reduce the number of gerstner waves if you really need to simulate many buoyant objects but if we are talking about a single ship or boat for example then at least that should be perfectly fine
    Wow that's not bad at all, it's great to see it can be done!

    So obviously I must have a bug in this somewhere. I also allow the user to fully customize the waves using a blueprint that feeds values to the code OceanManager. I have a feeling the code is doing a re-init on the wave values before doing the calculations... I don't know how else to explain this performance hit.

    Thank you for the video, it is reassuring to know that this is possible to do at a good framerate. The migrating process completely broke my ocean system BP, but almost finished putting it back together now, will upload asap!
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  28. #108
    0
    Absolutely amazing man! Quick question I might had overlooked it or migrated it odd is the weater (rain) in the current download? I am just wondering. I am loveing what I am seeing and it works and looks amazing on 4.6.1, also would you have any issues if my team used it in our Fighting Game we are working on? We are a small indie company but Unreal and Mixamo (Animation software and protoyping software which is a godsend atm) has been following us on my Twitter and the FanPage we have on FB since our main site is under construction. I would give full credit and if I was able to add anything to it I would have no problem sharing. We are currently in early Alpha stages but we are working on having it release for PC/PS4/XboxOne. Once again freaking amazing job man. I am at a loss for words.
    Demented owner and founder of NeoSpawn Games
    Current Project: Project Yami (place holder title) Next-Gen Fighter using UE4
    FanPage: www.facebook.com/NeoSpawnGames
    Official(under construction): www.neospawngames.net
    Personal FB: http://www.facebook.com/Keiyentai
    LinkedIn Profile: http://www.linkedin.com/in/Keiyentai

  29. #109
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    @TK-Master - I am going to PM you with the code in a zip, migrating to a new project is causing a ton of errors... Every time I get one fixed another pops up... So it is going to take some more time to get it running (looks like I need to redo it again today, map errors...) :/


    @Keiyentai - The rain needs to be attached to the player itself so I didn't hook it up properly, but have a look in the Sky\ParticleFX folder, there is a "P_Rain_Test" particle. It is basically one of the waterfalls from the Cave Effects demo that has been enlarged to look more like rain. I will have a better example included soon, just have to get buoyancy working first.

    You are more than welcome to use it in any project you'd like (this goes for anyone wanting to use it in their project!), and If you are able to improve it in any way that would be most welcome as well! Good luck with your game, and keep us updated!
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  30. #110
    0
    PM sent! I think I may have found the source of the performance hit (fingers crossed)

    By the way, have the shader changed in any significant way? can I use the currently uploaded shader with the code you sent me? from a quick look the parameters seem the same, just making sure
    Also, have you already implemented a way to synchronize the ocean manager parameters with the material instance?

  31. #111
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by TK-Master View Post
    PM sent! I think I may have found the source of the performance hit (fingers crossed)

    By the way, have the shader changed in any significant way? can I use the currently uploaded shader with the code you sent me? from a quick look the parameters seem the same, just making sure
    Also, have you already implemented a way to synchronize the ocean manager parameters with the material instance?
    Hey thanks for looking it over! Unfortunately I tried your code but it did not have a noticeable impact, and seems that I need it to remain a FVector for the angular rotation of the buoyant object, but I did all this rather quickly so I may have missed converting a variable type. I have kept all of the changes and converted them to comments so I can give it another try later. But it did confirm for me there are no issues with the speed of the code, so thank you for that! I'm doing some profiling to see if I can figure this out, comparing with the version I released before, I'm starting to think I may have overlooked something in the material/blueprints. Something is amiss here the FPS is way too low...

    The shader hasn't had any breaking changes since it uses a MaterialParamterCollection which allows you to add and remove easily without much concern, so that shouldn't be a problem. But the BP_OceanSystem is using the wrong Parameter sets, I moved them to code (in OceanManager.h) so I could easily access them from both BP/code. To fix this up you need to do is add a variable of WaveParameter (no 's' on the end, that one is BP based and has been removed) for the global (median) settings and 2 WaveSetParameters for WaveSet1/WaveSet2, then a variable for holding the BP wrapper of the OceanManager code (regular BP using OceanManager as it's base class but otherwise empty, I called it OceanController), and finally pass the parameter variables to it in the ocean BP. To pass them to the material as well I replaced the previous params with the new ones, split WaveSetParameters output nodes from the 2 wave sets and break the WaveSetParameter values for each wave, then plug each float into a "Make Color" node to transfer them to each value in the MaterialParameterCollection.

    Obviously that is not all that simple of a fix, and is really boring work splitting all connecting up those structs. I'll get this out asap for you guys, working on the 2nd attempt at migrating right now as I'm as profiling the main project!
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  32. #112
    0
    Infiltrator
    Join Date
    May 2014
    Posts
    11
    Hey DotCam, I was wondering if there's a way to create the OceanManager without having to use any code?

  33. #113
    0
    Infiltrator
    Join Date
    Jan 2015
    Posts
    10
    Hey guys. Cool thread. Have you seen this explanation of how they went about dealing with the ocean in AC3? Pretty interesting read.

  34. #114
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Ok, I have some good news and some incredibly awesome news for you guys! First the incredibly awesome news:

    Performance is no longer an issue

    I found the bug, fixed it and now get 120fps with multiple buoyant objects, as shown here:



    The good news? I'm just finishing up that buoyancy sneak peek right now, and will upload shortly.


    @EdKenway - Yes it is possible, and there is a nearly completed version of it in the Ocean folder of the download. It is called "OceanManager" as well, and has everything needed to get it working. It can't just be hooked up and used as is, it needs a bit more work, I may look into that in the future now that I have the code version working.

    @InMind - Yes I found that article as well recently, it has a lot of good info in it! Now that buoyancy is working I will be exploring it further, especially the way they transition between the shore and open ocean. They use a variant of Gerstner waves along with a Fast Fourier Transform (FFT) generator to add more dimension to the waves. I re-installed AC Black Flag a couple of weeks ago and I will be using it as a reference going forward, they did a really good job on the waves it's really impressive, I hope this system will one day look the same. Thanks for mentioning it though, any other interesting articles you come across, be sure to send them my way!
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  35. #115
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Ok here is the "Early Adopters" version of the OceanDemo with buoyancy. I am currently working on a tutorial for how to create your own buoyant objects and will add it here soon. It is fairly easy though, check out one of the Buoy's blueprint Components section, all you need to do is add a BuoyancyMovementComponent and add a "Test Point" to each corner of the object. 4 is pretty standard but a boat will need more (currently working on getting a small boat working).

    Here is the Preview of version 2 - With Working Buoyancy
    <Link Removed - Now on GitHub>

    GitHub Link - https://github.com/UE4-OceanProject/OceanProject

    *Note: I don't mind any of you using this in any project for UE4, and have no problem with any videos being created demoing it's functionality. Only thing I ask for videos is you link back to this thread. Thanks!
    Last edited by DotCam; 03-12-2015 at 03:29 PM.
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  36. #116
    0
    Infiltrator
    Join Date
    Jan 2015
    Posts
    24
    Looking fantastic! Great work on the buoyancy - I'm tuning it a bit right now. Will contribute back for comments when done.

    For those wondering about performance, I'm seeing 94.6 fps on a Core i7/4790k + GTX 970 @ 1342mhz, with the buoys and cylinders in the frame. About 96fps with just water in frame - so very little hit from the buoyancy model. Amazing!

  37. #117
    0
    Oh nice job DotCam! looks like you beat me to it, I finished adding my buoyancy code to your ocean yesterday and I put together a few objects of various shapes and densities.. here is a video showing it
    Also added a pirate ship for good measure! Check it out


    Btw, did you figured out what was causing the performance hit? it all runs the same to me, the buoyancy barely has any impact on performance if you use few test points.

  38. #118
    0
    Mythic

    Join Date
    Apr 2014
    Posts
    2,232
    Quote Originally Posted by TK-Master View Post
    Oh nice job DotCam! looks like you beat me to it, I finished adding my buoyancy code to your ocean yesterday and I put together a few objects of various shapes and densities.. here is a video showing it
    Also added a pirate ship for good measure! Check it out

    Btw, did you figured out what was causing the performance hit? it all runs the same to me, the buoyancy barely has any impact on performance if you use few test points.
    That looks awesome man!!! really cool, is that for a game or just a fun project? I may ask you a couple of questions later, but also if you ever want to collaborate on this project as well it would be awesome!, or let me know in PM!

    And yes - The Performance issue has been completely resolved, I now get 120+ FPS (Capped at 120) Even With all of the object shown in my video above!!!

    It was totally unrelated to the ocean itself, let's just say its fixed and leave it at that (ie Dumb Mistake)
    Last edited by DotCam; 01-21-2015 at 07:25 PM.
    [Free Community Project/Plugin] WIP Dynamic Ocean & Calendar Based Sky
    New Features:: Highly accurate sun/moon position, and lunar phase calculations built into the plugin (base class for the SkyDome blueprint)
    In Progress: Weather simulation w/ volumetric clouds

  39. #119
    0
    Thanks it's just a fun/practice project atm but eventually I'm totally going to make a game with some sort of sailing in it

    I would love to collaborate on this, if there is some way I can help let me know

  40. #120
    0
    UE Community Manager
    Join Date
    Mar 2014
    Posts
    1,937
    Anyone who is interested in water should definitely check out the Twitch stream today with Alan Willard:

    https://forums.unrealengine.com/show...22-2015-2PM-ET
    Twitch /unrealalexander| Twitter @UnrealAlexander
    How to report a bug? | Installation & Setup issues?
    Call me to a thread by posting this: [MENTION]Alexander Paschall[/MENTION]

Page 3 of 48 FirstFirst 1234513 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •