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

Ceto (Scrawks Ocean)

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

  1. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Yeah, I think this a Unity error.

    There is a patch to fix this but its still happening for some people.

    Can you try the 5.3.1p1 patch from here and see if it fixes it.
     
  2. Saevax

    Saevax

    Joined:
    Nov 3, 2012
    Posts:
    58

    The far clip plane on my camera was about 10km.

    I was mistaken on viewing from above, I tried viewing the ocean from around 3km without problem.

    At around -3km the viewing angle from 70+ degrees looking up takes my FPS from high 90s to single digits with a very rapid flickering.

    Even with a strong underwater fog if the far clip plan exceeds the ocean then it will still cause the issue.
     
  3. rageingnonsense

    rageingnonsense

    Joined:
    Dec 3, 2014
    Posts:
    99
    This is kind of unrelated, but I was just curious about how the horizon blending effect is achieved. I notice that even in the scene view, the ocean goes on into infinity. I'd like to learn how this is done so I can apply it to my terrain (I can see where it ends under the water), but all my google searches have given me results for unity fog effects. I am not sure what to search for.

    Can anyone point me in the right direction? some paper to ready or some tutorial out there? Even the terminology to google for would be helpful.
     
  4. rageingnonsense

    rageingnonsense

    Joined:
    Dec 3, 2014
    Posts:
    99
    also, on a related note; I confirmed that there is a path issue in the shaders. The shaders that have these includes:
    Code (csharp):
    1.  
    2.     #include "OceanShaderHeader.cginc"
    3.      #include "OceanDisplacement.cginc"
    4.      #include "OceanBRDF.cginc"
    5.      #include "OceanUnderWater.cginc"
    6.  
    need to be:
    Code (csharp):
    1.  
    2.     #include "./OceanShaderHeader.cginc"
    3.      #include "./OceanDisplacement.cginc"
    4.      #include "./OceanBRDF.cginc"
    5.      #include "./OceanUnderWater.cginc"
    6.  
    Otherwise Ceto doesn't work if not placed in Assets/Ceto. Very weird.
     
  5. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    @Saevax : Ok, thanks. I will look into it.

    @rageingnonsense : Im not sure what you mean by horizon blend. There nothing in Cetos shader to do this. I think the effect your referring to is just the reflection of the sky. Because of the Fresnel effect the reflection is strongest at the horizon so it look like the ocean blends into the sky.

    Thanks for the header info. Im not sure whats going on there. I dont seem to need the ./ in my project.

    Are you on a Mac or Windows?
     
  6. imtehQ

    imtehQ

    Joined:
    Feb 18, 2013
    Posts:
    232
    Last edited: Jan 22, 2016
  7. rageingnonsense

    rageingnonsense

    Joined:
    Dec 3, 2014
    Posts:
    99
    Hah you know... I never zoomed out far enough to notice that nothing special is being done, it is just a REALLY large mesh you generate, and appears to blend with horizon due to the sheer scale of it. I thought you were using some shader magic to extend it out. :p

    Yeah I am not sure why the paths are such an issue for me. I am on a Windows 7 machine. My path to Ceto looks like this:

    Assets/ThirdParty/Ceto

    It couldn't hurt to add the ./ anyways, as it does the same thing you want, but more directly.
     
  8. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Ok. it's caused by Cetos reflection camera trying to render particles. You will have to Unselect what ever layer your particles are on from the mask on Cetos Planar reflection script until I work out what is the issue.
     
  9. kideternal

    kideternal

    Joined:
    Nov 20, 2014
    Posts:
    82
  10. Imhotebkin

    Imhotebkin

    Joined:
    Feb 10, 2015
    Posts:
    18
    I have noticed quite an odd thing with the wave spectrum. When I change the wave calculations to the GPU, it gives me an error that my videocard does not support dx11 and switches back to cpu. Thing is I am using a GeForce GTX 960. Maybe it has something to do with the fact that the project is in dx9 (tis requiered). Can I somehow make the calculations work in dx9 (or what is causing this problem, I don't know)? I have really big waiting times on my gpu when it waits for the cpu to calculate all of this (the "other" section in the gpu profiler) so I really need the calculations on the gpu.

    Thanks for the water theory by the way. I noticed I forgot to reply to that=)
     
  11. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    If you have 'disable read backs' unticked on the spectrum and use a GPU fourier then the wave data is read back to the CPU using a compute shader. Since compute shaders are dx11 only you will get a warning its not supported and the ocean will fall back to its default.

    Even if your card is dx11 if you have Unity set to dx9 it wont use it.

    Reading back the data is not practical in dx9 and even on dx11 its very slow and I dont recommend this option for games.
    It was added as there are a lot of people using Ceto for engineering simulations where the fps is not as important.

    If your making a game that need fast access to the height data you will have to use a CPU method. 64 is recommended. I know it has less detail but its whats practical. The next update has a lot of improvements to the spectrum so it will be faster and there will be a option to use between 1-4 grids (Ceto currently uses 4 grids, less grids will be faster)
     
  12. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Here is something I am not quite sure is a bug or something I am doing. I have foam that follows the ship using a modified AddFoamTrail and it looks great when viewed vertically.

    But if I lower my viewing angle a bit it becomes blurred to the point of being unrecognizable.
     
  13. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    There are two things that you can change to increase the detail.

    Can you have a look at what the foam overlay resolution is set to on the ocean script. To get a decent resolution it should be on full.

    Also if you are using a GPU Fourier with out read backs then the ocean does not know what the range of the wave heights are so it defaults to the max range. This is the worse case for the projection and results in a lower resolution.

    If you go into the ocean script you will see two constants.

    Code (CSharp):
    1.        
    2.         /// <summary>
    3.         /// The max wave height from the spectrum.
    4.         /// This is just based from observation of the
    5.         /// heights when wind speed and scale are at there highest.
    6.         /// </summary>
    7.         public const float MAX_SPECTRUM_WAVE_HEIGHT = 50.0f;
    8.  
    9.         /// <summary>
    10.         /// The max wave height from the overlays.
    11.         /// </summary>
    12.         public const float MAX_OVERLAY_WAVE_HEIGHT = 30.0f;
    13.  
    You can manual adjust these.

    For example If the wind speed never creates waves larger than 20 meters lower the max spectrum wave height to 20. The overlay height is not as important as the ocean can work out what the max possible overlay height will be but you can change that one as well if you want.

    The reason this matters is the projection used by the grid and the overlays must fit to the current max wave heights. The catch is the larger this is the less on screen resolution you end up with.

    The projection also stays in a top down view so when the camera is at a low angle you also end up with less on screen resolution.

    I probably set the default spectrum one a bit to high.
     
  14. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    It is set for DOUBLE for the ocean and running in CPU_128 currently. I adjusted the values above (Spectrum:8, overlay:1) and it is better, but still 'glitters'. Not sure how else to explain it.
    With ocean foam it isn't quite as noticeable:

    Without ocean foam it stands out:


    The second side effect is now the larger waves and the height checks are way off. It seems to be correct to around midway, maybe a bit higher (15-18) but beyond that the height checks are way off.
    At the peak of the wave:


    At the trough (ship is sitting on the bottom):
     
    Peter77 likes this.
  15. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    On the positive side, here is my current iteration of wakes.


    The bow foam is a bit strong right now. It is all getting tweaked some more to account for different hull widths/lengths. Then it is getting cut apart and turned into separate textures that can trail behind the ship on joints so they will bend as the ship turns.
     
  16. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    @CaptainMurphy I realy like the look on the wakes, do they spread out from the stern?
     
    Last edited: Jan 25, 2016
  17. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Something's not right. With the CPU Fourier you should not even need to adjust it and the heights should not be affected. It should not glitter either.

    Looks like a bug. I will have a close look at that part of the code.

    Looking really good as well. That bow wake looks cool.
     
  18. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    @scrawk getting an issue with Ceto and the Fresnel effect of the Ocean script. Its causing speckles all around an objects above the water plane when viewed thru Trueskys Clouds. This is using the Opaque shader.
    For example I have a plane in/above clouds and the speckles are all around the object and are very noticeable when panning as the lag behind the object.

    The following are with Fresnel set to 10 where its most noticeable (Clouds are at Dusk to show the effect more)





    And here it is with Fresnel turned all the way to 0, It's not as a noticeable but then there is no colour in the water.

     
  19. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804

    Yeah, I accidentally broke something in the shader in last update that caused this.

    Have fixed it and attached the fixed OceanUnderWater file. Can you try and add it to Cetos Shader folder and see if it fixes the issue.

    You need to change the file extension from txt to cginc as Unity wont let me attach a cginc file.

    There may still be some small specks as there is another small issue.
     

    Attached Files:

  20. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    No luck with that, still have the same issue. May be related to Trueskys volumeteric clouds.
     
  21. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Posting some Pics to show how atmospheric you can get Ceto and TrueSky running together:









     
    kideternal, scrawk, Karearea and 3 others like this.
  22. kideternal

    kideternal

    Joined:
    Nov 20, 2014
    Posts:
    82
    Looking good. As you play with light-sources, remember to include some reflective light from below. :)
     
    John-G likes this.
  23. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Just posting if anyone is interested in picking up Ceto, it's in the Unity Staff Picks Sale with 20% off. :)
     
  24. duplexius

    duplexius

    Joined:
    Apr 24, 2015
    Posts:
    44
    I'm considering to buy this, but I have a question first.
    How many new shader keywords do you define? I'm currently already very close to the limit of 128.
     
  25. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Hi,

    Ceto uses 3 key words and the next version will have 4.

    I have set up the shader so all the key word can be removed if need by commenting them out and then uncommenting the #define for that option if you wish to use it.

    I can help you do that if needed.
     
  26. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Murphy's law- bought Ceto last night and had a premonition of this.. Delighted with how great it looks, performance is better than expected too. It's good value at full price anyway.

    Is that twin otter using the temporary Ceto buoyancy?
     
  27. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Sorry :)

    Performance will be even better in next update.

    I dont think the plane John G is using uses Cetos buoyancy.
     
  28. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
  29. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    773
    I was on the fence about getting Ceto, PlayWay, or the (free) Community Ocean Shader. Unfortunately, the Community Ocean still has a long way to go to match the features of the other packages, and PlayWay is still pretty pricey. The sale was just the push I needed to finally decide. Thanks for the heads up. :)
     
    John-G likes this.
  30. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    109
    I'm using Ceto in a professional simulation and need to set the Sea state by specifying the Significant wave height ( H1/3) and mean wave period; T1. https://en.wikipedia.org/wiki/Sea_state
    How would I do that ?
     
    jpfranssen likes this.
  31. PeteskiCamarginy

    PeteskiCamarginy

    Joined:
    Apr 18, 2013
    Posts:
    6
    Hi,
    I would like to ask if Ceto renders properly with the Oculus Rift please?
    Thanks..
     
    CaptainMurphy likes this.
  32. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Yes. It looks good in VR. I have done several levels with the DK2 and Ceto for testing.
     
  33. N3V-Developer

    N3V-Developer

    Joined:
    Jun 7, 2014
    Posts:
    20
    Hi, some questions to Ceto.
    1) Would it possible to set the rim-shader factor to the reflection and reflection intensity?
    2) I would like to add some V blur effects to reflection to, based on the camera angle to pixel intensity.
    Are the shaders editable?
    3) Is there an option to reduce water refraction/transparency / color setup?

    Thanks,
     
  34. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    Hello,

    I just bought this asset yesterday, and am still playing with it, but something weird happens with the opaque ocean prefab though, billboards that are in front of it are white for some reason.

    Here is a screenshot: http://prntscr.com/9vjvlk

    Anyone knows how to fix this?

    Cheers
     
  35. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Sorry but the waves are not generate based of these settings. They are only based of the wind speed and wave age settings at the moment.

    Something like the ITTC spectrum and sea state codes are being consider for a future update. A few people have asked about this. The next update is restructuring the spectrum code to make this easier to add in the future.

    I got the email you sent me and will have a look at that issue in the next few days.

    A few people have used Ceto with Oculus rift and it does work I am told. You may need to turn down some of the settings. The next Ceto version will have some faster options so will be better for VR.

    The opaque prefab gets its depth information a different way than the transparent one. It has to render the depth info using a replacement shader. This does not work for speed trees so they have to be excluded from the layer mask.

    If you look on the Underwater component on the ocean game object there is a 'Ocean Depths Mask' setting. You need to unselect what ever layer the trees are on. You may need to make a separate layer for the trees if you have them on default. This does mean that the trees cant be under the water as the depth effect wont work on them correctly.

    1 - I have no idea what your talking about here. There are lots of settings for the Fresnel effect as well as
    the reflections and refractions.

    2 - There is a shader to blur the reflections. Its just the same method as Unitys blur image effect. Yes you can edit it if you want. More blur options like V Blur are being consider for future updates.

    3 - Yes you can change the water color and transparency. There are quite a lot of settings for this.
     
  36. PeteskiCamarginy

    PeteskiCamarginy

    Joined:
    Apr 18, 2013
    Posts:
    6
    "A few people have used Ceto with Oculus rift and it does work I am told. You may need to turn down some of the settings. The next Ceto version will have some faster options so will be better for VR."

    Many thanks for the reply, I just purchased Ceto.
    Regards
    Pete
     
    scrawk likes this.
  37. RWChalmers

    RWChalmers

    Joined:
    May 1, 2015
    Posts:
    2
    Same here - there's a whole thread on it elsewhere - it's a Unity 5.3.1. issue - not related to CETO. The Unity folks are on it but don't have a fix yet.

    I solved it by rewinding my Unity install to v5.3.0f4.
     
    Last edited: Jan 28, 2016
    scrawk likes this.
  38. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    842
    Has anyone used this with XB1?? if so how well does it look/work.

    Thanks
     
  39. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    I am not aware of anyone who has tried it on XB1. It works fine in DX9 so I would guess it would be fine on XB1.

    If you try it and it does not work I am happy to give you a refund.

    Just make sure you keep the invoice number.
     
  40. bakelite

    bakelite

    Joined:
    Jan 13, 2016
    Posts:
    7
    I'm considering picking this up, but I noticed that the boat in the demo scene is shaking/twitching slightly, and when I'm driving it doesn't move in a particularly realistic way, especially in tall waves. Hopefully these issues are easily addressed?
     
  41. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    It's caused by the current buoyancy scripts. They are not very good and will be re- written soon.

    IF this is a issue I don't recommend buying it until it's resolved.
     
  42. imtehQ

    imtehQ

    Joined:
    Feb 18, 2013
    Posts:
    232
    I fixed that issue myself by rewriteing some of the code and building a better setup then the one in the demo,
    http://puu.sh/mNYhP/7f2159531b.jpg
    on top of that each point is connected to the raft with a fixed joint.
    Its not important if the points are part of the raft or not, but its easyer to know to what raft it belongs :p

    Using it like this will force the raft to act more realistic then normal as each point is using force to get where it want to be.
     
    scrawk likes this.
  43. imtehQ

    imtehQ

    Joined:
    Feb 18, 2013
    Posts:
    232
    I removed the all of the layers from the Reflection Mask on the Ocean object on the 'Planar Reflection' script. Its stoped the errors, and m fine with that at the moment.
     
  44. imtehQ

    imtehQ

    Joined:
    Feb 18, 2013
    Posts:
    232
  45. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    imtehQ likes this.
  46. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    842
    Sounds good. Thanks
     
  47. kideternal

    kideternal

    Joined:
    Nov 20, 2014
    Posts:
    82
    The IsFinite() error is still there in 5.3.2p1 in VR mode.

    Unity knows. There's a thread about this here: http://forum.unity3d.com/threads/un...-invalid-aabb-result-isfinite-d.374926/page-5

    The latest response from Unity is that this is fixed in 5.4. I just installed 5.4.0b3 and, it might be fixed but it's hard to tell. Heads-up @scrawk: Ceto is having both reflection and underwater rendering issues in 5.4.0b3. Hopefully it's just an issue with the beta.

    Unity patches have been frustratingly unreliable this past year. By the time they fix one thing, another thing breaks. They really need to improve their testing methods!
     
    Recluse likes this.
  48. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    The new issue with 5.4 is Cetos fault. Well kinda. Unity changed the way camera culling worked and it caused a error in Ceto.

    It has been fixed for the next update.
     
  49. sashahush

    sashahush

    Joined:
    Sep 5, 2012
    Posts:
    75
    So i just purchased Ceto and Truesky, my goal is to run them together, is there something that needs to be set
    for this to happen at the moment i have this result:

    From what it looks like the ocean is only being drawn if there's terrain under it.
    upload_2016-1-30_9-52-25.png

    Anyone run into this before? Cheers!
     
  50. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    You will need to use the Opaque prefab with Truesky.
    Currently Truesky does not run correctly with Ceto in transparency mode.
    Roderick is looking into this at the moment to get Truesky running in both modes.
    Also looking at the screenshot it looks like your using the version from asset store, this is an old version and I recommend you use the latest one from www.simul.co get V4.0.1.270 from downloads section.
     
    sashahush likes this.