Search Unity

Ceto (Scrawks Ocean)

Discussion in 'Assets and Asset Store' started by scrawk, May 4, 2015.

  1. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Thanks guys.

    Was hoping its would be a little faster on a 980 but I think thats fine for visual demos. I was going to not include the extreme settings as I was concerned they would not be practical but I think this test has shown they could be useful for some application so I will leave them in.

    @bbennett2: Your alert came up when I was typing this so I will just say a quick thanks. The foam still needs some work.
     
    bbennett2 likes this.
  2. radimoto

    radimoto

    Joined:
    Aug 23, 2012
    Posts:
    257
    I get 17 fps on the extreme demo at 4K on my 980m. At 1080p I'm seeing a stable 30 fps.
     
  3. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    42 fps on asus gtx970 non boosted 1080p
     
  4. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I find the compute benchmarks in the following review to be most useful at times like this:

    http://www.anandtech.com/show/8526/nvidia-geforce-gtx-980-review/20

    You can see at least one where the 780Ti beats everything else on test there, including the 980 and AMD cards. The 980 is no good for double-precision float stuff it seems, even a 580 beats it!
     
  5. Rycon

    Rycon

    Joined:
    Nov 21, 2012
    Posts:
    4
    I have 24Gb ram so ram was not an issue. The extreme setting might be useful for rendering videos or cinematics for users who have high end pcs.
     
  6. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah I asked about - apparently the 780 ti is a lot better than 980 GTX in real world compute where lots of floats are involved, because nvidia cut down that performance considerably as people were just buying 780 ti for business and not the more expensive quadro/teslas. Benchmarks never tell a story like the real thing ie ceto. I wonder how fast it would be vsync off uncapped?

    A worrying trend given the rise of compute shader requirements in gaming. I think ultimately, graphics card manufacturers will just have to focus on ram being the selling point.
     
  8. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    scrawk, not long ago you captured my heart with "Ocean with BRDF lighting in Unity".
    Open beta (paid) sounds good!
    DX11
    • intel Graphics HD 4000 = 3 fps
    • nvidia GeForce GTX 680M = 19 fps
    ceto_19fps_nVidiaGTX680M_3fpsintelHD4k.jpg
     
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's probably best to use some textures to avoid too much compute stuff I guess, but scrawk knows all. He is god of the seas.
     
  10. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    59-60 fps on a 980 Ti when the boat is static. Drops to 55-57 when moving. Ran it at 1080p.

    REALLY impressive demo. The extreme settings are quite usable on a high end GPU.
     
  11. Risc4000

    Risc4000

    Joined:
    Jan 12, 2014
    Posts:
    5
    Well these is what we are looking for our engineering simulation we don't do game we do eng simulation training.
    we drop UE for the lock of good easy looking water to implement and Crytek is out of the question to complex for us.
    So we jump we Unity and is a easy system to use. these water/ocean is perfect I test the demo on our Nvidia GForce GTX Titan Z and run like a water...74fps :) no problem here..
     
  12. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    Try to reach the limit, With Extreme settings i had 24fps with a resolution of 3840 x 2160 (fantastic setting) Nvidia Geforce GTX 980. Good work
     

    Attached Files:

    • 4K.jpg
      4K.jpg
      File size:
      879.1 KB
      Views:
      1,083
    Last edited: Aug 17, 2015
  13. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Thanks to everyone who posted stats for the build with extreme settings. Was not expecting so many!

    One of the things Ive been working on for the next release is the overlay system. You have already seen some of it as this is how the foam trails are done. Its taking a little longer than expected but should be ready for the next update. Its a key feature in Ceto and will be used for things like wind ripples, splashes, foams trials, coast masks, shore waves, rogue waves, clipping holes, boat wakes, etc.

    In theory this works in a similar way to Unitys projectors. The difference is Ceto uses its own system. Unity has to re-render the mesh and apply the projector in a additive pass. For a complex mesh like the ocean re-rendering is not good for performance and as the projection is applied after the ocean is rendered there is a limit to what it can do. For example it can add color but can not affect the meshes position.

    Ceto uses a different method. Each overlay is rendered before the ocean is drawn. The overlays are drawn as quads and rendered into a texture in projector space where there values are accumulated. When the ocean is drawn it simply samples the texture. There are four textures a overlay can affect. There's a height, normal, foam and clip map. The height, normal and foam also store a mask value in the alpha channel allowing some options on how to apply the overlay. At the moment the overlay quads are drawn one by one but Im hoping to optimize this with a batching system. I already have something set up but its not working in dx9 for some strange reason.

    As a example a overlay with a height tex can be used to render addition waves on the ocean. A overlay with a height mask can be used to fade the wave heights up to the shore.

    I have some images to give a example but they are pretty basic at the moment as its still in development.

    This first one is a little hard to see but there is a mask applied to the heights, normals and foam. The green cube is sitting in the middle of the overlay. You can see that there are waves around the area but the mesh is flush along the sides of the cube showing that the wave heights have been masked to 0. The lighting also looks smoother as the normals have been masked.

    Ocean43.jpg
    Here the mask is also used as the foam texture. This is how the foam is added to the foam trials for the ship in the demos but here its just to show where the mask is.

    Ocean42.jpg

    And here the same masks are applied but the texture is also applied to the clip texture. This allows overlays to clip away areas of the ocean so you can have caves and holes in you terrain but hide the ocean. Clip overlays also affect buoyancy so this acts like a real hole in the mesh. If a ship sails over the hole it will fall into it. Of course if you dont want that you can just enable 'ignore querys' on the overlay.

    Ocean41.jpg

    This is just done with a clip operation in the shader so the mesh still needs to be drawn. The mesh is divided into quads and there is another feature culled 'Ocean culls' which allows you to designate a area to cull the ocean from. Any of the ocean quads that are in that area will not be drawn. Combine this with the clip overlays and you can create holes of any shape on the ocean and Ceto wont render (most) of the mesh in this area and the rest will be clipped away in the shader.
     
  14. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Great stuff. My beta inbox is quivering with unexpected delight.

    So basically using masks and so forth, it should be possible for ceto to deal with lakes inland and so on as well and not impact the fps much when only a little is seen? quite remarkable work!
     
  15. sashahush

    sashahush

    Joined:
    Sep 5, 2012
    Posts:
    75
    This looks stunning in extreme settings!
     
  16. WalterEspinar

    WalterEspinar

    Joined:
    Aug 23, 2011
    Posts:
    84
    Awsome work Scrawk!, dont run in Ati Card:(
     
  17. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Oooh...don't forget Decals. . . you know. . .some debris. . . or trash . . . .
     
  18. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Sounds great, could the mask be used to reduce wave height like a gradient from deep water to shore line.
     
  19. Xtense

    Xtense

    Joined:
    Feb 18, 2015
    Posts:
    34
    Sorry for pestering you like this, but we're nearing the moment when implementing water is necessary and we're absolutely in love with what we're seeing here - this is an awesome addon! Do you, perhaps, have any specific plans for an early release like you mentioned earlier, with a set date or otherwise?
     
  20. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    @hippocoder: Yes you can use the masking and culling for lakes. The culling of the mesh is not perfect due to the odd shape of the screen quads but if the culling area is large then the majority of the mesh wont be rendered. I would imagine that for those that do get rendered and clipped the shader would be quite fast.

    I was just wondering if you (or any of the beta tester) have run Ceto on a PS4? Did it work?

    @rea: Decals are possible but since the texture gets spread out over quite a large area Im not sure how much detail you could get in them but I will look into it.

    @John G.: Yep, thats exactly what they are designed to do.

    @Xtense: There will be a open beta starting in a week or two. The price will be $60 USD. There will still be some features missing but its still a couple of months away from being on the asset store.
     
  21. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Will check soon, I don't make frequent builds because there's so much to do at the moment :) any changes you do will be super minor though.

    There, I fixed that for you!
     
    spraycanmansam and scrawk like this.
  22. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Quick question if I may - lakes inland often have different heights (both lower and higher than sea level, so I wondered if it's possible to define a different height in an area? it doesn't need great granularity ie if it's just a few tiles here being pushed up (or down for water in caves) then that's great too.

    Our problem is we probably will be able to see the sea and inland lakes at the same time. It's not a major issue though, we can always render lakes with something else as sea is the hardest part :)
     
  23. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    You can have the lake area a different height but there is a limit on the height difference from the sea level. Hard to say what the exact amount is as it depends on waves heights but will be about +/- 10m. If the waves are small (wind speed < 4) then you may be able to push it to +/- 50m.

    The reason there is a limit is because the areas are still technically part of the same projected grid and the projection needs to take the total range (lowest and highest points) into account. The greater the range the more the verts in the mesh will be spread out and there wont be enough resolution in the mesh to see the waves at some point. Of course if the waves are small then this is less of a problem.

    If you have a lake on the top of a mountain or down in the depths of a cave then it would probably be best using a different method. Also at the moment the lake would have to be the same color as the ocean but I may add the ability to change the color in local areas.
     
  24. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Ah yeah I can see that would be a problem. Lakes aren't near enough to ocean, so we can happily pull down the wind speed as we go further inland. Overall though I signed up for an ocean so anything else is merely a low priority bonus! Main thing I'm looking forward to is how it reacts with beaches, cliffs and rocks (with white foamy stuff) and optimisations. Going to be brilliant. Thanks!
     
  25. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    Hey Scrawk, where can we buy this water at? Love your work, and your compute shader tutorials helped me tremendously a year ago for a kinect 2 project. I owe you $$...

    Pls sell access to what you have already made as alpha, and roll out updates as you can. I'll throw $100 for what you have and whenever you get around to more polish that would be a bonus. Meanwhile you get get some $$ coming in to keep you motivated. I don't need a ship game...I need realistic ocean from a distance... I'm using a unity port of this at the moment and yours is so much better... https://www.shadertoy.com/view/llsXD2
     
    Last edited: Aug 21, 2015
  26. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Next beta update will be in a few days and open beta will start from then.
     
    radimoto and bartm4n like this.
  27. bartm4n

    bartm4n

    Joined:
    Jun 20, 2013
    Posts:
    57
    This pleases the bartm4n :D Very impressive work displayed in every screenshot my friend!
     
  28. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    As long as bartm4n is pleased im happy.

    Just added a command buffer to do the grab pass for the refraction. This means that only 1 grab pass is ever done no matter how many meshes are used for the ocean.

    Problem is Ive had to move the mesh to the transparent queue to get this to work (cant get the command to execute at correct place other wise).

    This means the ocean does not write to the depth buffer so it will receive no shadows and post effect based on depth wont affect it. Is this a problem for anyone?

    You can always change the queue to alpha, disable the command buffer and uncomment the grab pass in the shader to go back to old method.
     
    bartm4n likes this.
  29. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I think the availability of choice is the main thing - If you could have a switch in the inspector or at least clearly document the changes needed then both would be accommodated. I think which is needed depends on the project
     
    bartm4n, Elecman and Karearea like this.
  30. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    The option for both methods would be great, hard to know which version works best with project without testing both ways.
     
    Last edited: Aug 22, 2015
    Karearea likes this.
  31. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Just an update for Truesky users, the latest build from Simul website has fixed thissues with clouds not rendering between camera and terrain/ocean.
    There working unreal together now. :cool: :D :cool:

    Truesky blending nicely with Ceto on the horizon:

    A nice shot from high altitude in demo scene:


    Flight sims are going to eat these two assets up :)
     
    bartm4n, Karearea and hopeful like this.
  32. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Oh wow that does look nice.

    Just changed some setting to make it more flight sim friendly. Added a disable read back option to the spectrum. That way you can have large wave textures (Fourier 512 on GPU) that will be needed for flight sims but there will be no read back to the CPU which is kills the fps. You cant get the wave heights but you might not need it for flight sim.
     
    Last edited: Aug 23, 2015
    Karearea, John-G and Elecman like this.
  33. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It seems to me shadows and effects like DOF would be pretty high up on what makes water pretty. In this case, what does refraction actually need? just a screen render texture of what was rendered before? Maybe the user can supply the required render texture for refraction, saving you a headache... or perhaps it's a unity bug.

    There's a command buffer pass in 5.2 that's just before transparent and after opaque as far as I know for plugin api.
     
  34. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    I decided to go back to the old methid as the default option so things will still look the same and yer I much prefer shadows and DOF on the ocean to.

    yes the refractions just needs a grab of what's in the screen. With a command buffer it would be the fastest way and you could also do some fancy effects like giving it bit of a blur or adding caustics. The option is there if people want it but just doing a grab in the shader is the most flexible method so will be the default.

    There reason the ocean can't use a command buffer to do the grab and write to depths is because you can only have the buffer execute before or after opaque objects are drawn. So if you want to grab the screen you need to move the ocean to the transperant queue so the buffer executes before its draw but of course transperant means no depths. Maybe there is a way but I havnt found it so far.

    you could always do a depth only pass of the ocean in the opaque queue but it means more draw calls and the ocean vert shader is expensive to run.
     
  35. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    I'd like to use Ceto for a floatplane use-case; you're effectively saying that we couldn't run buoyancy in flightsim mode? I'd certainly be more than happy enough with smaller, even visibly repeating textures, in order to keep buoyancy- going back to the conventional setup would have similar performance at the cost of smaller/more repeated texture coverage?
     
    Last edited: Aug 24, 2015
  36. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Don't worry you can still have buoyancy for your flight sim. What I was talking about there was just a option to disable the read back if the FFT is done on the GPU. Its completely optionly and the default option runs the FFT on the CPU.
     
    Karearea likes this.
  37. veddycent

    veddycent

    Joined:
    Jul 22, 2013
    Posts:
    109
    Hey Scrawk,

    I can't believe that I've only just come across this thread. I've been following your blog for just over a year and I'm really glad that you're (finally) making the work you did porting from Proland to Unity into an asset :)

    For work I created a 3D viz of an offshore wind farm for one of our clients. This used a sea sim from the asset store but I would very much like to try incorporating Ceto as it has a few extras that will aid in the realism :)



    I'm very much look forward to using Ceto.
    Keep up the good work!
    Regards
     
    scrawk likes this.
  38. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Looking forward to trying this asset out, hope you release it soon :)
     
    scrawk likes this.
  39. Blotee

    Blotee

    Joined:
    Aug 24, 2015
    Posts:
    2
    Your work is great Scrawk! I have been testing your initial free builds and they work like a charm!

    I wonder if I could try all these new features on the open beta build. When do you think that it would be available to download? I am currently working on a demo and It would be great to use your asset on it.

    Thanks for your great work! ;)
     
  40. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Should be ready soon. Maybe this week.
     
    Rycons and hippocoder like this.
  41. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Ive just updated all the demo builds (links on first post of first page) with the latest version.

    All the demos are in HDR and use uSky now. Iv also made a small change that might fix the AMD card bug. If you have had this issue please try the demo again and see if its fixed.

    This a shot of the extreme build.

    Ocean44.jpg
     
  42. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Nice! noticed foam texture tiling at grazing angles. Was impressed by your masking of the white blocks so waves smooth out there - great work. I am guessing its just a small step now toward foaming the edges of objects?
     
  43. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Hi scrawk. There are still issues with ati amd cards. (ati 5870 - ati 6850)

    I am attaching the screenshots.

    UntitledSimple1.jpg UntitledExtreme.jpg
     
  44. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Yer I didn't think it would fix it but it was worth a shot. I tried to go looking for some of those ATI cards but they are no longer sold. Im going to have to order them online.

    @hippocoder: yes, with a way to mask the shoreline it means I will focusing on the coast effects like edge foam soon.
     
    John-G and veddycent like this.
  45. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Perhaps its a double precision float issue, assuming you use those?
     
  46. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Im not using double's but I do think its a precision issue.

    @elias_t : The shots for the 5870 look different to the screen shots you posted before. Last time it looked like the mesh had exploded. Maybe what I change did work and this is another issue. Can please run it and on the GUI set the foam amount slider all the way to the left to set it 0 and see if that removes the black marks.
     
  47. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Ok. I have done that but makes no difference.

    As hippocoder said it might be a floating point precision issue.


    dx11 demo: simple2.jpg


    dx11 extreme: extreme2.jpg
     
  48. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Looks suspiciously like the foam texture actually (due to tiling of it being identifiable).
     
  49. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I certainly had a completely exploding mesh on ATI HD7970 when I tried last week, not like those latest screenshots. Will try new version now and report back.
     
  50. InfiniteDice

    InfiniteDice

    Joined:
    Jun 30, 2015
    Posts:
    44
    Hey man, yes the extreme demo isn't working on my ATI r7 260, the r7/r9 cards are available anywhere... Without wind speed (as previously noted by another user) it is smooth but then of course you can't see the water just a smooth plane. Still showing 22fps on 1080.
     
    scrawk likes this.