RaindropFX - Realistic Camera Lens Rain Effect

i have the original version from before the pro, is there a way to add a tint color to the rain in the
original version as i need it to look green like slime

Hi!
Do you mean you hava the lite version? It’s a little complicated to modify the lite version, but it can be done. I’m a little busy these days, so you can leave me an email and I’ll send you a modified version later.

Hi , maybe it is the lite version now, but it was just called raindrop fx when i purchased it a while ago, i did email your gmail yesterday so if you would send it to me i would be very gratefull, thank you

I sent an email to you gmail account, thank you

I sent an email to hztmailbox@gmail.com

is this the right email address?

Just sent a new version to you :wink:
5495419--563383--20200219115614.png

Thank you, will test when i get home, looks great in your picture

Does this work with the standard Unity rendering? When I add the effect to my post process stack I get errors in your HDRP script.

NullReferenceException: Object reference not set to an instance of an object
RaindropFX.RaindropFX_HDRPRenderer.Render (UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context) (at Assets/RaindropFXPro/Scripts/HDRP/Core/RaindropFX_HDRP.cs:210)

Edit: Seems when you first add the effect there is no rain drop texture set which messes something up so even after you add the texture the errors still come, I had to restart Unity for the errors to stop and for it to start working, might be nice if you catch that for future users, unless I did something wrong?

On another point is it possible to have the drops move off radially as if they are being blown of because the camera is moving forward. Can that be done with the wind and turbelence values?

And another question, I can turn the effect on/off using the fadiue/fadein bool value which works fine but when the effect is faded out it still seems to be running in the background so slowing the FPS but contributing nothing to the visuals, is there a way to see what the current state is so I can totally disable the effect on the stack when its not doing anything?

And finally is it possible to add raindrops from script, I would like to control when and where a drop is added and its velocity.

I have another wee little problem :slight_smile: All works fine in the edito and playmode, but when I do a build for PC build the Raindrop effect does not Init, it spits out a load of errors about the shader being null in the init method.

