Page 1 of 1

Is there an efficient way to make rain?

Posted: Sat Jan 20, 2018 10:37 am
by Dirge Inferno
I am making a level and using this rain texture/script, but it hogs my performance totally. My framerate goes down from 150 to about 30 when using it, and I use it minimally. I'm wondering if there's any other way to get rain in my map without in dropping performance?

Re: Is there an efficient way to make rain?

Posted: Sat Jan 20, 2018 4:18 pm
by obsidian
Rain will always add a fairly big performance hit because of overdraw. Each extra transparent layer adds an additional rendering pass, which multiplies in the frame buffer, meaning that multiple layers can drastically drop framerates. The sample rain shader that ships with Q3 and is included in one of the sample Radiant maps is especially bad because it is a large scrolling texture with lots of transparent pixels. It's basically multiple transparent "sheets" that are layered all over the place. The more pixels, and the more overlapping transparency, the larger the performance drop.

Alternatively, you can use a particle shader. This means that you reduce the number of transparent pixels and overdraw, but you significantly increase the number of polygons. It will still have a significant performance hit, but not as bad as the example above. You can try downloading FS Particle Studio 2 (source code/project page) to help you generate a shader and see if you get any better performance.

Re: Is there an efficient way to make rain?

Posted: Mon Jan 22, 2018 10:34 pm
by Dirge Inferno
Thanks I'll try this, I never used it before so it'll be a bit of a learning curve.

Re: Is there an efficient way to make rain?

Posted: Mon Jan 22, 2018 10:51 pm
by Dirge Inferno
Also sorry to double post, but does anyone have issues with models disappearing on their maps? I just made one and all of the torches disappeared.

Re: Is there an efficient way to make rain?

Posted: Tue Jan 23, 2018 6:04 pm
by obsidian
Just the torches? Make sure the origin of the model aren't embedded in brushes.

Re: Is there an efficient way to make rain?

Posted: Tue Jan 23, 2018 8:08 pm
by CZghost
@obsidian: I actually preffer classic texture scroll shader :) If I need to create fancier water drips (different drip speeds and sizes), then I use multiple layers. However a single layer with few gray/white drops on a black surface is enough for a fairly good water drips effect...

Re: Is there an efficient way to make rain?

Posted: Thu Jan 25, 2018 7:44 am
by Dirge Inferno
Seems I accidentally moved one of the folders. I sort of fixed the rain framerate issue, I got the texture and added an alpha to it and even though it's got a bit of a framerate drop it's nothing serious. I'm still trying to figure this FS Particle Studio program out, thanks for linking me that.

Re: Is there an efficient way to make rain?

Posted: Sun Feb 11, 2018 2:06 pm
by CZghost
@Dirge Inferno: I never actually understood the FS PArticle Studio. I was using a Quake 3 Arena Shader Editor first for shader creations, but now I prefer to write my shaders myself, using just a plain text editor with syntax highlihting (like Notepad++). With particles, I prefer to use regular repetitive shaders. I tend to use particles only when there's no other alternative, like sparkles of electricity or something similar...