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:
    395
    I will put this as a high priority when I get some time to jump in again.
     
  2. twiggyash

    twiggyash

    Joined:
    Nov 7, 2013
    Posts:
    43
    Thank you! :)

    Have a nice day.
     
  3. SergeantBiscuits

    SergeantBiscuits

    Joined:
    Jul 22, 2012
    Posts:
    15
    Hi all! Purchased this asset recently for use in an aircraft-based game, been using it in conjunction with Azure[Sky]... yields incredible results. Can't believe how good the water looks for the amount of resources it uses.

    Sorry if this has been answered already, but is there a way to make the water accept shadows? I don't mind if the surface becomes opaque and shore fade effects are lost... shadows are more important for my game.

    Thank you!

    dat ocean.png
     
  4. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    529
    Is single pass working? Hoping to use this for VR on Oculus Go/Quest/GearVR :D with Forward Single-Pass rendering
     
  5. KarlLakner

    KarlLakner

    Joined:
    Jan 30, 2019
    Posts:
    16
  6. KarlLakner

    KarlLakner

    Joined:
    Jan 30, 2019
    Posts:
    16
    Hey, did you get anywhere with this? Have the same problem, but with a different asset (Lux), and also need shadows for gameplay reasons...
     
  7. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    395
    Hey everyone, so sorry to get back so late on this. Because Hydroform doesn't write to the DepthTexture (because it's very difficult to do with a custom shader), it cannot easily accept shadows or projections. One thing that might be possible for shadows is to read the existing shadow buffer that Unity generates. I haven't attempted this, but if you know how to write shaders, it's worth a shot.
     
  8. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,720
    KarlLakner likes this.
  9. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    589
    Just bought Hydroform ocean and getting an issue as in image below.: No discernable compile errors. Any ideas how to fix it? Thanks

    ocean.PNG

    Of course the scene is usually clear. This is in play mode.

    ADDITION: I fixed this. It was post processing causing the issue. In particular motion blur.
     
    Last edited: Nov 12, 2019
  10. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    148
    Seems like a photo taken during a monitor fall.
    Can't help you though, just came by to drop a cringe joke :oops:
     
    Xix-Interactive and ROBYER1 like this.
  11. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    395
    Thanks for reporting back on the issue and the fix!
     
    Hawk0077 likes this.
  12. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    589
    There was also another issue with RAM Water Rivers as it used the Water Layer too. They need to be on different layers.
     
    eaque likes this.
  13. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    614
    Hi, I'm kinda mad at myself that I just discovered this Asset. I was looking for a water solution that supports SSR, and only this water solution supports it.

    Anyway, I added to my test scene and this is what I get.
    upload_2019-11-26_15-44-45.png

    I'm using the default water setup and using Unity 2019.3b12, and Hydroform 1.38.

    As you can see it in #1, there is a ghost image of the character. #2 is the water level.
    Also, the big displacement of the character and underwater character looks pretty bad.

    Can you please tell me what's going on?
    Thanks.
     
  14. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    395
    Hmm, it could be multiple things. First thing is to make sure another asset isn't causing this, so try and disable any assets that affect the camera or have camera filters, etc.

    Another thing you can do, hopefully as a quick fix is go into WaterFunc.cginc and look at getRefractColor() - try changing the distortion value in there and see if the issue goes away.
     
  15. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    614
    I was able to reproduce on many other assets.
    UMA is free and you can see it yourself. This is running "UMA DCS Demo - Simple Setup"
    https://www.assetstore.unity3d.com/en/?stay#!/content/35611

    I'll appreciate for your help. I'm using 2019.3b12

    upload_2019-11-26_16-27-49.png

    And also, the underwater effect doesn't seem to work.
    upload_2019-11-26_16-28-22.png
     
    ROBYER1 likes this.
  16. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    395
    It looks like you may have not set up the camera. Did you add the HydroMultiCamComp component and UnderwaterFilter component to it?
     
  17. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    614
    You are right! I forgot the underwater component. I would have not missed it if it called HydroUnderwaterFilter though. ^^

    I guess the remaining problem is the ghosting image.
    Were you able to reproduce it? You can easily reproduce it using UMA, I believe.

    Thanks.
     
  18. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    395
    I haven't had a chance to test it on the UMA (been sick), but it's very odd that UMA would give it problems where other objects do not.
     
  19. Acme3dProd

    Acme3dProd

    Joined:
    Mar 13, 2016
    Posts:
    7
    Hello,

    We are looking to buy an ocean system for our project. Your ocean system seems the best. We would like some more info. We are developing a game that has a day-night cycle and we already have implemented that feature with directional light. Could you please inform us how the custom shader of your ocean reacts to directional light? For example, will we be able to Lerp values from your ocean system through our C# script and darken the ocean at night having the results we want?

    Thank you
     
  20. Acme3dProd

    Acme3dProd

    Joined:
    Mar 13, 2016
    Posts:
    7
    We actually have two more questions for you. Will this work without problems with the default Unity's linear and exponential fog? Is the ocean compatible with Unity 2018.3?
     
  21. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    614
    @Xix-Interactive, I also have the same problem using Opsive Character Controller. Both UMA and Opsive are the most popular character system and I'm using both. I would appreciate if you can help nail down the problem.
    Thanks.
     
  22. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    395
    The day/night lighting works by lerping between day and night water colors that can be set via the editor or script. It also samples the skybox so that the reflection matches the changing sky. You can set the frequency at which it captures the sky.

    Hydroform supports linear, exp and exp2 fogging in linear and gamma modes - at least for the surface, underwater it only works with linear fog. Underwater support is very basic and should be considered beta.

    The ocean is compatible with 2018.3 yes.
     
  23. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    395
    I am very limited in my bandwidth right now for this type of support, but I will try and get to it soon. If I cannot for some reason, or you are unsatisfied with it for this or any other reason, please get in contact and I'll get you a refund.

    Have you tried looking at the shader and changing the distortion value like I posted above a while ago?
     
  24. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    614
    Hi, if I turn off the distortion, there is no submerged image either and it looks not right. I think it's important to have perturbed submerged images. I think I can wait a bit and just please let me know when you have a chance to take a look. Thanks.
     
  25. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    614
    Is this Asset being actively developed? Unless the problem above is solved, I don't think I can use this Asset in my game. Besides, underwater rendering seems pretty basic compared to other solutions out there. Could you please share your roadmap with us?
    Thanks
     
  26. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    395
    Generally no, it is not being actively developed, at least in terms of adding new features. That may change in 2020 if my contracting slows down and I have more time for side projects like this.

    That being said, I do try and tackle bugs that are reported such as your distortion issue. I'll see if I can reproduce it today. I've got a bit of time, but I'm also packing up to do a long flight tomorrow. I may not have more time to look at it till the weekend.

    As always, if you find you cannot use it or do not like it for any reason, I'm happy to send you a refund for the asset.
     
  27. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    614
    I see. I'll decide whether to refund based on fixing the artifact above. Thanks.
     
  28. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    395
    Alright, so I've taken a look and reproduced the issue. Unfortunately I don't see an easy way to fix it. What is happening is that at the pixels that look sort of like "stealth mode", the shader is sampling pixels that are distorted and the source pixels at that location are the object in front of the water (the character). Ideally I could sample the ground that is behind the character, but that would require extra passes, knowledge that there would be a character there, etc. Since I cannot do that, I sample the ground un-distorted rather than sample the character, which would produce a sort of ghost effect.

    This happens with any object that intersects the water, but it's normally not noticeable because the ground isn't typically flat and shallow like in that demo. It also tends to be hidden by the foam and the falloff to less clear water.

    The best I can suggest is to reduce the distortion like I mentioned above (set it to .95 or .99 instead of .90), or turn it off entirely.

    I would think this would be an issue with any water system that features refraction/distortion, and indeed I have seen it occur in many AAA games, though usually the distortion is turned down more than in this instance.

    Again, if this doesn't work for you, shoot an email to support@xixinteractive.com with your invoice number and I'll get a refund started for you.

    -Brian
     
  29. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    614
    And please notice that it's not just about the flat ground. If you look at the character from underwater, it displays the same problem.

    Are you using depth buffer information when you are sampling? For this type of work to work, depth information on the water intersection is a must.

    Any shallow water, swimming, or object that are on the water will have the same problem and I need all of them for my game.

    Unless you are going to abandon, I hope you have a chace to look at it.
    I really like to use your Asset because it support SSR and I haven't found any other asset that supports it. That's why it makes your asset special.

    Thanks.
     
  30. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    395
    Yes, the flat ground is not the source of the problem, it just makes it very noticeable.

    Yes, I am using depth buffer sampling, but it doesn't help in this case. If you look at the red dot, what is happening is the shader is firing a ray at that location, and then the distortion is causing it to sample the "background" texture at a different location (refraction). That particular pixel is hitting the character object, so it does a depth test to see if the object is in front of the water (it is). Since it is in front of the water, we don't want to sample that pixel because it would be the character, so what should be sampled? I choose to do an unperturbed sample of the background, which is the ground in this case because it usually looks OK (esp for a high frequency texture like sand) and is better than sampling the character.

    upload_2019-12-20_9-44-52.png

    The only decent solution I can think of would be to do a grab of the "background" without the character in it, so sampling the character would not be a problem. Even so, in that case, the bits of the character that are underwater would not be refracted (which would look much better than what it's doing now). You'd have to arrange the rendering such that the characters are rendered after the water, so maybe you can experiment with that.
     
  31. goldwyn11

    goldwyn11

    Joined:
    Apr 8, 2019
    Posts:
    5
    Howdy, I saw your asset and I had a question about it's functionality before I bought it.

    Does this asset work like a solid plane, or can it go around an island? I'm going to have some underground areas in an island, so I can't have a water plane that cuts through the sea level.
     
  32. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    395
    It works like a solid plane, but you can create geometric "cutouts" for it where it will not render. Note that those cutouts do not currently work properly with VR.
     
  33. goldwyn11

    goldwyn11

    Joined:
    Apr 8, 2019
    Posts:
    5
    Thank you for the response c:
     
  34. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,042
    has anyone tried this on WebGL yet? (I saw the dev's comment about that -- won't work on WebGL 1, might work on 2 -- has anyone tried it?)