ArgumentNullException: Value cannot be null.
Parameter name: shader
  at (wrapper managed-to-native) UnityEngine.Material.CreateWithShader(UnityEngine.Material,UnityEngine.Shader)
  at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00007] in <945c24c342914372bc599495ca1ade0d>:0
  at RaindropFX.RaindropGenerator.Init (UnityEngine.Texture2D raindropTex_alpha, UnityEngine.Vector2Int calcRainTextureSize) [0x000c9] in C:\Projects 2018.3\Ages of Speed\Assets\RaindropFXPro\Scripts\HDRP\Core\RaindropGenerator.cs:94
  at RaindropFX.RaindropFX_HDRPRenderer.InitSys () [0x00001] in C:\Projects 2018.3\Ages of Speed\Assets\RaindropFXPro\Scripts\HDRP\Core\RaindropFX_HDRP.cs:219
  at RaindropFX.RaindropFX_HDRPRenderer.Constraints () [0x00040] in C:\Projects 2018.3\Ages of Speed\Assets\RaindropFXPro\Scripts\HDRP\Core\RaindropFX_HDRP.cs:232
  at RaindropFX.RaindropFX_HDRPRenderer.Render (UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context) [0x00026] in C:\Projects 2018.3\Ages of Speed\Assets\RaindropFXPro\Scripts\HDRP\Core\RaindropFX_HDRP.cs:163
  at UnityEngine.Rendering.PostProcessing.PostProcessLayer.RenderList (System.Collections.Generic.List`1[T] list, UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context, System.String marker) [0x000a6] in C:\Projects 2018.3\Ages of Speed\Assets\PostProcessing\Runtime\PostProcessLayer.cs:745
  at UnityEngine.Rendering.PostProcessing.PostProcessLayer.RenderInjectionPoint (UnityEngine.Rendering.PostProcessing.PostProcessEvent evt, UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context, System.String marker, System.Int32 releaseTargetAfterUse) [0x0003d] in C:\Projects 2018.3\Ages of Speed\Assets\PostProcessing\Runtime\PostProcessLayer.cs:713
  at UnityEngine.Rendering.PostProcessing.PostProcessLayer.Render (UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context) [0x001ed] in C:\Projects 2018.3\Ages of Speed\Assets\PostProcessing\Runtime\PostProcessLayer.cs:688
  at UnityEngine.Rendering.PostProcessing.PostProcessLayer.BuildCommandBuffers () [0x00368] in C:\Projects 2018.3\Ages of Speed\Assets\PostProcessing\Runtime\PostProcessLayer.cs:430
  at UnityEngine.Rendering.PostProcessing.PostProcessLayer.OnPreCull () [0x00098] in C:\Projects 2018.3\Ages of Speed\Assets\PostProcessing\Runtime\PostProcessLayer.cs:292

How do I fix this? Thanks.

I had to move the Shaders folder into the Resources folder for this to work in a build. Is this a known issue or have I done something wrong somewhere to cause this?

Hi!
1.If you have not add raindrop texture, there will only print log “raindrop tex is null!” without error, so I think may be your other operations are wrong. Please follow the steps in the manual or video to reconfigure RaindropFX and try again.

2.I will add radial wind in later versions to achieve this effect.

3.When there are no more water drops on the screen, FPS will not be affected. If you think fade out is too slow, you can try to tick “Fast Mode”, so FPS will recover quickly.

4.It’s OK to add water drops from the script. I added comments for each method in the source code. You can modify the code yourself.

This problem is mainly caused by the ‘Shader.Find’ API, you can try to go to ‘ProjectSettings->Graphics’ in your Unity editor then add all the 5 shaders of RaindropFX (located at : RaindropFXPro/Shaders/HDRP) to ‘always included shaders’, then rebuild your game and try it again. (See my reply to Spiderwork in #12 for details)

I tested the turning off of the effect. When I turn it off using the FadeOut/FadeIn switch the FPS for the simple test goes from 1100fps to 1250fps but if I then disable the effect entirely then it goes to 3100fps so it would be nice if there is a way to tell that there are no drops on the screen so I can disable it fully.

Sorry, another question. Trying to use the Object Space version to get drops on a window, I created the material and set the shader to your shader. I added the Command Buffer Blur Refraction and the Material Linker, set the Material in each to the one with the shader on, all fine. I then try and set the Raindrop tex Alpha and as soon as I do I get this error spamming the console and the I dont see any rain on the surface.

Dimensions of color surface does not match dimensions of depth surface
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

If I remove the Material Linker component the error stops. What did I do wrong and how can I fix this problem? Thanks.

You can simply turn on “Debug Log”, then if there are no drops on the screen you will see “all droplets killed.” at console.
And the code is located at line 280 in RaindropGenerator.cs. lenS and lenD represent the number of static drops and dynamic drops respectively.
5504206--564487--debug.png

A user who used AURA2 encountered the same problem before. May be the command buffer conflicts with other plugins. I rewritten a version based on grab pass, it works well with AURA2, you can try it.

How to setup:
1.add ‘GradBlur.shader’ to ‘raindropfxpro/shaders/hdrp/surface’
2.create a new material and assign it to your glass gameobject and ‘target mat’ in ‘material linker’ component attached to it
3.change material’s shader to ‘custom/raindropfx/WetSurfaceGrab’
4.delete ‘command buffer blur refraction’ component you have attached to your gameobject before, now we don’t need it anymore
Other settings are the same as before.

5504230--564490--newVer.jpg

5504230–564493–GrabBlur.shader (7.16 KB)

Tried that and that makes the drops show up in the game view but the scene view is still spamming the console with:

Dimensions of color surface does not match dimensions of depth surface
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I’m so sorry, after testing, I found that the problems you mentioned before (error with null raindrop texture and FPS dropping down even when there are no drops on screen) did exist, and they occurred in version 2018.2+.

Now these problems have been fixed, batches are reduced by 5 from the previous version when there are no more droplets in the scene.

The error “Dimensions of color surface does not match dimensions of depth surface” is caused by the HDR option of the camera. I fixed it, but now you will need to run the game to see the water droplets.

How to setup:
Just download the attachment and replace the file with the same name :wink:

5508442--565090--ćŸźäżĄæˆȘć›Ÿ_20200222124719.png 5508442--565093--ćŸźäżĄæˆȘć›Ÿ_20200222124659.png

5508442–565084–RaindropFX_HDRP.cs (12.9 KB)
5508442–565087–MaterialLinker.cs (680 Bytes)

Thanks for the help seems to be working now. Couple of things, your PDF says to add the WetSurface shader where it should be WetSurfaceGrab shader. Second would be nice if there was a mask/wetness texture option. I quickly added it myself :slight_smile:

Hi I recently buy
RaindropFX Pro. I can’t use it in LWRP pipeline.Can you help?