Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, aliswee), 835 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Simple rain effect shader #419765
03/14/13 12:58
03/14/13 12:58
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline OP
Expert
MasterQ32  Offline OP
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
Hey guys,
i developed a rain shader yesterday and i want to share the technique with you wink
Here is a little tech-demo with the shader and setup code.
Have fun with it!

Download here!


The rain itself is a simple effect. The system renderns some cylinder shapes around the camera and uses triplanar texture mapping for the rain texture. Now this texture gets blended additive to the screen. Looks pretty good and eats a lot less power than particles

Greets!
Felix


Visit my site: www.masterq32.de
Re: Simple rain effect shader [Re: MasterQ32] #419767
03/14/13 13:02
03/14/13 13:02
Joined: Jul 2005
Posts: 187
L
lostzac Offline
Member
lostzac  Offline
Member
L

Joined: Jul 2005
Posts: 187
Thanks a lot for this, could this also be transformed to handle snow as well ? It would be a lot of help to my rpg weather system


John C Leutz II

Re: Simple rain effect shader [Re: lostzac] #419772
03/14/13 13:21
03/14/13 13:21
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline OP
Expert
MasterQ32  Offline OP
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
i think it could work (and as i also need some good snow effect i will try to port it for snow also)


Visit my site: www.masterq32.de
Re: Simple rain effect shader [Re: MasterQ32] #419774
03/14/13 13:26
03/14/13 13:26
Joined: Jul 2005
Posts: 187
L
lostzac Offline
Member
lostzac  Offline
Member
L

Joined: Jul 2005
Posts: 187
That would be great...Again thanks for this


John C Leutz II

Re: Simple rain effect shader [Re: lostzac] #419777
03/14/13 13:53
03/14/13 13:53
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
in theory it could be also used for a fog effect, like the one using sprites moving around the camera.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Simple rain effect shader [Re: sivan] #419781
03/14/13 14:32
03/14/13 14:32
Joined: Jan 2013
Posts: 41
Redoine Offline
Newbie
Redoine  Offline
Newbie

Joined: Jan 2013
Posts: 41
Thank you

Re: Simple rain effect shader [Re: Redoine] #419784
03/14/13 15:31
03/14/13 15:31
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I can see some horizontal flickering lines, probably the cylinder borders.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Simple rain effect shader [Re: sivan] #419785
03/14/13 16:02
03/14/13 16:02
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
Looks good, but blending the rain additively isn't the best idea.
Blending it the 'default' way should provide better quality and since the pixels differ only in their opacity and not in color the rendering order doesn't matter (shouldn't be a prob to render them ordered if necessary, though). wink

Re: Simple rain effect shader [Re: Hummel] #419793
03/14/13 17:29
03/14/13 17:29
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Beside the horizontal artifacts, it is pretty convincing, even if I mute the demo wink

Re: Simple rain effect shader [Re: HeelX] #419851
03/15/13 13:08
03/15/13 13:08
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline OP
Expert
MasterQ32  Offline OP
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
I found a simple workaround for fixing the noise/artifacts laugh
Use 0.0125 for the rain scaling instead of 0.125
it's not completly gone but much better.

I am currently working on some kind of rain blocker to let rain only fall onto the top level and not below


Visit my site: www.masterq32.de
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1