I’m trying to think how to approach a “wetness” shader creation. Basically, if it rains, every surface facing up would get “wet”, meaning dropping its roughness way down. This is probably achievable by using world Z-up position, much like in many of the snow shaders out there. Now for the tricky part, I would like to also include rain drop ripples added on top of that. I can imagine one ripple being a normal map flipbook texture, for instance, but I have no idea how to multiply that with z-up vector part and make it random in position/scale so it feels natural.
Would be great to hear any ideas or see some examples of how to do that.
I’d make the flipbook a tileable flipbook that you can just apply everywhere.
the flipbook would have many ripples to cover a large-ish area (think something like 50 or 100 ripples in the texture), and they would need to start at different times (i.e. at frame 0 of the flipbook some ripples would be newly starting, others would be already dying, etc)
the ones in Assassins Creed Black Flag are top notch btw, you might want to look at it for reference
also since rain happens “everywhere, as far as you can see” in games, I’ve been wondering if it might be more efficient to this is as a postprocess that maps the texture to the surfaces in world-space
Thanks for your input, Chosker.
Having multiple ripples in the flipbook is definitely something to try, so thanks for that One thing is - the resolution would have to be rather high to have enough variation. I’m sure there must be a more elegant way to randomize a single one.
Post effect idea is interesting, but I still wont have a clue how to implement this. For instance, in Cryengine, adding rain is as simple as dragging “rain” entity into a viewport. It includes the rain drops themselves, plus it’s making everything facing up “wet” and adds ripples on top. Granted, it’s limited in its customization, but it does the job quickly. This is something I’d love to have in unreal.