Search Unity

Feedback how i can archieve this effect (image) "underwater light"

Discussion in 'Shader Graph' started by JhonnyRage, Nov 12, 2020.

  1. JhonnyRage

    JhonnyRage

    Joined:
    Feb 23, 2017
    Posts:
    57
    Good afternoon everyone, i'm trying to get a efect like this in unity w Shader Graph



    but i cna't figure out how and i don't find any tutorial about that...
    if anyone could point me on a youtube vid or something like that it would be apreciated.
     
  2. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    It depends how realistic you want to go - it's easy to just blend a couple of honeycomb-ish patterns' normals together and drift their uvs and blending with alternating-ish sin/cos/etc... if the scene was always underwater could do that as a subgraph using world space mapping and just drop that into each of your shaders (still could anyway, for underwater shaders). That said, real caustics ..performance hit I'm pretty sure would be insane by comparison given it's actually quite complex but I could be mistaken, I'll leave that to the experts as it's not something I can give a concise answer about, maybe there's an inexpensive way. But simulating the visual impact of it somewhat.. yeah, definitely achievable.
     
    JhonnyRage likes this.
  3. JhonnyRage

    JhonnyRage

    Joined:
    Feb 23, 2017
    Posts:
    57
    thanks for your reply, tbh is not for a real underwater level, the camera of my game focus on the ground, so the idea is project that pattern to the ground,but yeal it's a good idea the one you mentioned "t's easy to just blend a couple of honeycomb-ish patterns' normals together and drift their uvs and blending with alternating-ish sin/cos/etc..."
     
  4. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    If there's no solution up by Saturday I'll throw together an example. There's probably something around already though, if you search for "caustics shader graph" you might find something useful sooner.

    You could also connect your final pattern to Emission so the "light" areas will glow when using Bloom, maybe passed through a Multiply node with a color property first to fine-tune the tint and strength.
     
    JhonnyRage likes this.
  5. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hi,
    CREST Ocean has these volume and caustic effects per default.

    Unbenannt.JPG

    There is a seperate Underwater PostEffect Volume.

    It s free for BuiltIn RP
    https://github.com/crest-ocean/crest

    HDRP and URP you can find in Asset Store,

    You can check how it is done in the free GitHub version.
     
    JhonnyRage and adamgolden like this.
  6. JhonnyRage

    JhonnyRage

    Joined:
    Feb 23, 2017
    Posts:
    57
    thanks, i'll check that out.
     
  7. JhonnyRage

    JhonnyRage

    Joined:
    Feb 23, 2017
    Posts:
    57
    Thanks, i'll try to do it by myself, i'll drop a comment here if i can't. Btw w that feedback i should can n_n
     
    adamgolden likes this.