Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Assets Hydroform Ocean Renderer [RELEASED]

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

  1. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    434
    Cheers on the new version! The horizon fix worked perfectly for me.

    Vondox has been offering a few suggestions on the Enviro thread about the masked/overdrawn horiozons issue. Here's the latest:

    https://forum.unity.com/threads/rel...nd-weather-system.317986/page-64#post-3783679
     
  2. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    348
    Hydroform doesn't render to the camera depth texture because that would require an extra pass which would be bad performance-wise. You can try and force it though and see if it resolves the issue.

    Set the Queue to "Opaque" and then you will need to set up a shadow caster pass, according to these docs:
    https://docs.unity3d.com/Manual/SL-CameraDepthTexture.html

    Also remove the line "ForceNoShadowCasting" in Water.shader - if you're lucky this might be all you need to do.

    This page mostly shows how to set up a shadowcaster pass:
    https://answers.unity.com/questions/1001603/shader-lightmode-shadowcaster-question.html
     
  3. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    434
    @Xix-Interactive I've experimented with your suggestions for a shadowcaster pass, but am still experiencing this issue. I'll PM you a link to an assetbundle with my test project in case you have a chance to take a look.

    Unity 2018.2.5f1 (64bit) - DemoScene.unity - Hydroform and Enviro - .jpg
     
  4. hedgefield

    hedgefield

    Joined:
    Jan 1, 2014
    Posts:
    14
    Ahoy, it seems Hydroform doesn't play too well with the Unity PostProcessing stack v2, specifically (only) the motion blur effect. When it is enabled and you start the game, the screen is blurred nonstop, as if the camera is moving, even when you are standing still. This only happens when a Hydroform ocean is in the scene.
     
    Xix-Interactive likes this.
  5. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    348
    It probably has something to do with using GrabPass. Does this occur when you turn off refraction in the ShoreFx tab?
     
  6. hedgefield

    hedgefield

    Joined:
    Jan 1, 2014
    Posts:
    14
    Ah, yeah you're right, turning off refraction stops the unwanted behaviour. The ocean doesn't blend so nicely with the shore now, but it's better than constant blurring!
     
  7. Hummy91

    Hummy91

    Joined:
    Jun 7, 2017
    Posts:
    13
    Hey guys, is there a simple way to get more control over the Volume culling/ ShoreFX feature?
    My use case consists of multiple islands (shores) so I am making use of the shore wave dampening settings and need to keep these in play.
    However I have collision enabled ocean vehicles, I don't want the ocean waves to get affected by these vehicles, at present I have these visually unappealing ocean 'sink holes' under all my boats. I'd assume I can pull this off with layers and culling but.. clueless.
     
  8. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    348
    Hey, sorry for the late reply. You basically want to set up the 'HeightCam' (located under the ocean prefab), such that the culling mask will cull out your boats. Ie, put your boats on a layer and then cull that layer out with the culling mask on HeightCam.
     
  9. Hummy91

    Hummy91

    Joined:
    Jun 7, 2017
    Posts:
    13
    Ahh, I knew there was something akin to that in here somewhere, easy fix thank you! Amazing asset never dissapoints*.
     
    Xix-Interactive likes this.
  10. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    348
    Thanks for the kind words, glad you are digging it!
     
  11. Hummy91

    Hummy91

    Joined:
    Jun 7, 2017
    Posts:
    13
    My refraction setting seems to cause some weird artifacting/ outlining around my character, regardless of my distance to the water. Any idea how I stamp this out without turning off refraction? https://imgur.com/a/FQhQTc3 Can be quite hard to see at times (because we have a day / night cycle) but, more so during night when it is visible, it's very blatant http://puu.sh/C8HNf/c6b919aad6.jpg
     
  12. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    348
    Hmmm, that is odd and should not be occuring.

    Here's a quick fix - look in WaterFunc.cs, go down to getRefractColor(), then change the 'distortion' value to 1.0 from 0.9. That should help that artifact.
     
    Hummy91 likes this.
  13. Koodetat

    Koodetat

    Joined:
    Apr 11, 2014
    Posts:
    13
    Hello everyone. I am looking for a buoyancy (boats) solution compatible with Hydroform. Does it exist? (paid or not). thank you.
     
  14. ekuNNN

    ekuNNN

    Joined:
    Sep 3, 2013
    Posts:
    19
    Is it possible to use raycasting on the ocean to get the wave normals? My raycast doesn't seem to be able to hit the ocean object so far, but maybe I'm missing something.
     
  15. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    348
  16. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    348
    Raycasting does not work with Hydroform. If you want a normal, you can do 3 GetHeight() queries and then calculate a normal from that. Sorry this isn't better supported :(
     
  17. ekuNNN

    ekuNNN

    Joined:
    Sep 3, 2013
    Posts:
    19
    Ah, no problem. Thanks for the quick response so I didn't try too long :] Great asset!
     
    Xix-Interactive likes this.
  18. blanxdev

    blanxdev

    Joined:
    Apr 4, 2018
    Posts:
    4
    Hi, is there someone with the same error in VR?
    bug1.PNG bug2.PNG

    When I look around the Volume Mask starts moving. Depending on the angle only in the left or right eye.
    HydroMultiCamComp is on the Main Camera with Single Pass rendering.
    Multi Pass has a similar error but the mesh just moves a bit differently.

    The Mask is for the Interior of the ship, so it's basicly under me. When I'm inside everything works fine. Just from the Exterior I get these Mask errors

    Anyone got a solution for this?
     
  19. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    348
    I'm so sorry, but volume masking does not work in VR at this time. Please contact me for a refund if you are unhappy with the asset.
     
  20. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    348
    I just realized that I forgot to include the latest manual in the latest build. It has instructions for setting up in VR. I've attached the new one to this post.
     

    Attached Files:

  21. blanxdev

    blanxdev

    Joined:
    Apr 4, 2018
    Posts:
    4
    Is there any other way to deactivate the ocean on runtime. Or just make it invisible?
     
  22. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    348
    Yes, if you deactivate the HydroMultiCamComp on the camera, it will no longer render the ocean.