March 2, 201412 yr Hi, I live in the UK and it's rained a fair bit lately. Does anyone know of a better rain texture/effect for P3D as the standard issue is so un-realistic? Thanks in advance. Phil
March 4, 201412 yr I was watching a news report on TV a couple of days ago. They had a camera in a helicopter, flying through the rain. One brief shot out the side window surprised me... the rain looked exactly like it does in FSX. That's not to say it would from all angles, but it certainly did in that one shot. Hook Larry Hookins Oh! I have slipped the surly bonds of EarthAnd danced the skies on laughter-silvered wings;
March 4, 201412 yr Would be great to know also if the rain effect will be visible in vc... :rolleyes:
March 4, 201412 yr "Does anyone know of a better rain texture/effect for P3D as the standard issue is so un-realistic?" The tweaks to the shader that work for FSX DX-10 also work for P3D. These make the drops less bright and ameliorate the tunnel effect. Works for snow and rain. But, the file location and editing is not identical, so some extra effort is required.
March 5, 201412 yr .....But, the file location and editing is not identical, so some extra effort is required. Why don't you tell us the details? Spirit
March 5, 201412 yr Why don't you tell us the details? Spirit Will do once I'm at my home PC later this evening. Ken
March 5, 201412 yr Will do once I'm at my home PC later this evening. Ken Hi Ken, great - we're waiting. Spirit
March 14, 201412 yr Sorry for the delay. Here is a way to improve rain/snow effects. This requires changing the shader code, so be mindful of what you're getting into. It's based on hard work by others, I only ported it to P3D. When done, delete the Shader folder in User/AppData/Local/Lockheed Martin/Prepar3D V2/ so that the code will be recompiled. The file to change is located in the root Prepar3D folder MAKE SURE TO BACKUP THIS FILE FIRST BEFORE YOU MOD IT! /ShadersHLSL/Rain.fx For the tunnel effect Replace this: matrix worldViewProj = mul( worldView, cb_mNoNearProj ); Out.vPosition = mul( In.vPosition, worldViewProj ); Out.vPosition.z = LinearizeDepthZ(Out.vPosition); With this: matrix worldViewProj = mul( worldView, cb_mNoNearProj ); float4 scaledRainVPosition = In.vPosition; scaledRainVPosition.xy *= 6.0; Out.vPosition = mul(scaledRainVPosition, worldViewProj); Out.vPosition.z = LinearizeDepthZ(Out.vPosition); For the raindrop brightness (low numbers are less bright) Replace this: float4 cColor = float4(1,1,1,In.cDiffuse.w) * (cColor0 + cColor1); With this: float4 cColor = float4(0.5,0.5,0.5,In.cDiffuse.w) * (cColor0 + cColor1); Note that if you're running 2.0 the first line of the tunnel effect will be slightly different "cb_mProjToDevice". For brighter rain drops, just increase all three numbers (e.g. 0.5 to 0.7) I hope you enjoy the result - I did! Ken
March 14, 201412 yr ......I hope you enjoy the result - I did!....... Hi Ken, thanks for the detailed information how to change and improve the rain effect. I gave it a try and could notice some nice improvements so I'll keep it now. Good job Spirit
March 14, 201412 yr Any chance of some screenshots with the change in effect? - thanks! i9 10850K, RTX3080, MSFS. My avsim uploads Myflightsim.to uploads
March 14, 201412 yr Thanks for this , don't know y LM didn't go this way ??? i7 4777k 4.6mhz, 32gddr3, GTX 760 4g sci ,Saitek x52,yoke and quadrant, 60 Led . SSD
March 14, 201412 yr This fix does work but just keep in mind that the second edit also affects the color of snow.
March 14, 201412 yr Here is a way to improve rain/snow effects. You might want to check on this again for P3d 2.1. The code in rain.fx, rain40.fx and rain50.fx does not exactly match that. The lines that you refer to are in both rain40.fx (for DX10) and rain50.fx (for DX11). And even then, the line: float4 cColor = float4(0.5,0.5,0.5,In.cDiffuse.w) * (cColor0 + cColor1); is actually: return float4(1,1,1,In.cDiffuse.w) * (cColor0 + cColor1); I know that P3d 2.1 uses DX11 (Shader Model 5), but it may revert to earlier shader versions for specific effects. It's worth experimenting to see what happens when you change either rain50.fx or rain40.fx.
March 14, 201412 yr I didn't look at the other files, but my original 2.1 rain.fx in the root shader folder does not have the "return". Maybe someone can confirm?
Create an account or sign in to comment