Search Unity

Assets Hydroform Ocean Renderer [RELEASED]

Discussion in 'Works In Progress' started by Xix-Interactive, Feb 11, 2016.

  1. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Thanks for the support Twiggy! I'm afraid the current Enviro is not very compatible with Hydroform. I tried doing some fixes to get it running, but it's not easily done. I recommend Azure Sky for something that does work with Hydroform.
     
  2. twiggyash

    twiggyash

    Joined:
    Nov 7, 2013
    Posts:
    38
    Thanks again for reply. I would use Azure Sky but it doesn't use volumetric clouds and I need them in my project. Anyway ok, I hope a day you can find the time to support Enviro too.
    One thing: I found an issue underwater with "Top Fog" I think. While underwater and looking up I have this strange result. Can you help me please? Thanks.

    UnderwaterTopFog.jpg
     
  3. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Hmm, not sure what that is. What platform/GPU are you running? How do you reproduce the issue?
     
  4. twiggyash

    twiggyash

    Joined:
    Nov 7, 2013
    Posts:
    38
    I'm using Unity 2017.2 on Windows 10 and as Gpu an Nvidia 980. My project is in DX11 with Linear Color Space. Anyway, I noticed that it is caused when using almost any postprocessing effect like FXAA, Depth Of Field blur or some Camera Filters. Don't know why.
     
  5. twiggyash

    twiggyash

    Joined:
    Nov 7, 2013
    Posts:
    38
    I noticed one more thing underwater. Particles are not rendered on fog. I'm using a normal Additive Particle shader.

    ParticlesNotRendered.jpg
     
  6. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Hmm, weird, OK thanks for info, I'll take a look when I can get some time again.
     
  7. taralees

    taralees

    Joined:
    Aug 29, 2014
    Posts:
    31
    How do I post a Question to the Makers of Hydroform ...would you by chance have they're Email Address to Hydroform ?

    how can I get the Best Ocean wave's from Hydroform ?
     

    Attached Files:

  8. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
  9. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    71
    So- I put Hydroform into my scene, and it looks like this.

    Essentially, it's a badly-rendered membrane, with no relation to the world about it.

    I've deleted, and re-installed the asset, with no result or improvement.

    Any idea on how to make the asset work?
     

    Attached Files:

    • wut.jpg
      wut.jpg
      File size:
      237.5 KB
      Views:
      79
  10. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Hi, sorry you are having trouble with it. The first thing to check if its not showing up is whether you have installed the HydroMultiCamComp component on your camera?
     
  11. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    71
    That's an odd, but fair question.

    Of course the component is added to the camera- screenshot attached.

    upload_2019-7-4_23-32-22.png
     
  12. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Thank you, I can see that you have Enviro Sky and many other components installed on your camera. Enviro is unfortunately incompatible with Hydroform at the moment. I recommend Azure instead. You may want to disable Enviro and the other components on the camera to see if Hydroform then works.

    As always, if you can't get it running to your satisfaction, shoot me an email and I will refund your purchase.
     
  13. edsludden

    edsludden

    Joined:
    Nov 6, 2018
    Posts:
    3
    Hi Brian,

    I was wondering if your excellent water system will be compatible with the new Unity SRP in the future?
     
  14. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    30
    Main reason that is water not get rendered in depth prepass or I am wrong? Water writes to depth, but not present in depth prepass queue, which writes in _CameraDepthTexture used for lots of posteffects (PostProcessing Stack or other, not just Enviro).
     
  15. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Possibly. From what I understand about the SRP, it will require more work for the customer to integrate SRP assets into their pipeline. You would need to be an experienced graphics programmer to take advantage of it, so I'm not sure there is a market there for asset developers. I would like to do it though because most of the problems with Hydroform stem from limitations of the existing Unity graphics pipeline.
     
  16. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Correct, Hydroform writes to the depth buffer (zbuffer), but not the depth texture, which other assets use to read depth. In order to do this, Hydroform would need to render out a second pass. I want to take another shot at doing this when I get more time. I have tried before, but I can't remember what the issue was in the past.
     
    Mark_01 likes this.
  17. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    30
    I am currently working on a patch, which allows Hydroform to behave correctly with such effects. Main idea is to draw water after Opaque+AlphaTested via CommandBuffer (when water already drawn with refraction and SSR) into RFloat texture (fake-depth only pass with lightweight fragment shader) and after resolve _CameraDepthTexture and that RT (like return max(camDepth, waterDepth).After that bind the resulting texture to the global _CameraDepthTexture. That worked before for my custom water shader. 2x more vertices, but can be implemented like optional workaround with checkbox.
     
  18. eluukkanen

    eluukkanen

    Joined:
    Oct 1, 2015
    Posts:
    21
    Sea looks incredible, great work!
     
  19. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    30
    Almost done, but there is 2 main problems. Water does not render in SceneView (can't find workaround) and captured skybox not distorted by refraction at all and very lowres.
     
  20. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Ah, very nice, that's closer than I've gotten. Do you really need to render to another render texture? Can you not render directly to the DepthTexture via a shadow pass? What do you mean "bind the resulting texture to the global _CameraDepthTexture"? Are you replacing it, or modifiying it?

    Good progress! I can't think of why your mod would cause problems with the skybox, maybe normals are getting affected?
     
  21. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    30
    Actually I didn't test possibility to render directly to _CameraDepthTexture. I'll check this out later. "bind the resulting texture to the global _CameraDepthTexture" is replacing, yes. Via CommandBuffer.BindGlobalTexture("_CameraDepthTexture", customRT);

    And I've found the reason why skybox not get distorted. For some reason it's cubemap sampled directly via -eyeVec without applying any distortion. Don't know is this feature or bug. But I have fixed that. And replaced it with realtime ReflectionProbe instead of skybox capturing, actually. That boosts performance a lot on my target hardware. Even with realtime ReflectionProbe. If it will be updated via script - will be much faster I think.
     
  22. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Hmm, copying over the _CameraDepthTexture could cause problems with other assets as it would destroy anything already drawn to it. Better than nothing, but drawing directly to it would be best if possible.

    I'd love to take a look at what you're doing when you're done though!
     
  23. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    107
    Hi, we will soon start working on our second project where there will definitely be a need for some solid waters! :D
    Does your solution support HDRP? If not, are you planning on adding it? Next few months would be perfectly OK with us.
     
  24. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    I don't currently have plans to add it, but it looks interesting as it might solve some of the limitations of the standard pipeline. I don't have time to get to it for a few months and it may not make sense if the end user has do to programming to integrate it on their side. I don't want to promise anything I can't deliver.
     
  25. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    107
    Thanks for the honest answer! I think the integration should be effortless in case users have unmodified render pipeline. And if they do modify it, they should understand it enough to adjust Hydroform Ocean System integration to their needs.
    It might end up being problematic, I understand. However if you implement it for the HDRP render pipeline, then that will be the day I will dance outside, naked :D
     
  26. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Haha, well if I have more control over the pipeline and it drops in easy for customers, then I'll be the one dancing outside naked! :)
     
    Gooren likes this.
  27. magicbananna

    magicbananna

    Joined:
    May 9, 2013
    Posts:
    21
    does anyone know why when using the new post processing layer on the camera. It makes everything go blury when using the ocean system?

    https://i.imgur.com/j6aozri.jpg
     
  28. Symbology

    Symbology

    Joined:
    Dec 10, 2015
    Posts:
    3
    The BuoyController Script is not keeping my game object above the water, it is just slowly sinking..... Any help would be appreciated.
     
  29. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    If I had time I'd dig in and see if I could get it running. I know it should be OK, others have done it.
     
  30. atiwari1

    atiwari1

    Joined:
    Jan 10, 2019
    Posts:
    3
    Asset looks really nice.
    Just a quick question.. will it work fine with the WebGL platform?

    Please let me know if there is any issue with any build platform.

    Thanks
     
  31. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    It won't work for WebGL 1.0. WebGL 2.0 should theoretically run OK but I haven't tried it, which means it probably won't ;)

    It will run on consoles with minor modifications. It should run OK for iPhone if you turn the settings down. Some android phones that have high res screens but underpowered GPUs will get clobbered running it. That's about it AFAIK.

    As always, if you want to give it a shot, go ahead and purchase and if you have problems I'll refund the purchase.
     
  32. atiwari1

    atiwari1

    Joined:
    Jan 10, 2019
    Posts:
    3
    Thanks a lot Xix.
     
  33. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    542
    Just reporting that it needs an update with 2019.2 standard render pipeline. More details in below post.
     
    Last edited: Aug 10, 2019
    jbb1979 likes this.
  34. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Does this occur with the demo scenes?
     
    jbb1979 likes this.
  35. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    240
    This Looks almost like a real ocean, I Like it - -
     
  36. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    542
    *Silly me somehow I had 2 ocean components on it, this was causing the undo and flickering issue. I removed the duplicate and now the wave settings are working. Here's a list of everything I have found in 2019.2 including a couple small requests at the bottom.

    1.One time only when launching the demo scene the first time I saw ice on the water. It cleared up after reloading the scene. This issue was encountered randomly again while I changed scenes but didn't save settings. It feels too random on this one.

    2.I can't seem to get underwater to work in my scene but it works in the demo scene. The documentation isn't mentioning anything about underwater-what is the per-requisites be for underwater?

    3. My water turns very dark when turning on planer reflections-this doesn't occur in the demo scene at first but after some tweaking I can't get rid of it lol. There was an error that might be connected to it I am not sure but it also produced a rare different type of flicker going on here. It was encountered by messing around with the Planer reflections and luckily we got some errors and warnings about it.

    4.The water will disappear in the scene view while appearing in the game view and vice versa-shown at 50 sec in Vid 2 Errors+50 Sec scene no water. For example when I open my scene the water is visible in the scene view but there's nothing in the game view until I press play-I wonder if this is deliberate to save processing power or something but it makes it hard to work with.

    5.Aubreyfalconer previously posted a fix for the shore fx not looking right He posted this:
    "fresnel = min(fresnel, depth / 150); immediately before the return value in getColorFromNormal()"

    I am having a bit of trouble with that, is it line 366 where that is or, what exactly do I change?
    I included a video called "Faded Edge Water request" showing the edge looking weird as it interacts-similar users have posted about this already which is why I would really like that fading edge effect of the water-perhaps in the update create the option for that effect?



    6. If you do upload a new version to the asset store just turn off the GI baking in the scene because it always imports with messed up lighting saying Unity lighting data needs to be regenerated because of diff unity versions. Cleaner overall on first impact.

    Attached files link: https://1drv.ms/u/s!AjhzZ7qjdmSBhArG7uQQiKFYgu2m?e=pS2ajG
    If issues with downloading let me know.

    It still amazes me how realistic your water looks. Some users in the past have had wrong settings and their water looked like ice hahah.
     
    jbb1979 likes this.
  37. jbb1979

    jbb1979

    Joined:
    Aug 6, 2019
    Posts:
    240
    I Really like this, It Looks AAA - -
     
    Xix-Interactive likes this.
  38. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    542
    Hands down the best looking water in the store. The demo runs low on my computer but I tweaked some of the settings to get the frame rate from 40 to about 200+ and the water honestly looked the same and keep in mind my video card is quite low range nowadays.

    If you check my link above you can download the Hydrofoam bug report and in there you can get a closer look at the videos. The Faded Edge Water request is the one you should check out to see it in action-I am working on a better edge collision solution as you can see in the video I want it to fade like the picture above. If we can get that working out I will post an update video of higher quality and post the exact optimized settings for y'all.
     
    Last edited: Aug 10, 2019
    jbb1979 likes this.
  39. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    107
    One more question, does this asset support high waves? I mean... we want to make a really angry ocean :D
    I found a mention on this thread that it should come with a "Realistic Water Physics" asset integration. But found no further status updates. Not here and not on the RWP asset thread.
     
  40. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    It's not the best for really high waves - like 20 ft. You can scale them big, but they just look like scaled up "small" waves.

    Yeah one of the water physics assets guys contacted me about integration, and I told him great, go for it and LMK what I can do on my end, but I never heard back.
     
  41. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Thanks again for all the feedback! There's no way I can look at this anytime soon, I'm in the process of packing away all my stuff this week and then I'm traveling for a while. I will get to testing against 2019 builds to see if I can reproduce any of these issues, gonna be a few weeks though.
     
  42. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    542
    That's ok, we can sort all the other issues in a few weeks as you said.
    I made the shore edge much less harsh by inserting this code right after line 366:
    fresnel = min(fresnel, depth /3);

    So without deep foam and shore fx the water looks great now but not realistic. We need deep foam and shore fx for realism.

    So what I need to know if you have time is how to make the shorefx follow the water edge instead of being a static ring and how to make the deep foam fade at the edge of the terrain instead of being a harsh collision as you can see in the attached video.

    The video is low res so the effect is stronger in game but that's why we need some sort of opacity on the shoreline from the deep foam because the refraction code and the deep foam are actually out of position from each other. I turn it off and on a few times.
    My settings are also attached, I use forward rendering and gamma if anyone wants a copy of the ocean. It's extremely optimized and covers a small area so you can change the settings if need.
     

    Attached Files:

    Last edited: Aug 11, 2019
  43. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    I'm not sure what you are asking. Looking at the video, the camera angle is so low that all I can see is the water getting slightly brighter and dimmer as you check/uncheck the settings. Could you post a screenshot of what you mean by " how to make the shorefx follow the water edge instead of being a static ring and how to make the deep foam fade at the edge of the terrain instead of being a harsh collision as you can see in the attached video"? I didn't see a harsh collision in the video.
     
    jbb1979 likes this.
  44. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    542
    Did you see my link with the 6 Questions up above, I posed two posts with links check the original way up.
    There's a link there that has all the bugs and requests in it in more detail.
    The Faded Edge Water request video shows quite clearly that the activated shore foam is quite far away from the water edge. #The gap is quite big and it's not following the waves hitting the terrain.

    This is all around 7 Seconds in the video where I activate the foam.
    #Here you can also see that the water touching the terrain is quite solid-a harsh collision. If it faded as it touched the shoreline especially with deep foam too then it would look quite smooth. I was able to get some level of fade using the shader code above but it's not perfect and it doesn't affect the deep foam.

    I have posted even more pictures just in case but you'll still need the video to see the shorefx foam ring effect 7 seconds.
    These pictures show the No Shorefx and Deep foam comparisons-in both there is still a noticeable white edge that's harsh on the mesh. If we could fade that out then we've got it.
    All the images are res so the actual artifacts are much stronger in game. It is the deep foam that needs the alpha effect at the shoreline the most. The no foam is mostly ok but still has a tiny harsh edge and the shorefx foam is too far away from the terrain and isn't following the waves when there's more turbulence or wave crashing etc.
    *These images below only show deep foam and no deep foam. They do not show normal foam like in the video.
     

    Attached Files:

    jbb1979 likes this.
  45. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    Forgive me I'm super slammed right now so I haven't been able to look through your post.

    Thanks for the screenshots, I think what you are looking for is in the getFoamColor() function in WaterFunc.cs. Take a look at the line where 'intensity3' is defined:

    Code (CSharp):
    1.    
    2. float intensity3 = 1.0 - pow( max( 0.0, (1.0 - height) / 1.0), 8.0 );  // fade out all foam in very shallow water
    3.  
    Try changing some of those parameters around and see if that "pushes" the fadeout point out.
     
    jbb1979 likes this.
  46. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    542
    Hi thanks, yeah I tried to modify that line in various ways and the surrounding lines but they did absolutely no change....like I am not even sure why those lines are there I set them all to equal 0 and it still resulted in the same exact behaviour and look as the original code.
    float intensity = 0;
    float intensity2 = 0;
    float intensity3 = 0;

    Anyway I think we can just call it a day since you seem so busy. Whenever you can get around to it just let us know even if it takes a few weeks.
     
  47. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    382
    If you have intensity or intensity3 set to 0.0, you should see no foam at all. You might want to compare your WaterFunc.cginc to the stock unmodified version.