Dustyroom / flat-kit-doc

Documentation of the Flat Kit asset.
https://flatkit.dustyroom.com
Apache License 2.0
2 stars 1 forks source link

[Water Shader] - Fine-tune flow of water foam #96

Open Pnikanti opened 1 year ago

Pnikanti commented 1 year ago

Hello,

First of all, really neat asset!

I would really like to use the included water shader, but it's hard to make rivers, or other bodies of water, where the flow of the foam needs to be curved or fine-tuned.

I tried messing with the UVs to get the desired fine-tuned foam direction, but it's not that intuitive and it causes other problems.

A long shot, but could we use vertex colors instead, to determine the direction of the foam flow?

I know this might be a lot to task, but let me know what you think.

dustyroom-studio commented 1 year ago

Thanks for the suggestion, we'll look what can be done.

When using vertex colors, how would you parametrize the flow direction? RGB as XYZ of the direction in object space?

Pnikanti commented 1 year ago

Yeah! RGB to XYZ seems to be the most straightforward in paper at least. How would the values be mapped though? Considering we want the axis to go forward and backward. From 0 to 255 and from -1 to 1? Or something else?

dustyroom-studio commented 1 year ago

[-1, 1] will have to be remapped to [0, 1]. Thank you for the suggestion, we will consider this for an update.