Search Unity

Ceto (Scrawks Ocean)

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

  1. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Do you have a screenshot of the issue, not sure what your refering too. Haven't noticed any issue between Truesky and Ceto besides ocean being cut off when camera at heigth which can be fixed by changing border from default value of 500 to a large values 10000.


    Edit: what version of simul are you running? Previous versions is Truesky did not add transparent objects to its mask. So unless for had terrain all the way to horizon ocean would be cut off.
    Had same issue with sumino and Truesky, Roderick fixed this in latest version which I got direct from him.
    Think the asset store version is updated now to latest.
     
    Last edited: Jul 24, 2015
  2. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Im going to sort out all the issues with the beta this week so post a screen shot of the problem and I will try and look into it. It may just be a draw order issue.
     
  3. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    This is what I get


    That's flying quite high, there should be a bunch of clouds mostly occluding the underneath but they seem to be being drawn after the ocean/horizon.
     
  4. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Scrawk do you want a screen of truesky's sequencer btw to see how it's worked out? I'd recommend grabbing a copy anyways its pretty great, and to all of you get some form of vr headset, it really does dramatically improve the experience, although maybe wait until the HTC Vive rather than get Oculus' current devkit, which i enjoy a great deal still but is very much behind the curve
     
  5. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I'm going to add that thats the only bug ive really come across that isn't a matter of tweaking stuff in the inspector. I think there are some GC issues although they were pretty random, they disappeared completely mysteriously but i did get an error at one point about an RT not being discarded, it was 64x64 by all accounts which was the fourier size i was using if that helps

    While optimisations always good, ive found 64 to be completely acceptable really, switching to 128 doesnt really hurt performance but it seems clear its on a different thread and its jittery progression seemed to imply i didnt have the gpu for it

    Umm, obvious suggestions for features are the ability to change timescale as mentioned above, ability to change the whole scale, independant of wind speed and wave age as its currently not suited to be seen, say from ground level by a standing character - bit large, and i realise after more watching the sea of thieves video that they've really scaled down what clearly seem to be similar fft style waves so theres a lot of movement and energy in them - additional observation about this scaling is that its not totally realistic maybe but those dramatic steep crests lead to some lovely SSS effects. If it was feasible to scale at runtime depending on the needs of the game, like epic ocean voyage scaled big, dramatic closequarters action scaled small, that would be great

    I guess the main other feature suggestions are the obvious ones - coastal attenuation, local wind effects, particle generation, typically for sea surface intersections at speed but i think (youd know better than me) spawning jets of spray at random choppy crests (would getting these positions be possible by comparing the normals of the surface? crests would have have sharply differing normals i guess?). And I guess a way to cut out water rendering inside vessels and areas of land, there was a colormask shader mentioned in the triton thread that was in the unify wiki i think, i dont know if that would do it
     
    spraycanmansam likes this.
  6. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I thought all transparent objects on truesky needed to be drawn using the truesky transparent camera?
     
  8. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Any reason why you picked Time.realtimeSinceStartup as default?

    I guess, if you would use Time.time as default, one wouldn't be required to implement IOceanTime to make it respond to Unity time scale changes, because Time.time is affected by Time.timeScale already. I guess Time.time could cover more common use-cases.
     
  9. spraycanmansam

    spraycanmansam

    Joined:
    Nov 22, 2012
    Posts:
    254
    +1. In our own tests we've also found that using an animation intended for large open choppy waves and scaling it down made for more interesting and dynamic smaller scale waves. That would be a great feature.
     
  10. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I think i tried putting the ocean on the layer set in the transparent camera script with no result. That said i've been using Unity's new integrated vr support and it apparently has a few bugs needing fixing atm. I'll try again with and sans VR on and see what happens
     
  11. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Just added a grid scale. It can be used to scale down the ocean like you mentioned. Features like that are pretty easy to implement so its no prob to add.

    I just didnt think of the time scale issue. Changed it to use Time.time and the ocean now slows down when Time.timeScale is changed.

    The reason I used the interface is because I though people using sever/client set ups may need better control over how the time is handled. It may never get used but its there if needed.
     
  12. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    The truesky thing is definitely a drawing order thing, it was being funny with the plane trails, which were using the particles/additive shader, when i added the particles to the transparentfx layer et voila they worked properly - not so for the ocean though, which is still rendered first. Ive tried setting all the Ceto shaders to rendertype and queue transparency but tbh i have no idea what im doing there, just trying to copy the tags for the additive shader. This is probably an easy fix for someone better than me at this kinda thing - can you advise, scrawk? I dont exactly want to suggest you go buy truesky even though it is pretty neat (and ok i admit i think you should get it, its the perfect acompanyment to ceto it seems)

    Interestingly Nuaj, which i bought ages ago, just got a unity 5 facelift, so i think i might put that in and see what happens, just hoping the creator updated to u5 properly (he was using a cpu readback that was crushing performance, im presuming unity5 can stop that nonsense)
     
  13. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Well nuaj, conversely, has issues ABOVE the horizon. I think i'll stick to truesky and look to a fix
     
  14. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    I will get true sky and take a look sometime but I don't really know what a easy fix would be at the moment.
     
  15. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    @lazygunn I see what you mean now, fired it up again and went above the clouds and there is definitely an issue.
    Think this is on Trueskys end as also getting the same with suimono water as well.
    Looks like its an issue with the Depth Mask - The depth mask takes all foreground geometry like terrain trees and blends them together into a mask so that the sky and clouds render behind.
    This works perfect as long as you are viewing from below cloud level, unfortunately once you go above cloud level it breaks down.
    As the clouds which should be render in front of camera are now being culled from the view due to the same mask.

    The volumeteric clouds are rendered ok, but it appears that the clouds are also projected onto a skybox and this is what is getting culled.

    Will have to talk to Roderick in Simul to see if its possible to get a solution to this issue.



     
    Last edited: Jul 24, 2015
  16. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Having looked at it further, truesky is acting plain weird and probably nothing to do with Ceto. I'll get the latest version of truesky off their site and email Simul since ive an ongoing gmail conversation somewhere, so yeah, dont worry about it there's more important stuff you can do with your time - like kick back with a beer its getting eveningish over there
     
  17. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Yeah i'll do the same but let me know if you get in touch - grab the most recent version of truesky off their site too as often as not its several iterations onwards from their assetstore submission. The sequencer might ask for your logon details then throw an error when you try to enter them - pretty good basis for some prompt support
     
  18. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    added some image above to show the issue.
     
  19. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Alright well as expected I got the invalid message from the sequencer so ive brought it up with simul. Sorry for derailing your thread a bit scrawk! If it helps, when Truesky's sorted out you'll have something pretty impressive going on
     
  20. spraycanmansam

    spraycanmansam

    Joined:
    Nov 22, 2012
    Posts:
    254
    Awesome :)
    I had a quick play and hacked a few things in to see if I could quickly visualize what I was saying. It wasn't very hard to achieve a similar effect to Sea of Thieves ---



    Sorry for the poor quality, just a quick tester :) Obviously with some proper time and effort you could get a better result (tweaking the spectrum, animation speed, displacement power, etc) but it's still good to show that you're not necessarily locked into one visual style with Ceto. It has a lot of potential :)

    (In reality these waves are probably over 200m high according to the default scale).
     
    scrawk likes this.
  21. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    Eh, where can one get Ceto? I wanna see if I can intergrate it with Jove 2, although probs gonna be very hard for me :p
     
  22. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    The interface is definitely a good idea and useful to have! I was just uncertain why you used Time.realtimeSinceStartup rather than just Time.time as default. Glad it's working now :)
     
  23. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Sorry but it's not currently released yet. There's just a small group of people doing beta testing at the moment.
     
  24. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    When Ceto 'goes live' I think it should be entirely do-able to adapt shaders to support current 3rd party shader systems

    Roderick from simul assured me there will be an assetstore update for truesky in the assetstore some time soon

    Scrawk would you be able to tell me the modrl/spec of phone used that had Ceto working on it and what steps if any they had to make to get it running? Also how are you feeling in regards to bug squishing progress, optimisation and features? I wouldn't worry about the truesky thing though as I think they are aware of the issue and it's on their end

    Spraycanmansam would you be okay with letting me at the hacks you made to create that effect? Or has it already been absorbed into the Ceto code?

    Scrawk have you considered something like a trello account so you can keep a track of a road map and feature integration priority organisation? The best thing about all this is the open ended nature of how new features can arise depending on your fancy really, but the opportunities seem somewhat endless

    I think today again just for fun initially (although all of my 'fun' videos are for testing the bounds of far more serious ideas) I'll be trying to get my fancy character controller moving around realistically aboard a ship in high seas and look into particle emission if my concentration span survives that long. Idea is an array of particle spawn points around the prow of the ship and doing height checks vs ship velocity decide wether to spawn particle effects.

    I'm waiting on other things atm before I feel like progressing on my own projects so I'm enjoying figuring things out with this
     
    John-G likes this.
  25. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Note sure of the models. There was a gaxlay note 4 (tablet?) and a Mac mini ( not a mobile but close). They didn't do anything special. It runs but very slow 5-20 fps.

    Most of the bugs have already been fixed.
     
    John-G likes this.
  26. DivergenceOnline

    DivergenceOnline

    Joined:
    Apr 19, 2015
    Posts:
    244
    Sent you a message my man.
     
  27. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    So most of the issues have been fixed and just doing a lot of polishing at the moment.

    There should be a lot more detail on the waves and the foam is getting a bit of reworking. Theres a new setting called foam coverage that allows better control of how much of the wave peak has foam.

    The foams very dense in these images (I kinda like it like that) but will be using this white area as a mask to then apply a foam texture and normal map.

    Once the rest of the issues are resolved the demo builds and beta code will get updated sometime this week.

    Ocean35.jpg

    And here with the foam coverage decreased so only the very wave tips are covered.
    Ocean36.jpg
     
  28. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I really like that coverage effect, using a texture would be a great way to give the foam character but there the way the crests are highlighted in themselves gives a ton of character, its quite stylish and reminds me of the observations i made of the sea of thieves water. I do keep coming back to that example simply because its so well done in a stylised fashion and if it can be approximated in such a straightforward way the options seem very open. Taking enough foam coverage to highlight the tips of the majoirty of the crests and using the scaling @spraycanmansam hacked in you've basically created a system that can approximate some of the most impressive game water ive yet seen

    Would it be feasible to use 4d ridged noise as a texture for the mask in a performant fashion? Ive had several attempts in various water scenes to try and get the 4d ridged noise used in the improved perlin noise samples on your blog looking right as foam because i think it would look great basically and add another level of stylising to the visuals

    I think the only thing that springs to mind regarding wave visuals now is spray emission.. if theres a way to get locations and directions to spawn spray particle systems theres an immense amount of further customisation there, going from realistic vapours to cartoony flair. It's something i'd def probably spend a lot of time in shuriken on but that said, i guess using a gpu system like tc particles wouldnt be too much a stretch?
     
  29. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Thanks.

    4d noise would kill the frame rate and I don't think the ridged noise would look much like foam.
     
  30. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,356
    This has to be the very best wave / foam tops i have seen, amazing work :)
     
    CaptainMurphy likes this.
  31. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    What would be the chances of adding the options of a texture being applied for things like rain droplets on the surface? I am not a shader guru so I honestly have not looked into the code of it (aka magic, to me). CryEngine had some seriously good looking water in it that had a simple material that would apply a rain droplet animated texture. I was hoping something similar would be possible here. It could really just show the droplets close but shift to just making the water dull and non-reflective over distance.
     
  32. spraycanmansam

    spraycanmansam

    Joined:
    Nov 22, 2012
    Posts:
    254
    Sure.
    I added a "wave speed" variable slider as a multiplier for the time being fed into the ocean.
    I also added a multiplier for the displacement height in the ocean shader - displacement.y * multiplier, etc.
    Then it's just playing around with the wave age, wind speed, direction, colors, etc.
    It would really need a bit more love to get a proper result as you can introduce artefacts pretty quickly, but it was just a quick test to confirm it's possible :)

    It should be much easier to achieve in the next beta with the grid scaling scrawk has implemented :)
     
  33. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    @nasos_333: Thanks!

    @CaptainMurphy: Rain drops are possible. Was thinking of adding that but its probably something that's on the end of the list.

    @spraycanmansam: That's very similar to what I have added. The grid scale scales both the xz and y displacements by the same amount. Tried to add separate scales for xz and y but there is a bit of a bug with that which I cant track down atm so will have to make them scale uniformly for now.
     
  34. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    302
    Will there be bow waves?
     
  35. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    At some point there will be.

    Just letting everyone know I just found a bug with the height querys. Looks like they are not returning the correct height the further you go from the origin. Probably some sort of offset issue.
     
  36. DizzyTornado

    DizzyTornado

    Joined:
    Nov 17, 2013
    Posts:
    134
    Looks great! But I wouldn't be able to test it until about 2 weeks from now though...
     
  37. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Brilliant work.
     
  38. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    Height query bug has been fixed.

    Just playing around with HDR...

    Ocean37.jpg

    Ocean38.jpg
     
  39. spraycanmansam

    spraycanmansam

    Joined:
    Nov 22, 2012
    Posts:
    254
  40. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    Fantastic work :)
     
  41. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Looking great :)
     
  42. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It really is. The only thing that would make me rewatch point break.
     
  43. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    So anyone have an idea how to make particles interact with the water yet? We have debris coming off of our damage hits and want to have them splash similar to what we had in CryEngine but for the life of me I can't seem to get them to interact.
     
    hopeful likes this.
  44. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I would imagine you'd sample wave height and spawn the splash particles?
     
  45. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Can you track the particles that are moving and get their positions? We have a debris particle that interacts with other objects and you can use a collision event to do most items but since it never actually collides with the water mesh it isn't working for us.

    Edit: Spoke too soon, looks like the class for particles does have a position. I am just used to using the collision event instead so that it makes sure the particle did collide with the water. I will have to dig into it some more to find an efficient way to add the particles to a pool for getting their height in a batch and applying a secondary particle for the splash.
     
    Last edited: Jul 28, 2015
  46. sashahush

    sashahush

    Joined:
    Sep 5, 2012
    Posts:
    75
    This is way more realistic now! Amazing keep it up!
     
  47. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746

    Got the splashes working. They are far from optimized and do not batch at all but the system doesn't even notice. The height calls return so fast on my dev machine that it never even registers on the profiler top 50.
     
    John-G and scrawk like this.
  48. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    So the new updates to the beta are out.

    You can download the demo builds here. This project is not working for some AMD cards.

    DX11 build.

    DX9 build.

    They should look something like this. As you can see there has been a lot of polish to the visuals making the last version look a bit crap in comparison.

    Ocean39.jpg
     
    Last edited: Jul 30, 2015
    ZJP, John-G, kideternal and 2 others like this.
  49. budukratok

    budukratok

    Joined:
    Jan 3, 2011
    Posts:
    30
    Hello scrawk!
    I have some problems with dx11 build on AMD graphics card (7870). Dx9 version works perfectly.
    scrawkWaterdx11.png
    7870.PNG

    Also I'm happy to see that you are working on water system, articles about water (and project files) from your blog are really awesome!
     
  50. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    how much will it be once it goes up on the store?