Coder Social home page Coder Social logo

Comments (6)

huwb avatar huwb commented on May 20, 2024

@Midda-C @holdingjason

Added a height based scattering in the commit referenced above.

Best way to experiment with it is to set the Crest Colour to bright red! You can can experiment with the height range and and exponent/power and have some fun making alien planet ocean waves :).

I've used a similar term in previous projects and its worked pretty well. I thought of more complicated schemes but simplest might be best here. Its not very scientific - a good direction for RnD would be to offline render what the scattering looks like and actually try to approximate it..

Anyway let me know what you think. I'm pretty happy with the results im getting from this in the main scene (example content) on this branch..

from crest.

huwb avatar huwb commented on May 20, 2024

Put it in a box :)

image

from crest.

huwb avatar huwb commented on May 20, 2024

Bonus feature time.. ive added an optional term for shallow water, in real life the ocean floor has a dramatic effect on the ocean colour due to all the multi-scattered light, and this attempts to approximate this effect:

image

Together these additions should give a much nicer range of colours from the water.

from crest.

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

Oh cool, I'd been thinking about making an issue for shallow water colour. Just tried it in our scene, it looks awesome!

I couldn't get the height lerp to do anything at first, but it turned out that Unity needed me to toggle it off and on again (it defaulted to on), which it kicked into gear. I assume that wouldn't be an issue on a new material. I think something similar happened a while back when you added a toggle to something else. Problem-Solving 101—try turning it off and on again.

from crest.

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

Oh, and it might be a good idea to clamp the Height max and depth power parameters, since they seem to break if they're set to zero.

from crest.

huwb avatar huwb commented on May 20, 2024

Yeah i've had to do the same turn off and on again myself :/ i'll consider adding a note in the readme.

I've tweaked the ranges and merged it into master now. If you have any feedback or issues with it let me know and i'll reopen. Nice one!

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.