Is there an efficient way to make rain?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Dirge Inferno
Posts: 50
Joined: Sun Feb 26, 2012 11:50 am

Is there an efficient way to make rain?

Post 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?
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Is there an efficient way to make rain?

Post 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.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Dirge Inferno
Posts: 50
Joined: Sun Feb 26, 2012 11:50 am

Re: Is there an efficient way to make rain?

Post by Dirge Inferno »

Thanks I'll try this, I never used it before so it'll be a bit of a learning curve.
Dirge Inferno
Posts: 50
Joined: Sun Feb 26, 2012 11:50 am

Re: Is there an efficient way to make rain?

Post 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.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Is there an efficient way to make rain?

Post by obsidian »

Just the torches? Make sure the origin of the model aren't embedded in brushes.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: Is there an efficient way to make rain?

Post 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...
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
Dirge Inferno
Posts: 50
Joined: Sun Feb 26, 2012 11:50 am

Re: Is there an efficient way to make rain?

Post 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.
User avatar
CZghost
Posts: 1931
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: Is there an efficient way to make rain?

Post 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...
[ Linktree | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
Post Reply