Giter Site home page Giter Site logo

Shore Foam Edge Blend about crest HOT 9 CLOSED

wave-harmonic avatar wave-harmonic commented on May 21, 2024
Shore Foam Edge Blend

from crest.

Comments (9)

huwb avatar huwb commented on May 21, 2024 2

Thanks for the discussion!

I added a tweakable variable to control the blend-in depth to the material - "Foam Feather Depth". I tried it quite small (0.04) and I think it improved it. I'd be curious to hear what you guys settle on if you do tweak it.

I still have things on my list that are more core to the ocean than a shoreline wetness sim, and I'm not sure when I'll get onto that, so I added it as an improvement direction and closed this issue - hope that makes sense. Reopen if not.

@GeorgeDziov yes you're welcome to contact me via email - my contact is near the top of the README.

from crest.

Midda-C avatar Midda-C commented on May 21, 2024

Yeah using a depth blend or something to just soften the edges would be great.

from crest.

huwb avatar huwb commented on May 21, 2024

Thanks guys, agreed. I added a slight feather. I went ahead and pushed it as i think it is already an improvement. And i could reuse data im already sampling in the shader, so thats a good result!

Is this what you guys had in mind? Let me know.

image

from crest.

Midda-C avatar Midda-C commented on May 21, 2024

Yep, that's basically what I was thinking. Works well on the foam, however it doesn't look like the actual water surface itself is being feathered on the edge.

image

Any chance it could go to completely transparent at the very edge there? Also, a property on the material to adjust the fade distance would probably be needed so projects of different styles/looks can get the result they desire.

from crest.

huwb avatar huwb commented on May 21, 2024

oh interesting. i think it does, in terms of scatter colour (blueness). but the sharp shading difference you see is due to the water reflecting the sky etc. in this case i'm not sure if it would be appropriate to blend the reflectivity.

probably what is weird is that the land is not wet. if the land was wet then it would be shiny like the water and probably make this less jarring. the landscape could sample the water height and probably do something to simulate wetness, i could explore this after looking at the lighting/foam stuff if interesting?

from crest.

Midda-C avatar Midda-C commented on May 21, 2024

oh interesting. i think it does, in terms of scatter colour (blueness). but the sharp shading difference you see is due to the water reflecting the sky etc. in this case i'm not sure if it would be appropriate to blend the reflectivity.

Oh right, so you're not using regular alpha opacity to achieve the transparent effect? If not, that makes sense. Fading using opacity would (I think) fade out the reflection as well as a result.

probably what is weird is that the land is not wet. if the land was wet then it would be shiny like the water and probably make this less jarring. the landscape could sample the water height and probably do something to simulate wetness, i could explore this after looking at the lighting/foam stuff if interesting?

Yeah I didn't think of that, the land being wet would also mask it, if their reflectivity was approximately equal at the water's edge. I assume you'd have to do that on the land shader though, correct? Our terrain is procedurally generated, so we have a fairly complex customised terrain shader to work with that, so I guess we'd need to duplicate that in our shader ourselves (and by we, I mean Dizzy :P). But yeah, as a general solution, that sounds good.

Of course, @GeorgeDziov submitted this issue, so I don't want to just hijack it. What's your take, @GeorgeDziov?

from crest.

GeorgeDziov avatar GeorgeDziov commented on May 21, 2024

@Midda-C you read my mind in previous post and @huwb wet shore idea is fantastic, I'm all hands for that one!

Regarding foam itself - maybe make foam a bit closer to shore so blue part on the edge is less visible or add a foam to shore distance property? Thought of that because most projects have different world scale so while shore foam looks perfect at one scale it may look a tad too far in another just like in screenshots above.

I'm also really tempted to say yes to some veeery small almost unnoticeable reflection blending to hide it under foam (hope my suggestion doesn't sound too ridiculous).

offtop: btw where can I ask non-issue water/ocean stuff? Is email ok?

from crest.

dizzy2003 avatar dizzy2003 commented on May 21, 2024

from crest.

GeorgeDziov avatar GeorgeDziov commented on May 21, 2024

This feather option certainly gives a lot more flexibility! Pity there's no reflection blending though but I think it's better to wait for wet shore. Anyway foam looks so much better now, big thanks for that!

from crest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.