Search Unity

Ceto (Scrawks Ocean)

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

  1. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Only in GPU, CPU is correct. They appear to be off in the direction of the waves, so it will have you in/near the trough when the wave is at peak a lot of the time. It stays consistent, so it appears to be just an offset issue.
     
  2. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Ahh ok. Sounds like just a offset issue. I need to sort a few bugs out that have come up in last version so will add that one to the list.

    I will sort them out as Im setting up the asset store submission this week.
     
  3. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Anything in the works for a wave query that can get height between two points? Something that could simplify getting the height for raycast intersection.
     
  4. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Wouldn't work if the starting position and the ending position are above water and there is a wave in between.

    My other purpose is for making bow splashes by using a cast type of check downward to get the water height to generate a particle. Currently I have a set of points and a batch method of checking along the lines at a certain resolution and generating the particles based on the current forward speed. Works fine for a couple of ships but when you get to around 20 or so and each ship making its own batch it gets costly. If there isn't another way it will just have to be moved to a single batch and done that way I guess.

    An example with placeholders and the gizmos showing the position tracking. Blue spheres are the transform origin, the green sphere is where the water currently intersects.
     
    John-G likes this.
  5. kideternal

    kideternal

    Joined:
    Nov 20, 2014
    Posts:
    82
    Ah, that makes sense. I should probably refrain from posting before morning coffee. ;)

    Anyway, here's another stupid thought: I'd experiment with adding a single bow-wave particle emitter per ship that adjusts its vertical position based on one SampleHeight call. Have it emit several particles for a second or two, that are large enough to cover any changes in wave height along the front of the ship. With the right tweaking you can get something nice, and accuracy isn't particularly important here when performance is a concern. (Use a round image map and have it quickly grow in size and then slowly shrink & lose alpha, with ~500 particles for ~2 seconds. Increase particle size and emission rate with speed.) I have a VR project that needs 90 FPS at all times, and have achieved some "good enough" results doing this.
     
  6. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    I guess I could if you really needed it but it would be very expensive to do. The only way to do this is to sample along the segment until the part of the segment is found that intersects the water which sound like what your doing already. There's not really a faster way to do this.

    The GPU height issue is fixed. Will be in next update. If you need the fix now Ive attached the fixed script. Its just the CBUtility script that needs to be replaced.
     

    Attached Files:

  7. kideternal

    kideternal

    Joined:
    Nov 20, 2014
    Posts:
    82
    @scrawk How's progress on the release going? Was hoping to integrate Ceto this weekend... Don't get stage-fright; we all know it's a work in progress, and Unity makes doing updates fairly simple. :)
     
  8. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    I was hoping to have it out last week but there were still some issues I had to sort out. Im working all weekend so it wont be released until next week. I set up a website and registered a business last week (for tax stuff) and will hopefully get some admin stuff like a manual done in my spare time this weekend.

    I also need to register as a publisher on the asset store. Don't know how long that takes so if there's a issue it could delay the release some more.
     
  9. Sayokee

    Sayokee

    Joined:
    Sep 20, 2015
    Posts:
    6
    I like it. When is the release date dude? :p
     
  10. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    I'm sure he'll let us know when he releases it. :)

    I'm glad he's keeping it on the work bench until it is truly ready to go. That will save everyone a bit of grief.
     
    Homer-Johnston, Sayokee and jdraper3 like this.
  11. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Just made some terrain up quickly for some screen shots to go on the asset store.

    There not the best but they will have to do for now. When I have time I will try and make some nicer ones. If any of the beta testers have some good screen shots I would be happy to use them.

    CetoIsland1.jpg
    CetoIsland0.jpg
    CetoIsland2.jpg
     
    KingLlama, sashahush, SAOTA and 11 others like this.
  12. Beennn

    Beennn

    Joined:
    Sep 11, 2010
    Posts:
    373
    Can't wait to get my hands on this!
     
  13. Dazza007

    Dazza007

    Joined:
    Feb 11, 2014
    Posts:
    9
    Sweet - pity I'm not a Beta tester - am working on some snowy Norway Fiords for a flight sim at the moment. (With battleships)
    Eagerly awaiting the release so I can replace my very poor default water plane.

    Cheers
    Darrin
     
  14. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    A Lagoon! ..so ready for Ceto!
     
  15. Sayokee

    Sayokee

    Joined:
    Sep 20, 2015
    Posts:
    6
    This is great! Im ready for this, oh my god. Great work.
     
  16. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Version 1.0.5 has been released and uploaded to the asset store.

    The asset will be released under the publisher name Digital Dust. Thats the name my business is registered under.

    Beta testers you can download it from the link now.

    There is also a very rough manual that can be downloaded here.

    If you are thinking of purchasing Ceto please see the version file found here. It contains a list of know problems. Please read to see if any of them will affect you.

    For those of you who have been having trouble with the Unity terrain in deferred rendering when using the opaque ocean material not showing up underwater I dont have a fix for that but the issue has gone away in Unity 5.2 so try updating if you can. It looks like Unity has moved the render queue of the terrain and it is now showing up in the grab pass.

    Ceto Version 1.0.5

    - fixed issue where null exception and key already added to dictionary could happen when calling
    CreateAndCacheCondition on wave spectrum.

    - fixed bug where the read back for GPU displacements was not working.

    - fixed a bug where changing the projected grid resolution or the screen size caused the
    projection not to be updated correctly.

    - Fixed a issue with the tree bark ocean depth replacement shader.

    - Fixed a issue where the inscatter was not being applied using the correct depth blend.

    - Fixed a issue where resources where not being released correctly. This was causing
    render textures and meshes to build up in the editor.

    - Fixed a issue where the reflection camera was not copying from the target camera.

    - More GC optimizations.

    - Fixed a issue where alpha value was not being set in the shader.

    - Fixed a issue where using the depth information for the underwater effect directly from
    the depth buffer then a artefact was occurring when using dx9/Deferred on Nivida cards.

    - There is now a depth mode on the UnderWater component. When set to USE_OCEAN_DEPTH_PASS
    the depth information will be created by doing a separate depth pass of all objects in the depth
    layer mask. This will result in more draw calls but is needed when the material is in the opaque
    queue. If set to USE_DEPTH_BUFFER the depth info will come directly from the depth buffer. This
    means there is no need for a separate depth pass but this option will only work when the material
    is in the transparent queue.

    CetoSubmission.jpg
     
    sashahush, John-G, eskovas and 13 others like this.
  17. grizzly

    grizzly

    Joined:
    Dec 5, 2012
    Posts:
    357
    Impressive work! Many congratulations on your first release, Scrawk. :)
     
    hopeful and SAOTA like this.
  18. Sayokee

    Sayokee

    Joined:
    Sep 20, 2015
    Posts:
    6
    is it already up? because I cannot find it in the asset store :p
     
  19. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    At the rate the asset store approves projects I would expect it sometime midway through next week.
     
    Sayokee likes this.
  20. Fenris2

    Fenris2

    Joined:
    Aug 25, 2014
    Posts:
    61
    Definitely looking at your asset after playing with the demo and perusing the manual. The overlay functionality looks like it could have a lot of potential. Will Ceto come with source?
     
  21. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Congratulations on release, scrawk!
     
    SAOTA likes this.
  22. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Yes. Full source. All 150 scripts and shaders.
     
  23. pixelquaternion

    pixelquaternion

    Joined:
    Jun 28, 2014
    Posts:
    122
    Great work Scrawk finally a decent ocean for unity, now just crossing my fingers for a decent buoyancy system and I'm sold!

    Regards
     
    KingLlama likes this.
  24. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Buoyancy is actually pretty easy. There are a ton of good examples of how to do the calculations, and now that Ceto can get the heights super fast it is feasible to do a lot more probes.
     
  25. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    First major update should have a new buoyancy system. Both a fancy voxel based one and a simpler more practical one.
     
  26. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Sounds great scrawk and congrats on the release.
     
  27. pixelquaternion

    pixelquaternion

    Joined:
    Jun 28, 2014
    Posts:
    122
    Well that some more great news and i am drooling with anticipation to see it in action, count me as new customer the minute this is done.

    Fantastic dedication you put in your work and you deserved success for it.

    Regards
     
  28. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    What is the preferred Weather system known to work with Ceto? For me, everything starts with Ceto, and I want to make sure as soon as it's downloaded any Weather systems work with it.
    Any Beta Tester use / try these assets?
    1. Nuaj
    2. TENKOKU Dynamic Sky
    3. Time of Day
    4. ARS Weather
     
    Beennn likes this.
  29. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    I have used Time of Day extensively. It works great with it, no issues to speak of.
     
  30. dradb

    dradb

    Joined:
    Jan 10, 2015
    Posts:
    86
    Has it been tested under Android yet?
     
  31. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    Didn't he mention that you should expect poor performance on mobile? It may or may not work, but what's the point if its slow?
     
  32. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    I think it works but you wont get a frame rate thats practical.

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

    Theres going to be a bug with Unitys default sky box in the demo scene when this goes on the assets store.
    I only just switched to the default sky box and didnt see it until now.

    To fix this just using any other sky box. I will just add a different sky box on new update.


    SkyboxBug.jpg
     
  33. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    New build is working much better, not getting the ocean freeze after time which was happening to me randomly before.
    Have discovered a small issue, that hopefully can be fixed easily.
    When underwater the further you go below waterlevel the brighter the adsorption gets untill you eventually hit -1000meters where it is white.



    Can this be reversed so the deeper you submerge the darker the absorption becomes to an almost blue/black colour.



    Would be ideal if the user could select the required Deep Colour so the transition was from Below In-scatter modifier colour to that of a user selected colour.
     
    hopeful likes this.
  34. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804

    At -1000 meter you hit the bottom of the ocean.

    Theres a bottom mesh that surrounds everything and below 1000m you go outside that mesh and the under water effect no longer gets applied correctly.

    It gets lighter because the closer you get to the mesh the smaller the distance and therefore the smaller the water absorption that gets applied which makes the color lighter.

    Things like this will get tweaked in the future but at the moment is not high on the priority list. I would expect most games wouldn't have you diving that deep. The underwater stuff is still missing a lot of features.

    You can change the max depth. In the Underwater script the OCEAN_BOTTOM_DEPTH can be changed but I don't know what side effects that may have at the moment.
     
    John-G likes this.
  35. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Ok will play around with it a bit, but not major since max dive depth I really need is 250 meters. :)
     
  36. dradb

    dradb

    Joined:
    Jan 10, 2015
    Posts:
    86
    I don't need foam, bouyancy or any extra features. I'd be very happy it the original version as it stands, worked on mobiles at a modest frame rate. I get about 25 fps on my laptop. Is mobile operation in any way possible please?

    There's a NeoOcean demo that has foam trails but quite horrible looking waves. It runs on my low end mobile at about 18 fps and looks fine.
     
    Last edited: Oct 7, 2015
  37. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    I wont know how practical it will be until people try it and tell me.

    I think the slowest part for mobile will be the shader. Maybe a mobile version shader can be written. As for the other features you can always disable them but the more you disable the more it starts to look like any other basic water package.
     
  38. pixelquaternion

    pixelquaternion

    Joined:
    Jun 28, 2014
    Posts:
    122
    A decent ocean system is not meant to be used on a mobile device but for desktop since it is the only platform that will make it shine.

    I don't understand that madness about making everything for mobiles since who want to play a beautiful game with all the latest tech on a 3 by 4 screen!
     
  39. sashahush

    sashahush

    Joined:
    Sep 5, 2012
    Posts:
    75
    When will this be in the asset store? I've been waiting for months!!!
     
  40. dradb

    dradb

    Joined:
    Jan 10, 2015
    Posts:
    86
    Most people it seems: "Such devices [mobiles] saw a double-digit percentage point increase this year [2014], with 56 percent of gamers using them to play games."

    Revenue. In the next 5 years mobile gaming will be bigger than PCs.
    http://i.imgur.com/cxSx0By.png
     
  41. dradb

    dradb

    Joined:
    Jan 10, 2015
    Posts:
    86
    The original version won't run at all under Android ... although it looks fantastic on a PC. Do you know what the problem was for Android? Is it fixed now?
     
  42. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    In the next 5 years a mobile device won't be sub par, either. With the expansion of the processing power and storage in devices we will be able to run Ceto on it without a hitch.
     
  43. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    272
    -1000M depth
    Please explore this until; it breaks. The depth control you describe is exactly what is needed for my current project.
    Keep in mind, there can be trenches to explore. ;)
    I suspect using real world measurements will be the standard considering all the wave calculations. So Ocean Depth in Kilometers should work the same if designing for a fictitious planet or the Earth.
     
    Last edited: Oct 8, 2015
  44. pixelquaternion

    pixelquaternion

    Joined:
    Jun 28, 2014
    Posts:
    122
    Doesn't change the fact that a game is a lot more appealing on a desktop but i can understand for stupid game played in the bus.
     
  45. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    OK no more discussion about android this and that. The author has stated it's not intended for the device and hassling an author is a bit much.
     
    KWaldt, ZJP and bartm4n like this.
  46. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    @sashahush : Its still waiting to be approved by Unity. Im expecting that to happen today or tomorrow. Unless they reject it for some reason. In that case I will have to fix the issue and resubmit it which would take another week.

    @sadicus: I don't think supporting deep oceans like 10km will be a issue. Its just not something Ive had time to look into at the moment. Probably only needs a few tweaks to support this.
     
    Dazza007 and Rycons like this.
  47. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    A bug has been found that causes Ceto to crash the graphics card on some integrated card.

    If you go to the Ocean.cs script on line 908 you will see this

    CreateOverlay("Clip", cam, clipOverlaySize, RenderTextureFormat.R8, true, ref data.overlay.clip);

    This creates the clip overlay buffer. It has a format of R8. It looks like on these cards they crash if rendering into a R8 texture. Change the format to RHalf and it should solve the issue.

    CreateOverlay("Clip", cam, clipOverlaySize, RenderTextureFormat.RHalf, true, ref data.overlay.clip);

    This will be fixed in the next update.
     
  48. InfiniteDice

    InfiniteDice

    Joined:
    Jun 30, 2015
    Posts:
    44
    Hi scrawk, I'm wondering again on the support for raised bodies of water (+/- 15m) within fairly tight conditions. Say a raised swimming pool beside the primary water level. I need this and I'm wondering at the moment how I'll overcome this issue. Do I run multiple ceto entities and toggle them? Can i specify how large a ceto body can be and have more than one at a time (one in the pool and one for the primary)?

    Ideas or suggestions would be welcome.
     
  49. IronDuke

    IronDuke

    Joined:
    May 13, 2014
    Posts:
    132
    Is it possible in Ceto to cause splashes/ripples in the water geometry? Basically extra waves. I was wondering because it's a grid, and I don't know if it could be done. The project I'm doing will have huge space-craft (250 meters is medium sized:eek:) doing splashdowns into the ocean. In fact, the 1000 meter long destroyers cannot land on a planet's surface because there may not be any room if it's populated heavily, so the use the ocean as a landing pad. Never lose your sense of humor, even in space.:D
    So the ships need to make mini-tsunamis when they land.

    --IronDuke
     
  50. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    @InfiniteDice you can do this with a wave overlay. It's just a method to modify the waves at a local position. You can use this to raise the water level to where you want and you can clip away the area around if needed.

    The default amount you can displace with a overlay is set to 10m by default but you can change this in the script.

    You just create a game object and add a AddWaveOverlay script. Then add a solid white texture to the height tex and adjust the height with the alpha slider until it's at the level you want.

    im not sure how practical this will be and I may add a separate mesh that can be used for smaller bodies of water. At the moment you can only have one ocean mesh that is infinite in size and always covers the ocean plane.