GithubHelp home page GithubHelp logo

Caustics about crest HOT 8 CLOSED

wave-harmonic avatar wave-harmonic commented on May 13, 2024
Caustics

from crest.

Comments (8)

huwb avatar huwb commented on May 13, 2024 1

Yeah that kind of effect should fit well, and could be on a static switch as an option.

Didn't know about the labels - I guess so!

from crest.

huwb avatar huwb commented on May 13, 2024 1

Finally wading into this one since i seem to be in the mood to work on pretty effects at the moment.

I went into this with almost 0 confidence but ended up with something thats not too shabby actually!

Video: https://drive.google.com/open?id=1ZnLJqJPAHrromL8JBTP_M15_Jqt8wsTs

Image:
image

as usual the code is a bunch of cluttered crap with magic constants throughout. what are your initial thoughts and what kind of stuff would you like to tweak?

there are interesting RnD directions here. one would be generating the caustics properly from the waves. another would be generating approximate caustics but responding to the current wave spectra. another thing i'd like to try out is to distort the caustics based on the displacement texture, which would mean they would respond to the dynamic wave sim i think. that could look amazing i reckon..

from crest.

Midda-C avatar Midda-C commented on May 13, 2024 1

Woah, that looks great already! Is the movement a flipbook, or just panning and multiplying a couple of textures?

I hadn't even considered distortion. I reckon you're right, distorting based on the displacement texture would look fantastic.

As far as tweakable parameters, the most obvious are things like multiplying the light intensity, and some sort of minimum depth control (it looks like you're already fading it in the shallows?). Do caustics get more or less sharp depending on the depth they're cast on? I haven't looked at any reference, really. I don't know if that sort of thing would even be noticable.

Oh man, this will look so cool on sea creatures swimming just below the surface of the water. I can't wait to see more! You continue to impress! :D

EDIT: Whoops, missed your response about the flipbook. Yeah, looks great with just a single texture, a flipbook seems overkill.

from crest.

huwb avatar huwb commented on May 13, 2024

Oh i forgot about the talk you linked above! Looks like he uses a flipbook animation for the caustics, kinda happy i got pretty good results using a single texture :).

(btw he is hoping to release the boat demo with 2018.3, forum thread: https://forum.unity.com/threads/lwrp-boat-racing-demo-from-gdc.527104/ )

from crest.

huwb avatar huwb commented on May 13, 2024

Yeah it should work on any opaque surfaces under the water - i want to see it on the sea creatures!

Yeah its panning mixed with some distortion. Oh and i tried taking the normals from the displacement textures. it worked, but unfortunately was one of the many things that does not translate well from imagination to reality IMO. if the caustics were really being generated from the waves i think it would look quite cool, but just distorting the existing patterns with the dynamic waves was subtle and not worth the expense i think: https://drive.google.com/open?id=1yRGEayKC5Lri923iQdpVVNVGe4vbGAD1

I think of the caustics as light being focused when the water surface forms a lens and as such has a focal point/depth in the water where it will be sharpest. Of course in reality the water is a mix of different wavelengths and its more complicated, but i think assuming a focal depth is reasonable for us. I'm not sure what the best reference is but RBrucks has done some interesting work on rendering out caustics, such as https://www.youtube.com/watch?v=efh-fdJA9hw , and this focusing effect is visible. in crest i fake this by setting a mip bias (poor man's blur), which helps to get rid of the jarring sharp caustics just below the water surface.

i have added some tweak vars in the referenced commit. if you could play around with it and let me know what is/isn't working well I'd be grateful. thanks!

from crest.

huwb avatar huwb commented on May 13, 2024

btw the Texture Average Value param is a value associated with the texture and not something that should be hand tweaked. it compensates for the fact that the caustics texture is not a floating point texture that sums to a known value. when this value is configured wrong, the blurred caustic regions will appear too dark or too light (verify by flipping Caustics on and off using the toggle).

from crest.

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

Just dropped it in. It adds so much to the shorelines, it's fantastic! Only thing missing I can think of is an option to adjust the scale of the texture (it's already pretty good, but I'd like to tweak the scale a tiny bit).

I can't get over just how much more grounded it looks now. I'd really love to share some clips of Crest in our game some time soon!

from crest.

huwb avatar huwb commented on May 13, 2024

Oh good point :) added now and merged to master - another jewel in the crest crown, woop!!

Yeah i'd love to see more! I'm also thinking of making a 'studios using crest' section or testimonials or something and would love to discuss what could make sense here. Anyway that's probably a conversation for another day.

Let me know if you have any other feedback/issues with the caustics!

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.