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:
    29
    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,156
    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,156
    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:
    29
    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,156
    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,004
    any hopes we'll get a lwrp version?
     
  8. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,156
    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,004
    has anyone compared performance on mobile with community shader and aquas or similar?
     
  10. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,004
    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,004
    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,156
    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,156
    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,004
    any estimates on the next update?
     
  15. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,004
    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,004
  17. am_salperton

    am_salperton

    Joined:
    Mar 6, 2017
    Posts:
    5
    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,004
    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 EnDarGame 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 at 11:42 PM