Thunderbolt Rain

I wonder if someone has experimented with some weather effects (rain, thunderbolt)?

2 Likes

Hi @iso74,

I haven’t seen a similar example in Playcanvas, for rain and snow your best friend is a particle system. It can work quite ok for open world scenes, if you have indoor gameplay you will have to find a way to mask the output to avoid … raining indoors. Not sure how that can be done with the Playcanvas particles emitter.

For thunderbolts a simple billboard (camera oriented plane) together with a strong flashing light can have a good result.

1 Like

For rain, I be more tempted to do what they did in Metal Gear Solid 2. Full screen effect with some local particle effects to sell the idea.

2 Likes

For rain and snow i used a particle system in front of camera as child and the fog effect to simulate the low visibility, for thunders haven’t tried anything yet.

2 Likes

I once faked lightning with creating a super short tween which put the light intensity for a short time up to 10 and back down again. Have an audio source play a thunder.mp3 and you are good to go. I think this was in unity.

Probably not the best solution but it could help you along the way :slight_smile:

1 Like

I wonder if taking a chromakey raindrop video like this one would work.

@Sebastian There is also a javascript effect for that i remember i found it with a search on google some time ago.

https://mubaidr.js.org/rainyday.js/

1 Like

This is a nice effect. I don’t know if that can be performant but if you could render it on a transparent canvas then you can grab the pixels and create a pc.Texture.

1 Like

Is there any demo or help available in today’s date for weather system (e.g. rain, snow, clouds, thunder, sunny) that I can get help with to add in my standalone project.

Hi, i managed to do weather using particle system and fog, I put the particle system in front of cam to show rain or snow and changed the fog thickness to simulate the lower visibility, You should try that way if you don’t want it to affect performances. As for wet ground you can maybe change the reflection on ground material but i didn’t do that till now.

Hi @ayrin, thanks for reply, can you share some materials/scripts or project where you implemeted so that I can have picture to of the flow, really appriciate it. Or is there any MCP for playcanvas that can help.

this is the project if you look at the camera components you see rain and snow, for the fog thickness just play a bit with it to find the right values, i have to redo that coz i lost that in the update for multyplayer PlayCanvas | HTML5 Game Engine

I added this engine example few days ago, that should be released with the engine hopefully this week: https://x.com/ValigurskyM/status/2042162599215714619

But you can already grab the script and use with existing engine, it should just work. This snow / rain is using gaussian splatting, but should work without problem with just a normal geometry based scene as well.

hello