Search Unity

New Pro Water!

Discussion in 'Announcements' started by Joe-Robins, Jan 12, 2011.

  1. Joe-Robins

    Joe-Robins

    Unity Technologies

    Joined:
    Apr 21, 2008
    Posts:
    430
    jashan likes this.
  2. MatthewJCollins

    MatthewJCollins

    Joined:
    Dec 3, 2009
    Posts:
    372
    Looks perty! Can't wait to check it out! Nice work guys!
     
  3. 3dDude

    3dDude

    Joined:
    Jul 4, 2010
    Posts:
    1,067
    WOW *faints* this is SO AWESOME!!!! :D What does it look like in unity basic?
     
  4. Tzan

    Tzan

    Joined:
    Apr 5, 2009
    Posts:
    736
    Looks great! nice work.
     
  5. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I saw that also. Looks like a major leap forward from the existing Pro water. I can't tell from the screenshot or video how it compares to the "community ocean shader"? Does it include "ocean waves"? Whitecaps? Boat wakes? Can it be used for underwater scenes as well? If so, that will be awesome!
     
  6. 3dDude

    3dDude

    Joined:
    Jul 4, 2010
    Posts:
    1,067
    Its times like these that I wish I had unity pro :(

    Does it automatically make waves at the shore in realtime?
     
  7. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Looks very sweet indeed :)
     
  8. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I studied the video again and it does appear that the new water shader does have waves and whitecaps. I may be mistaken, but doesn't it look like the boat is "displacing" water, ie. water is not leaking into the boat (as is typically the case with other water shaders)? Additionally, the sky looks quite nice. UT wouldn't happen to be hiding a nice real-time weather system in their bag of goodies would they? This update could make me a very happy camper... ;)
     
  9. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Cool, this is really nice - can't wait to get my hands on it ;-)
     
  10. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,688
    One more reason why I need pro. :)

    Will work for Food... err Pro.
     
  11. mikesgames

    mikesgames

    Joined:
    Apr 16, 2010
    Posts:
    1,071
    wish i had unity pro now :(
     
  12. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    This looks fantastic.
     
  13. ole

    ole

    Unity programmer

    Joined:
    Sep 30, 2010
    Posts:
    56
    bigkahuna, you are right about waves, whitecaps and displacement.

    the latter "water-not-entering-the-boat" thing however is a hack at the moment that we are maybe not packaging with the water.
     
  14. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Thanks ole. Will you give us access to water surface height and normal direction so we can calculate floating objects (like what is done with the "buoyancy" script in the community ocean shader)?

    Edit: After studying the new water asset video some more (probably a dozen times now) I've decided that to me it doesn't look like any ocean shader I've seen before in an indy engine. To my eye, the water probably looks a bit "too perfect" to look like a real ocean, but knowing Unity Tech it will likely have lots of room for tweaking to get things even better (ok, I'll admit it, I'm fussy when it comes to water). In fact it looks more like the water in this demo video (starting at about 1:29). Apparently that was done with the Cry engine. If we get water that looks that good, with white caps, access to the shader's surface geometry (so we can simulate buoyancy, splashes, etc.), compatible with projectors (so we can give it boat wakes, etc.) and some facility for underwater effects, then this might just be better than any water shader available on the market (within an indy's budget, that is). But that's, admittedly, a lot of if's ;) .
     
    Last edited: Jan 13, 2011
  15. houndie

    houndie

    Joined:
    Nov 25, 2010
    Posts:
    146
    Shhh or they won't give it to us :) hehe

     
  16. BRIK

    BRIK

    Joined:
    Nov 27, 2010
    Posts:
    131
    Me and my free version of Unity are so jelly.
     
  17. ole

    ole

    Unity programmer

    Joined:
    Sep 30, 2010
    Posts:
    56
    yes, getHeight getNormal gives something like this

    $water_floating.PNG
     
  18. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
  19. mikesgames

    mikesgames

    Joined:
    Apr 16, 2010
    Posts:
    1,071
    I would like to know if there is any changes to the free water??
     
  20. KillerSneak

    KillerSneak

    Joined:
    Jan 9, 2011
    Posts:
    38
    Indeed, it's a shader not?
     
  21. KITT

    KITT

    Joined:
    Jul 17, 2009
    Posts:
    221
    Awesome, awesome, awesome.
     
  22. thellama

    thellama

    Joined:
    Mar 25, 2010
    Posts:
    360
    Delicious! This just looks awesome. Unity once again brings more stuff to the table :D
     
  23. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Yummy ... this really is delicious :)
     
  24. ole

    ole

    Unity programmer

    Joined:
    Sep 30, 2010
    Posts:
    56
    yes, it includes a shader :)

    most importantly it uses depth and render textures, multiple cameras and some scripts.

    we are not 100% sure yet about free water upgrades as most features just require pro. e.g. foam and shore blending is based on a camera depth texture which requires pro. refraction uses grabpass which is also a pro feature. and so on :-(. making good looking water in free is still possible with some nice vertex animation and good texture and uv work though (usually this is specific for the use case, so a little hard to generalize). think infinity blade water, which hasn't really any fancy features.

    what we could do for free:
    - specular lighting (sun reflection)
    - vertex displacement (waves)
    - static cubemap reflection
    - bump displacement ("small wavees", for cubemap and specular lighting)
    - "refraction" (just simple alpha blending without perturbing uv's)

    but all this still won't enable the "drag´n´drop and it will just look good" feature :-/.
     
    Last edited: Jan 14, 2011
  25. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    @Ole - Thanks very much for the info. Two other things I'd really like (and I'm sure other folks will as well) are "boat wakes" and the ability to transition from above water to underwater. In the "community ocean shader" project we're able to add boat wakes by using a projector, can we do something similar with this new Pro water? Also, will there be some facility for us to transition from above water to underwater?
     
  26. spiralgear

    spiralgear

    Joined:
    Dec 13, 2007
    Posts:
    528
    This looks amazing. I have been struggling to roll my own decent looking water as of late, this is exactly what I needed.



    Are some other things getting an update as well? Or just the water?
     
  27. gustavolsson

    gustavolsson

    Joined:
    Jan 14, 2011
    Posts:
    339
    Wow, the new water prefab looks great! Will it be possible to customize the depth falloff-rate of each RGB channel separately? This is in my opinion the secret to great looking tropical water :)


    Another solution for floating objects is my newly released Buoyancy Toolkit on the Asset Store :) I haven't seen the implementation of the new water (obviously) but it should be straightforward to combine the two. Simply feed the buoyancy simulation with the wave function of the water.
     
  28. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    @gustavolsson - The toolkit looks interesting, PM sent.
     
  29. Schlumpfsack

    Schlumpfsack

    Joined:
    May 30, 2010
    Posts:
    608
    looks really really great!


    but the bird-animation....arggggggggg :D
     
  30. ole

    ole

    Unity programmer

    Joined:
    Sep 30, 2010
    Posts:
    56
    as many people were asking about what can be expected for unity indie/free users, i put together a quick video with only using indie features to show what is possible and where are the obvious limits.

    View attachment $indie_water_opt_med.mov.zip

    still, i think for many use cases, it can give better results to just produce good, customized water assets for unity free ...
     
  31. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    That's the indie version? Jeesh, that's pretty damn nice!

    @ole - I'm curious if you've taken a look at the "community ocean shader" project at all? The latest version (Trond's shader with Alexzzzz's edits) is actually quite good. I'm wondering if any of that might make it's way into the Unity "official" ocean shader?
     
  32. ole

    ole

    Unity programmer

    Joined:
    Sep 30, 2010
    Posts:
    56
    yup, we didn't set out to replace the community ocean shader, we just wanted to upgrade our existing water prefab to be a better starting point for people in need of a water surface in their scenes. so our goal was not to create a full blown ocean editor solution but to give a nice, easy to use, good looking and very performant starting point that works from free and low end to pro and high end. so there were quite some compromises.

    as a matter of fact, the community ocean shader is more advanced in some areas (e.g. mesh generation). if i have time one day, i could add a profile to the water prefab that incorporates more of the community ocean features ...
     
  33. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I'm sure everyone will appreciate whatever you can add. :)
     
  34. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    I love Unity3d so much. That indie water is amazing too.
     
  35. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    216
    I think I speak for everyone here by saying Holy Crapness!!!!!!!!!!!!!!!

    I decided to make the investment in Pro a long time ago and the version upgrade etc.. and I have to say the thing that I love about Unity even more than the features and it's amazing potential is how the development team takes the time to read community posts and take into consideration our ideas. That is worth the cost of Unity Pro and much more in my opinion. I think that the end product of Unity 3 will be truly epic. Thanks guys!
     
  36. Ayce

    Ayce

    Joined:
    Jun 8, 2008
    Posts:
    101
    That movie is very nice indeed! I first thought it was a bit wierd with the rocks looking like they are floating, then I realized the camera is on a board that "is" floating. WOW! Glad I finally took the 3 plunge.
     
  37. ArchaicJohn

    ArchaicJohn

    Joined:
    Nov 1, 2010
    Posts:
    28
    Wow, both versions look *great*. As an indie user (at least until I get a release out and generate some revenue) I'm stoked about that indie water. it looks perfect for a project I'm working on.

    3.2 looks like it's shaping up to be one hell of a release.
     
  38. ColossalDuck

    ColossalDuck

    Joined:
    Jun 6, 2009
    Posts:
    3,246
    I concur.
     
  39. mikesgames

    mikesgames

    Joined:
    Apr 16, 2010
    Posts:
    1,071
    could we have a copy of the edited free version of the water ;)

    Mike
     
  40. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    216
    Quick technical question if you don't mind...

    I am working on a massive ocean based world and have a paging system in place for loading portions of the world based on lat and long in the game. Sooooo.... my questions is this.. how well does this shader line up on a grid? For instance you have 4 tiles each with the new pro water shader on them. Will there be seams between them with the wave manipulation? The only other thing I can think to do is to actually try and scroll the material on a water plane using it's offset values and have the plane attached to the boat so that it looks like the boat is moving but really both the boat and water are standing still. Do you think that would be possible assuming they don't seamlessly tile? Also, what about the foam around land if I scroll the material would it compensate for that or would the foam scroll away from the land? lol sorry for the weird questions.

    Thanks ahead of time! This will help me a lot in the mean time on pointing me in the right direction of continuing to work with the tiling system or setting up a scrolling material solution.
     
  41. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    @rutecht - I haven't seen the new Pro water yet, but have you checked out the "Community Ocean Shader Project"? That shader includes an LOD system that would allow you to do what you're looking for.
     
  42. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    216
    @bigkahuna

    Thanks. Actually I have set it up in my project but it's not exactly what I'm looking for. I should mention since you brought up the ocean shader project which is really cool, something you might want to do is organizing all the updates on it. I found it very difficult to figure out what the latest version of it was.

    The problem with the ocean project was that is uses a few more FPS than I'd like in my particular case. So... with the added foam feature of the pro water and the hope that it is a little more efficient for the scale I'm looking at that's why I'm leaning more in this direction. My game's view port is kind of like an RTS god view and the ocean shader is really better for something close up and personal like a boat racing game or something where you need that kind of detail in my opinion.

    At the moment I'm using planes with the pro water shader on it and I can do what I need just fine. My questions arise with the apparent new wave feature that I saw in the demo video on the dev blog. I'm concerned that if I put my water planes next to each other they won't match up anymore.
     
  43. Red Ocktober

    Red Ocktober

    Joined:
    Oct 28, 2005
    Posts:
    84
    @ rutech...

    i'm verrrry much interested in this... i too have implemented an infinite ocean system using a 3x3 tiled based on a treadmill algorithm...



    my implementation has realtime displaced wave action and the waves (amazingly :D ) joined up seamlessly at the edges... i'd like to implement the same thing in Unity...

    looking forward to 3.2... and also anything you find out as well...

    good luck...

    --Mike
     
  44. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    216
    @RedOctober

    You know actually as I have been pushing away at my project anyways I found implementing the single water plane solution then resetting it to 0,0 using a floating origin script after I travel a distance gave me a performance boost of about 100 FPS vs implementing multiple tiles. I realize that sounds confusing. Basically imagine that after my boat travels 200 units in one direction that the entire map is attached to the boat and the boat is moved to 0,0 with the exception of my water plane and sky sphere etc.. which are just centered on 0,0 separately.

    I find when my script moves my water plane along with everything else back in relation to the origin that the shader resets itself so no problems with reflections etc.. my guess is that since the foam is part of a shader vs. a mesh that it should be no problem. The best part is that since I never get close to my water plane's edge I don't have to worry about waves at all. The only down side is that there is an ever so slight jitter that happens during the reset. What has yet to be seen with the new water is with the addition of waves if that jitter will become more obvious or not. Still though... I figure an occasional jitter for a 100 fps gain is worth it.
     
  45. ole

    ole

    Unity programmer

    Joined:
    Sep 30, 2010
    Posts:
    56
    regarding animations, the prefab is using world space positions, offset by local vertex position, so a paging system for small water tiles should work* :). however, some logic should be tweaked (calculations parameter handling should be moved out of individual 'patches' and into some global paging entity) ...

    * it's a different story though if individual water patches have different vertex densities
     
  46. Red Ocktober

    Red Ocktober

    Joined:
    Oct 28, 2005
    Posts:
    84
    this doesn't sound confusing at all... i've actually used a similar algorithm due to 3DRAD having issues if a physics object moves too far from the "world center", in which case i have to reset everything in the scene back to 0,0,0 while keeping track of their "virtual" positions...

    i never thought of using it for the water though... hmmmm... :)


    --Mike
     
  47. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    216
    Thanks Ole for the response!

    I think what I may try and do when this comes out is to stick with my single water plane positioned at the origin and then see if I can simply adjust the wave position at the time of scene reset. That is if the waves suddenly change when the floating origin reset is made due to the boat attached camera being moved suddenly to a different location on the plane.
     
  48. Krazoa

    Krazoa

    Joined:
    Dec 12, 2009
    Posts:
    17
    That water is just making me want to get Unity Pro even more ^.^
     
  49. GarethF

    GarethF

    Joined:
    Oct 6, 2010
    Posts:
    16
    Where can I get that upgraded indie water with the waves? I've upgraded to 3.2 and the water I have stays flat no matter what I put the wave scale to. Or am I missing something obvious?
     
  50. RHD

    RHD

    Joined:
    Mar 30, 2009
    Posts:
    719
    Just downloaded the latest Pro version and am trying to get to grips with the water. Among other things. It doesn't look like the demo video!

    No reflections, refractions seems to work, float script produces weird results. I'm probably doing it all wrong but that's what happens when there aren't any instructions.

    I think it's trying to produce foam round the sea shore. It's lots better than the old one anyway. Just wish I knew more about how to use it.


    Update.
    I just found a whole load of customisable options. OK WOW! Loads of fun!!!
     
    Last edited: Mar 13, 2011