Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Graphics Hydroform Ocean Renderer [RELEASED]

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

  1. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    131
    Very nice.
     
  2. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    111
    Did anyone try Hydroform with a Vive ?
    Does it work ?
     
  3. Goobles

    Goobles

    Joined:
    Jan 10, 2018
    Posts:
    17
    The new underwater effects are looking nice! :)
     
    Xix-Interactive likes this.
  4. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Thank you!

    Underwater rendering is live, think of it as beta, let me know if you have problems with it.


    Also be aware, the minimum Unity version is bumped to 5.6, and you now must attach the HydroMultiCamComp script to all cameras that see the ocean.


    upload_2018-3-14_12-34-36.png
     
  5. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    wow nice :)
     
    Xix-Interactive likes this.
  6. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Can someone post an image looking at the water surface from below? I would like to see how it looks from a diver perspective...

    Regards,
    Carlos
     
  7. Maximilious

    Maximilious

    Joined:
    Nov 29, 2016
    Posts:
    28
    how can I fix the Shore FX disapearing every so often? I dont understand why it happens...

    its like this most of the time:


    then every now and again the Shore FX disappears leaving it like this:


    for a while then reappearing again =/ I am not even moving the camera when it happens

    Thank you in advance

    EDIT:

    I also have a fairly large island, how can I increase the scale of the ocean? see here
     
    Last edited: Mar 16, 2018
  8. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    There is a known bug that reflection probes cause the shorefx to turn on and off randomly, I'm not sure why that's happening yet. Try disabling any reflection probes and see if that helps.

    Hmmm, in your last screenshot it looks like the brim mesh is not rendering. It's possibly because of a multi-camera situation, try disabling the mini-map in the upper right and see if that has any effect.
     
  9. Maximilious

    Maximilious

    Joined:
    Nov 29, 2016
    Posts:
    28
    I removed any probe I had in the scene, and I even disabled Enviro Skybox but the Shore still kept disappearing on me heh it kinda feels like there are 2 different oceans and switch randomly between the two

    edit: I just increased my Camera Far from 10000 to 50000 and it seems to have fixed both problems lol
     
    Last edited: Mar 16, 2018
  10. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    It's been a year so I thought I'd ask again, and as this asset apparently recently gained an underwater effect, is subtractive colliders for ship interiors on the timeline yet?
     
    Last edited: Mar 16, 2018
  11. Maximilious

    Maximilious

    Joined:
    Nov 29, 2016
    Posts:
    28
    @Xix-Interactive So appearantly EnviroSky render script (that goes in camera) is the one that makes the ocean not appear on the horizon, have you heard of anyone getting the two assets to work together? It would be a shame If I couldn't get them to work property =/
     
  12. Harinezumi

    Harinezumi

    Joined:
    Jan 7, 2013
    Posts:
    54
    Hi Xix-Interactive,

    first off, let me tell you that your asset is quite amazing, the water looks so real, and I'm very satisfied with the asset in general. However, I have run into an issue.

    I use additive scenes for separating persistent and changing elements of my application, as well as multiple cameras with different culling masks and depth levels for rendering different parts of the visuals. For example, one camera renders the 3D environment, another the UI, a third one a screen fade effect, etc.
    The issue is that with this setup the water disappears in game view and play mode, unless all the cameras have a depth level not greater than 0. (I added HydroMultiCamComp to all cameras, but that in itself doesn't help).

    Looking into HydroformComponent I realised that it uses Camera.current extensively. If I change GetCamera() to return Camera.main instead, the water appears (my main camera is the one rendering the 3D environment). But I'm not sure if this is the correct solution, and if it will cause other issues (changing Camera.current in other places causes visual artifacts).

    My questions are: is this a known issue, or am I setting up the ocean system incorrectly? What do you suggest as a solution for my case? Will using Camera.main instead of Camera.current cause visual artifacts (it is the only camera that should render the water).
    If this is a bug, I'd be happy to share my changes with you!
     
  13. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Not yet, but the underwater rendering is a prerequisite for what I need to implement that. I'm hoping that it will be relatively easy and I can get it in soon. It's first or second in the queue.
     
    ekergraphics likes this.
  14. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Huh, that's odd, I wouldn't expect another script to do that. Have you tried disabling your minimap? Try disabling that and enabling EnviroSky and see if it works.
     
  15. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Try removing HydroMultiCamComp from all cameras but the main camera and see if that fixes the issue.
     
  16. Maximilious

    Maximilious

    Joined:
    Nov 29, 2016
    Posts:
    28
    camera settings when ocean not rendering all the way:


    this is how it looks with these settings:


    This is how it looks when I disable the Enviro Sky Rendering Script from the camera, the ocean spans across the world now


    And yes, I have disabled the minimap camera and it doesn't really affect anything =/
     
  17. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    OK that definitely looks like it may be an issue with Enviro Sky then. You might want to ask them about it on their forum thread. I seem to recall someone else posting a fix for a sky issue like that on this thread, not sure if it was for Enviro or a different asset.
     
  18. Maximilious

    Maximilious

    Joined:
    Nov 29, 2016
    Posts:
    28
    I looked over their thread and it looks like the with both scripts enabled, the ocean only renders where terrain exists, and everything else is ignored I could add a flat terrain at 0,0,0 then center around my island but if I could get it working property then that would be awesome
     
  19. Maximilious

    Maximilious

    Joined:
    Nov 29, 2016
    Posts:
    28
  20. sentar

    sentar

    Joined:
    Feb 27, 2017
    Posts:
    44
    Hi XIX Interactive,

    I have a simple question, I seen that the box's float in your video.

    How well is foam used for bigger rectangle objects such as ships?
     
  21. Maximilious

    Maximilious

    Joined:
    Nov 29, 2016
    Posts:
    28
    another issue I noticed is, there appears to be 2 oceans rendering at a time, for example this is is how it normally is:



    then just like that out of nowhere the water changed and its higher than before without the shore fx
     
  22. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Not very well - the foam is intended for static, shoreline areas, it doesn't currently have any ship wake features.
     
  23. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Yeah, that's just because the ShoreFX are turned off - when it gets turned off, the foam disappears and the waves are no longer dampened as they get into shallow water.

    The only time I've seen this happen in-game is related to reflection probes, which is the next thing I'm going to hunt down. Let me know if you can reproduce it through some other means. Is it happening with Eviro sky off now?
     
  24. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    Thank you for the reply on the ship interiors being worked on soon. Ship wakes was going to be my next question. :)
     
  25. Harinezumi

    Harinezumi

    Joined:
    Jan 7, 2013
    Posts:
    54
    Adding or removing the HydroMultiCamComp doesn't affect anything. Changing to use Camera.main in HydroformComponent.GetCamera() is the only thing that can re-enable the water effect in my setup. I suspect this is because some of my cameras have higher Depth value than the camera that should render the water layer.

    My question was more directed towards if using Camera.main in GetCamera() and Camera.current in other locations will cause issues? Maybe HydroformComponent should have an optional renderingCamera field?
     
  26. TabiqueMalevolo

    TabiqueMalevolo

    Joined:
    Oct 28, 2017
    Posts:
    4
    Hello! This works well with depth of field effects?
     
  27. Iucounu

    Iucounu

    Joined:
    Oct 24, 2017
    Posts:
    19


    I downloaded the demo for Mac linked on the Asset store page today and noticed a visual bug - there is a line of flickering blue pixels/noise on the horizon. Occasionally, when I move camera up and down, this issue disappears (for some camera angles), but most of the time it's clearly visible and produces nasty graphics artifacts whenever horizon level is within camera view. I tried changing all available settings in the demo but that didn't make any difference. Is that a known bug or there is some compatibility issue with my computer (I use 2012 Mac Mini with Intel HD 4000 graphics card)?
     
  28. Iucounu

    Iucounu

    Joined:
    Oct 24, 2017
    Posts:
    19
    Now I downloaded the Windows demo to test it on a different machine and it's even worse. The water is missing altogether and all I see are two black perpendicular rectangles floating in front of camera. Very disappointing results taking into account bold statements on the Asset Store page "built by an industry professional" and "runs pretty much anywhere".

    Since this plugin is broken on two out of two randomly tested computers, I guess it has big compatibility problems for now. What the hardware and software requirements for this asset are?

    I double checked the Asset Store page to make sure I didn't miss any info about supported harware/software, but don't see any information apart from generic statement "It runs pretty much anywhere *Note - not optimized for mobile".

     
    Last edited: Mar 20, 2018
  29. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Right, I was hoping that by having HydroMultiCamComp only on the one camera, you wouldn't have to modify the code. If you aren't seeing any problems by changing it to read Camera.Main, then you should be good to go.

    Having a renderingCamera field is an interesting option, thanks for the suggestion.
     
  30. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Unknown.
     
  31. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    That is not a known issue, but I don't have Macs to test on, so it may occur there more often, I don't really know. I do have a 5 year old PC laptop with Intel HD 4000 that runs without this artifact.
     
  32. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    I am an industry professional, I've been making games and game technology for over 20 years. Some of my work has won Frontline Awards, I've been on a team that was nominated for an IGF award. I've been around for a while.

    Does that mean that this asset will work with absolutely every single CPU/GPU OS combo? No, I'm an indie dev now and I don't have a giant QA lab to test it on hundreds of different configurations.

    Now, having said that, it *should* run on pretty much every GPU that's less than 5 years old, and in many cases older. What are you running the demo on? Have you updated the graphics drivers?
     
  33. Iucounu

    Iucounu

    Joined:
    Oct 24, 2017
    Posts:
    19
    These two statements are somewhat inconsistent, I think.
    Perhaps it would be more honest then to say on the Asset Store page that this is an experimental asset, not suitable for any real production yet. When you make statements like "It will pretty much run everywhere PC, Mac, Linux, consoles, etc.", and then it turns out you didn't even test it on Mac (as well as on all those "Linux, consoles, etc." platforms, I now suspect), that doesn't sound good.

    Mac OS 10.12.6. On Mac OS graphics drivers come with OS updates, they can't be updated separately.

    As to Windows machine, it was Windows 7 with an AMD Radeon graphics card. I can't get the exact model right now since it wasn't my home computer.

    It doesn't mean it should run on every combo. It does, however, mean that since you "don't have Macs to test on", as you say, you shouldn't advertise it as working on Mac OS (or whatever else you want to include in your list of supported platforms). Especially when it comes to something you sell for money. Any professional software developer should know basic things like that.

    When you make statements about "industry professional" and stuff, your potential customers naturally have way higher expectations for your work than that of an average Joe posting yet another broken asset for sale. And, consequently, may end up being way more disappointed. I'm not attacking you in any way, just explaining what kind of impression you and your work give to a random guy just passing by (like me) who may (or may not) become your future customer.
     
  34. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442

    I have had zero complaints (until now) from Mac or Linux users, and I will pull any claims of working on those systems if I hear more. I'm not going to change that based on one data point. I, in fact, did test the Mac demo, just because I don't own one doesn't mean I don't test against it, just that I can't frequently. You're the first person I've heard of having any issues with the PC demo as well, and I've extensively tested that, so I'm not putting too much weight to your issues.

    You are absolutely attacking my credentials and the asset. It is a professional product made by a professional and of course it is in use in real production. Please do NOT buy it, I sure do not want you as a customer, random guy.
     
    Last edited: Mar 21, 2018
    Shodan0101 and Aubrey-Falconer like this.
  35. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Alright well that's a lot of anger. I suggest you both channel it in PM :)
     
  36. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    As a general point regarding mac compatibility of assets, we have very much entered an era where there are various big differences in capability between macs that support the Metal graphics API, and those that do not. Macs that support Metal are compute-shader capable and are suitable targets for Unitys HD pipeline. Those that do not are relegated to the LW pipeline (or other pipelines that people may write that do not require compute shaders).

    Metal support in Unity has been around quite a while now and has matured to the point that its going to be the default macos graphics api in the unity editor from 2018.1 onwards. And yet relatively few assets I have purchased or been interested in purchasing have specifically tested macOS metal compatibility. Several have looked into issues I discovered and fixed them, and they are heros to me, others are far less interested or dont have the setup required to fix such issues.
     
    Harinezumi likes this.
  37. Ardinius

    Ardinius

    Joined:
    Oct 4, 2015
    Posts:
    57
    I would just like to say:
    I purchased this asset a few days ago and just left a 5 star review.
    A huge thank you to your Brian for putting so much work into creating this wonderful asset.
    I have to say i am incredably impressed with not only the asset, but your care and attention that you put into supporting it on these forums. I have read every single post on this forum and you come across as a great guy that clearly is proud and keen to improve this asset, great to see!
     
    Xix-Interactive likes this.
  38. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Thanks for the kind words Ardinius, and thanks to everyone who has supported Hydroform! I'm working hard to make it the best product that it can be and to help everyone make the best projects that they can with it. There's still a lot of cool things to add, and your feedback keeps me going. I'm blessed with a great little community here, thank you!
     
  39. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    @Xix-Interactive The new underwater rendering system is exactly what I was looking for! I also just synchronized my live weather system's wind direction with Hydroform's wave direction, and the results are beautiful.

    How difficult would it be to fade the Hydroform water surface to transparent on the shoreline using a depth-buffer z-test? Every other aspect of your water system is now exceeding my expectations.

    hardoceanedge.jpg
     
  40. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Hello guys,

    Could someone post some pictures for the underwarter surface so I can see what it looks like? My game is mostly underwater in reefs and so on, and I would like to see the look of this water system from underwater...

    Regards,
    Carlos
     
  41. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    The Hydroform water surface should fade to transparent on the shoreline. Do you have ShoreFX enabled?
     
  42. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    I don't have one handy right now Carlos, so I'll re-post this one. The underwater is pretty basic right now, just a color filter (configurable color) and underwater fog (also configurable for distance and color).


     
  43. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    I do have ShoreFX enabled. Here's a screenshot of my current Hydroform config, which is the result of quite a bit of experimentation to get the most beautiful water and shorelines that I can:

    terra_hydroform.jpg

    For comparison, here's another experimental branch of the same project using UWS:

    terra_uws.jpg

    Hydroform is so much faster to render that it has been a fantastic choice for this project. I'm just experimenting to see how nice we can get it looking.
     
  44. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    I can also report that the horizon line mentioned by a previous poster is appearing for me at certain angles on a Windows 10 machine with a GTX 1080 card and all drivers updated. On this machine, the line is only ever a single pixel tall, and flickers in and out of view with even the slightest camera motion or rotation. It occurs both in editor, and in game builds. I am currently using the OpenGL Core graphics API.

    It isn't a big deal for my current use case, but I would love to know where it is coming from.

    hydroform_horizon.jpg
     
  45. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Xix-Interactive,

    Thank for your replay. I had seen that picture earlier. So the underwater surface doesn't have reflection or refraction or snell's window effect?

    Regards,
    Carlos
     
  46. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    OK, here's another one. Reflection - no, it sort of simulates reflection by using a single color. Refraction - yes. Snell's window - no, I'm sorry I don't even know what that is.


    upload_2018-3-26_23-52-10.png
     
  47. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    OK, so if you want the water to be more clear, like the UWS screenshot, try increasing the WaterClarity (under ShoreFX), and try decreasing Reflect Blend (under SurfaceFX).

    I'm not sure why the horizon line issue is occurring, which version of Unity are you using? If it's only a pixel worth of the artifact, you might be able to mask it by slightly increasing the fog density.
     
  48. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    Yes, I am currently using fog to mask the horizon line and this approach is working fine.

    Decreasing reflection blending to 0 makes for picture perfect shorelines, but a rather dull water surface. Attached is a sample with reflection blending set to 0.1. Would it be possible to expose a shore reflection blending control which would override the primary SurfaceFX setting where the water is shallow? This should enable the look I am going for.

    hydroform_reflection_blending_0_1.jpg
     
  49. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
  50. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    I've exposed the settings as best I can without changing the calculation. Take a look in WaterFun.cginc at the function getColorFromNormal(). At the bottom of that function is where the fresnel calculation is done and where it mixes the base, reflection, and refraction colors. Try changing those around, I'm sure you can get what you're looking for.