Search Unity

The Community Ocean Shader (Open Source) Unity 5

Discussion in 'Shaders' started by laurent-clave, Nov 30, 2015.

  1. Kobald-Klaus

    Kobald-Klaus

    Joined:
    Jun 20, 2014
    Posts:
    46
    There is this wind direction values which are default to 10. No matter what numbers I put there the foam and the waves are not changing direction. What might be wrong?
     
  2. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,204
    Hello.

    These values will mainly influence the waves and still do not behave as expected.
    I will look into it and hope to fix this in a following update.
     
  3. ArmandAnton

    ArmandAnton

    Joined:
    Mar 19, 2019
    Posts:
    4
    Hi, I'm trying to change variable ocean.scale using keyboard.
    I would like to increase or decrease the wave scale thanks to a Key like KeypadPlus or KeyPadMinus.

    Is it possible to realise that ?
    I can't figure out how to achieve it, can you please advice?
     
  4. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,204
    Hello.

    You can alter the ocean.scale value.
    When it changes it will be picked up and applied.
     
  5. Kobald-Klaus

    Kobald-Klaus

    Joined:
    Jun 20, 2014
    Posts:
    46
    I copied the new native plugins especially because of the new 64 bit version to my current project and tried to build for Android but get an error:
    Found plugins with same names and architectures, Assets/Ocean/Plugins/Android/libs/arm64-v8a/libocean.so (ARMv7) and Assets/Ocean/Plugins/Android/libs/armeabi-v7a/libocean.so (ARMv7). Assign different architectures or delete the duplicate.
    Any Ideas?

    (I should mention, that I cannot make a full update of the whole ocaen system, because I had to change things in ocean.cs)
     
    Last edited: May 8, 2019
  6. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,204
    Hello.

    You have to mark the 64 bit android plugin as armv8-a in the inspector.
     
    Kobald-Klaus likes this.
  7. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
    any hopes we'll get a lwrp version?
     
  8. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,204
    Hello.

    Right now I try to keep the lib compatible for unity 5 through unity 2019 with the same codebase.

    I will try at a later date to do an lwrp version.
     
  9. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
    has anyone compared performance on mobile with community shader and aquas or similar?
     
  10. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
    a quick question since it's driving me crazy. I don't need the wave movements (maybe a slight one but not big waves) because i'm doing a lake. So what I did was create a plane, scale it to whatever: 300x300. Then drop the Ocean Material to it. I was expecting to see a flat water surface, but instead all the tiling is messed up. I tried changing the tiling for the textures on the material but it seems to be ignored.
    How can I create a lake then? I really don't use the waves.
     
  11. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
    I'm having 2 issues here.
    1) No shore line. As you can see on the screenshot. When I enable shore lines everything looks like this.
    noshore2.jpg

    2) No shadows. As you can see the trees stop casting on the water.
    noshore.jpg

    I'm using Unity 2019.1.3f and the shader variant 3 (medium quality). Compiling for Android opengl 2.
     
  12. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,204
    Hello.

    The lib is not intended to be used on lakes.
    However with some small modifications a shader variation could be made fro lakes.
     
  13. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,204
    1. There seems to be a z-depth issue here. This should be resolved with the next udpate.
    2. The next update will support shadows.
     
  14. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
    any estimates on the next update?
     
  15. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
    something got broken? I see on previous posts that shadows were already supported (and shore line)
     
  16. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
  17. am_salperton

    am_salperton

    Joined:
    Mar 6, 2017
    Posts:
    7
    Still 4 years of searching for a good ocean that works in VR. Even Ceto is buggy in VR.

    "Try to edit the Ocean.cs script, to have dedicated reflection/refraction cameras per eye."
    I don't think we can access separate eye cameras in Unity right now.
     
  18. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
    I think this is slow dying. It's unfortunate because there is nothing faster than this for mobile and looking so good. I can handle the programming no problem to keep updating it but I'm horrible at shaders. I can't understand half of what's inside the shader code. If anyone mind to comment the shader code for newbies like me, it would be awesome and I may be able to learn it and modify it, that way we don't depend on 1 or 2 people for the community updates. Right now i'm stuck without shorelines and shadows just because I can't figure out where they are handled on the shader.
     
    Mauri and Nullic like this.
  19. JuriKnauth

    JuriKnauth

    Joined:
    Jul 26, 2017
    Posts:
    4
    When I reload the scene the waves get a lot rougher - after a few reloads it's madness..

    How can I reset the ocean, when the dynamic waves are enabled?

    SOLVED it - I store the current Time.framecount and Time.time when the scene is loaded and then subtract it whenever these values are used... (Ugly but it works for my purpose).

    Anyway superb job - really dig the ocean shader!
     
    Last edited: Jun 20, 2019
  20. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    913
    thank you for this.

    the ocean seems to be approx. 4 times the unity regular scale
    which adds other problems if want to use with other systems that use physics

    I tried the boat physics with other scales and can't seem to find right values
    if using regular scale, the boat looks like a toy boat (with buoyancy problems) in big ocean
    (and the ocean cannot be scaled down either to look right)

    I think I'll experiment a bit more if can find a middle ground around x2 scale
    but I'd ask if there's a plan to adjust it to regular unity scale
     
  21. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,204
    Hello.

    Sorry for the absence. The lib is still internally updated but there is still some work to be done for it to be ready to pushed to github.

    Unity forum is not pushing email notifications to me when people post here...

    I hope in the following month to push an update.
     
  22. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
    man, last post was in may... that's almost 4 months ago. Why don't you push to GitHub as a branch and we merge when ready? Otherwise it's only you and only you working on this and the idea was to have it "community". I'm more than happy to keep updating it but it seems to be dependent only on you nowadays with everyone else just waiting for you to submit or resurrect. It's not healthy for an open source project.
     
    Alverik likes this.
  23. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
    Did you read my post? I'm more than willing and happy to keep updating it... the open source community project can't be stuck like this for months waiting on a single person. Please if you have developed internally can you submit the changes and we keep up with it?
     
  24. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
    ok, I guess we need to begin looking for other ocean shaders. The "community" shader is not so.
     
  25. okba28mca

    okba28mca

    Joined:
    Aug 22, 2010
    Posts:
    86
    @elias_t I hope life is going well with you , I understand you don't have to update the project , but i wish you get some time and push what you have done so far , so ppl can pick it up
     
  26. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,204
    Hello. I am in between projects but I will try to push an update.
     
    JamesArndt likes this.
  27. Quast

    Quast

    Joined:
    Jul 5, 2015
    Posts:
    505
    will this work with LWRP ?
     
  28. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,204
    Well, this is one of the reasons that I have left the development of this project behind.

    With all this render systems confusion, constantly changing...
     
  29. Quast

    Quast

    Joined:
    Jul 5, 2015
    Posts:
    505
    you right. Thank you.
     
  30. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    913
    please keep it built-in RP compatible. LWRP / URP only if doable
    looking forward to it too, always chekin github
     
    Last edited: Feb 29, 2020
  31. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,194
    He said he already fixed the shorelines and shadows in August 2019. All he has to do is push the shader to the github and we can easily continue the work and help with updates. No need for LWRP/URP or anything else.
     
  32. Bamboidski

    Bamboidski

    Joined:
    Oct 26, 2019
    Posts:
    1
    Hey guys, anyone figured out how to fix the shorelines?
    Also, I have an issue when I build on Android I get this:
    Screenshot_20200308_155628_com.DefaultCompany.OceanTestURP.jpg

    p.s. surprisingly this wonderful ocean works on URP, not with the use of shader graph though, however I believe it can be adapted.
     
  33. StigTerma

    StigTerma

    Joined:
    Jun 7, 2019
    Posts:
    10
    Hi there.

    I'm trying to light up the water using spotlights with cookies. How come I can't see my cookies on the water surface?
     
  34. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    116
    I'm having this exact same issue, has anyone a solution to this?
     
  35. Mjfan198

    Mjfan198

    Joined:
    Feb 15, 2017
    Posts:
    1
    Hi Guys

    I'm working at the moment on a ship simulator project... but i have small problems with the reflection of the ships...

    Small example here..


    Could anyone give me a tip, how to fix this problem ?

    Best would be a 1/1 realtime reflection
     
unityunity