Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Graphics Hydroform Ocean Renderer [RELEASED]

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

  1. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Xix,

    Are you working on the underwater at the moment? if not when do you think you will be implementing it? the underwater solution is the biggest fallout on any of the other water/ocean assets. And it is very important to make your asset take off from the other water/ocean solutions out there.

    Regards,
    Carlos
     
    Shodan0101 likes this.
  2. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Right now the priority is to fix bugs that haven't been addressed yet (deferred issues). After that, underwater for sure. I think I'm getting 2-3 requests a day for underwater rendering ;)
     
    bpears and Shodan0101 like this.
  3. tb2fear

    tb2fear

    Joined:
    Jun 14, 2013
    Posts:
    18
    Its nice looking water :)
    Even i am waiting for under water rendering feature.:D

    Just a question, will it support 360 panorama capture through various plugins like "VR Panorama 360" or "Helios".
    I am looking for this from long time. I have tested pano capture with "Suimono" and "Aquas" both the water plugins does not support 360 capturing :mad:

    By any chance if we get this feature with this plugin will be more than happy ;)
     
  4. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    What was the problem with the 360 pano capture? Was it a 360 problem, or a VR problem?

    AFAIK, the only issue with VR for Hydroform is the dynamic reflections, which can be switched off (and still get cubemap sky reflections). I don't know if the 360 pano presents other problems however.
     
  5. tb2fear

    tb2fear

    Joined:
    Jun 14, 2013
    Posts:
    18
    We faced following problems
    • Reflections were not proper (as you have mentioned)
    • Under water fog is not smooth. This created box shaped foggy cube region.
    • Under water surface does not render with fog.
    Hope this info helps :)
     
  6. oliran

    oliran

    Joined:
    Sep 29, 2015
    Posts:
    49
    Like tb2fear said, the water doesn't render with fog in the scene. Is that possible to fix?

    om
     
  7. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Hmm, I don't think you'd have fog problems, but then again Suimono and Aquas shouldn't either. Are you running in deferred mode or forward?
     
  8. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Yes, so I've been looking at deferred mode all week and haven't been able to get a custom native deferred shader working. So there are 2 possibilities:
    • I can add the fog into the shader so that it matches the distance fog for the Global Fog image effect.
      • This is the fastest solution performance-wise
    • I might be able to turn Hydroform into a full surface shader (optional setting).
      • This would have a bunch of overhead and slow it down a bit, but it would play nice with fog and lighting/shadows in deferred mode.
    I might be able to do both of these, but certainly the first is relatively easy and I could send that up fairly soon.
     
  9. ozgesamanci

    ozgesamanci

    Joined:
    Jan 20, 2017
    Posts:
    6
    Hello,

    I checked out the demo and I'm very impressed! Great work on this asset. I'm thinking about purchasing it, but I'd like to know how much I can modulate the waves. In the demo, they can only grow large enough to make a choppy sea, but I'm looking to implement huge, stormy waves in my project. Is this possible with your asset? If so, do you have any links to photos or videos (or a demo) you could share?

    Thanks!
     
  10. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Hi, thanks for the kind words!

    I'm not sure I understand the question, are you asking if the look of the waves changes as they get bigger? You can make them a bit more or less choppy by changing the frequency. You can also get them going in the same direction, in the demo they are opposing waves, which work for smaller waves. Here's a video I made a while ago where the waves are moving in the same direction and appear larger. You can scale them up to whatever size you want.


    Hope that answers your question!

    -Brian
     
  11. tb2fear

    tb2fear

    Joined:
    Jun 14, 2013
    Posts:
    18
    We are using deferred mode.
     
  12. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Yeah, so us poor water rendering devs have to resort to hacks to get fog working in deferred. I know that Aquas has a fog that the user has to kind of eyeball to match the scene, so I could see that going wrong for the panos. I'm hoping to use proper distance info from Unity to match distance fog in deferred mode.

    Generally deferred mode should be avoided for VR because you can't use MSAA. I don't know what you're doing though; if you're just looking at a cubemap, then MSAA probably wouldn't matter much.
     
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I generally just hack fog colour into vertex shader myself, just saying with a bit of tweaking can't really tell.
     
  14. grantiki

    grantiki

    Joined:
    Oct 13, 2014
    Posts:
    7
    Hey!!!!, your asset looks great! im doing Underwater VR Edu APP... can i use it with GearVR + GalaxyS6? Thanks!
     
  15. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Thank you! Unfortunately while it does run on mobile, it is not optimized for it, so I don't recommend it yet. Check back in a few weeks and hopefully I'll have a proper mobile version running.
     
  16. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Wanted to mention that the water looks great and running at 1500Fps is unheard of, but will you introduce other colors for the water because it currently only supports blue, on that note of color it doesn't seem to respect lighter and darker levels of depth for example in this image you can see that the water is a much lighter tropical blue where the depth is very shallow:



     
    bpears and Shodan0101 like this.
  17. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    You can absolutely change the water color to be whatever you like in the actual product. Most people don't want purple oceans, so I didn't offer that in the demo ;)

    That's a great suggestion for having a hue change as water gets deeper, I'll add that to my 'to do' list!
     
    bpears and Shodan0101 like this.
  18. ozgesamanci

    ozgesamanci

    Joined:
    Jan 20, 2017
    Posts:
    6
    Thanks for getting back to me, that does help. Can you post a picture or video of the waves scaled up much higher than they are in the demo? I'm going for a rough, stormy ocean, and tall waves is a big part of getting that effect across. I don't want them scaled to unrealistic heights, but I'd still want them a lot higher than in the video you posted or in the demo.
     
  19. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Well the shape would pretty much look the same, again you can tweak it a bit with frequency, foam threshold, foam texture scales and speeds, etc. But you can't really tell scale unless you have something recognizable to compare the waves to, like a ship. I don't have a ship model handy, or the time to make a video. I'm still elbow deep in fixing some issues so I can get the next update out.
     
    Shodan0101 likes this.
  20. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    What Issues exactly are you talking about that you were wrestling?
     
  21. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    I've been wrestling with deferred mode for about a week now and have exhausted every path I saw to simultaneously have a refraction texture and write to the depth texture for proper fogging via Global Fog.

    In order for Global Fog to work in deferred, there must be a ShadowCaster pass in a shader (this writes to depth buffer). Unfortunately unlike forward rendering, Deferred doesn't simultaneously write to the GBuffer and the depth buffer in the same pass. The ShadowCaster pass also writes to the color buffer, and so when GrabPass is called to fetch the screen texture, a white mess is returned rather than something that can be used for refraction. I tried a bunch of things to try and get GrabPass to come before the ShadowCaster pass without luck.

    I also tried to get the regular color pass to occur before the ShadowCaster pass, and this appears to be impossible as well. I even tried separating the ShadowCaster pass into a different material, duplicated the water geometry and assigned the regular color material/shader to one set of geometry with an earlier RenderQueue, and the ShadowCaster material to other geometry with a later RenderQueue, and THAT didn't even work.

    Then I tried using CommandBuffers instead of GrabPass so I could grab the screen before ShadowCaster. This worked-ish (the screen appeared to be a frame late, darker, and periodically flashed), but then the problem was that the 'fog' applied to refracted water as it gets deeper was not there. This occurs because again, the ShadowCaster pass comes first, writes to the depth buffer and now when it's read back I don't get the terrain depth, I instead get the surface depth, so it thinks all the water is at depth 0. Now, I could just use the depth buffer I use to determine the shorelines, but the CommandBuffer screen grab was just too glitchy to even try that. I tried several CameraEvents to hook into, but it was always glitchy.

    The final solution is disappointing, but works well enough and is faster than the multi-pass one. I simply added a "Fog Override" with a distance and falloff setting so the user can manually adjust it.
     
  22. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    So basically it is a specialized fog? I'm happy with that. The standard asset was just a little script anyhow.
     
  23. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Yeah, it's a custom fog that should be relatively easy to match up with Global Fog, so it should be fine for 90% of users.
     
    pixelsteam and bpears like this.
  24. wyattbiker

    wyattbiker

    Joined:
    Sep 4, 2014
    Posts:
    18
    Hi I am interested in this, but want to know if I have boats floating to make them rock with wave height and direction. I am interested in something simple not necessarily accurate so it makes it look like your boat moves up and down left right. Is there some way where one could do this? Thanks!
     
  25. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Hydroform has script inputs for getting the height of the waves at any point on the ocean. There is an included demo for that. This can be used to make a boat rock correctly with the waves. However you will need to do this yourself, there isn't a built-in boat simulator.
     
  26. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Ha HAAA! I've finally found a good fog solution for deferred mode - the 'Fog Override' idea didn't work very well in practice. Now I've got something that doesn't require lots of tweaking and just involves a custom version of GlobalFog with a few lines changed. Here's the proof of concept:

    Untitled-5.jpg

    I'll probably need a couple of days to get it all cleaned up and I've got some more little features coming, but hopefully I'll have a new version submitted this weekend. Very excited!
     
  27. wyattbiker

    wyattbiker

    Joined:
    Sep 4, 2014
    Posts:
    18
    Sounds great. Thanks!
     
  28. Shodan0101

    Shodan0101

    Joined:
    Mar 18, 2013
    Posts:
    141
    WOW!! Xix that looks awesome man!! Underwater fog similar?
     
    Xix-Interactive and pixelsteam like this.
  29. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    If you add color changing depth option, can you also include a strength option for that, or a similar effect
     
  30. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Thanks! Underwater is not in yet, but yeah it will fog in a similar way
     
    Shodan0101 likes this.
  31. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Do you mean like a density so that the user can change the fog distance when looking down into the water? Yes, I was hoping to get that in the latest update but just didn't have time to get it in yesterday. Coming soon, hopefully next weekend.
     
    Shodan0101 likes this.
  32. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    I submitted a new update yesterday, changelist below. I didn't get to some features, because I ran out of time and I wanted to make sure that the GlobalFog deferred solution was available ASAP. The other features should go up more quickly, the fog thing just took forever to find a good solution. It's basically just a new shader for the stock GlobalFog image effect. It supports height and radial options and matches everything perfectly without needing an extra pass, so I'm pretty happy with it.

    -------------------------------------------------------------------------------------------------------------------

    Added a solution for fogging via GlobalFog in deferred rendering path

    Fixed issue where had to flip indexing into depth and or reflection textures
    depending on platform / rendering path

    Improved refraction lookup - wasn't distorting the depth lookup, removed weird edge that was appearing sometimes

    Fixed CamController problem where it wasn't reading the yaw direction of the starting position correctly in some cases

    Other small fixes.
     
    Shodan0101 likes this.
  33. Shodan0101

    Shodan0101

    Joined:
    Mar 18, 2013
    Posts:
    141
    Xix your awesome! ;) cant wait for underwater and fog ect!! ;D
     
    Xix-Interactive likes this.
  34. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    I can't wait to get the underwater in too, I think I can rock it!

    Thanks to everyone for your interest and support, it really keeps me motivated!

    You guys can just call me Brian ;)
     
    Shodan0101 likes this.
  35. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    Oh I meant color changing depth for the water(or rather a changing white/black for depth*color? Idk), not the fog color. And then I was hoping there would be some sort of intensity variable to adjust the contrasting look of it.

    you can see the transition in this game:

    sdfasdfasdf.jpg
     
    Shodan0101 likes this.
  36. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Oh I see. For the color ramp from shallow to deep, I was thinking I could just provide 1-2 colors that it would shift to before going to the deep ocean color. You could adjust intensity via the colors directly. I also want to add some way to control how quickly it fades from translucent to opaque.
     
    bpears and Shodan0101 like this.
  37. Shodan0101

    Shodan0101

    Joined:
    Mar 18, 2013
    Posts:
    141
    Its a pleasure Brian! Thx for all you hard work and kickass attitude! Your ocean asset is looking awesome and its getting better and better!
     
    bpears and Xix-Interactive like this.
  38. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    Sounds great!
     
    Shodan0101 likes this.
  39. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Hey Brian,

    Do you think that some of the small fixes you did could have fix some of the problems with the weird shadows and black spots on the vegetation? or not yet?

    Regards,
    Carlos
     
    Shodan0101 likes this.
  40. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    It's possible, I'm not sure though. I'll be checking the build you sent me soon.
     
    Shodan0101 likes this.
  41. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Great! I can't wait to be able to use this great looking asset in the Xbox One game.

    Regards,
    Carlos
     
    Xix-Interactive and Shodan0101 like this.
  42. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    @Xix-Interactive,

    This looks very promising. You should include a link to your Hydroform Ocean System asset from the very first message in this thread. That is easier to find your asset for those who run into this thread in the forum thread.

    What documentation is included with your product? Is the documentation also available externally so it can be reviewed before purchase?
     
    Xix-Interactive likes this.
  43. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Yes, I know I really have got to stop working on features for a bit and promote this thing ;)

    There is a manual, I haven't gotten around to putting it online yet. here's a link to the latest version:

    http://bit.ly/2lBDtMO
     
  44. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    Kia ora

    I just heard of this wee gem, may I ask how I'd get on with this and an island that have lakes I needed to cut a hole in the sea mesh to prevent having duplicate water levels under water in the lowest lake. was weird going under water in the lake them going under water in the sea that was over the whole map
     
  45. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Unfortunately you cannot cut holes in Hydroform. What I would do in your situation is detect when the camera goes under the water level of the lake and then disable Hydroform. Re-activate it when back above the lake.
     
  46. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    Ok thanks for that answer,.. So your water is similar to Ceto in as much as it does not use a mesh I take it, I can when World Creator 2 in fully fleshed out raise ares of a landscape so lifting them enough to be above sea level would be a option if this would play nice with another water that was contained by the terrain
     
  47. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Thanks for the link to the docs.
     
    Xix-Interactive likes this.
  48. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    Right, yes, if you could raise the bottom of the lake to be above the ocean level, then that would be a good solution.
     
  49. Samuel-Wu

    Samuel-Wu

    Joined:
    Mar 4, 2015
    Posts:
    2
    As you say it can run in mobile. May i have a mobile apk demo please.
     
  50. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    442
    It runs very slowly on mobile, I do not recommend this asset for mobile! I don't think the store page says it runs on mobile? I'm going to check and make this clear.