Is there a way to simulate raining in HighFidelity?


#1

Are there any scripts or particles effects which are able to produce raining effects?


#2

HF particle effect has an issue that would make rain behave a bit weird. The particle axis is following the axis of the headset instead if the one of the world. Causing the particle spins weirdly. That would break a lot the effect of a realistic rain.


#3

Thanks @Alezia.Kurdis so, no pseudo realistic rain possible? :slight_smile:
It is a pity, even minecraft has a very good even if minimalistic rain available…
The same probably applies for snow I understand, right?


#4

Maybe you can fake something with @Menithal‘s shader animation spritesheet (https://highfidelity.com/marketplace/items/1487ff47-1c2b-438b-826f-734afed6a297) using raindops instead of foxes as a texture?
(not sure, but this is where I‘d start experimenting…:wink:)


#5

I currently am experimenting something like this in this yt video:


the particle is produced by this script:

https://pastebin.com/pV2YCyN2

I’m finding particles a bit complex to experiment with, I don’t know how I can improve it … Anyone can give me some tutorial on particles? It seems it is completely counter-intuitive :frowning:
Coullnt understand how to tame this particle thing…


#6

I’ve got some good results for a daylight scene. (100m X 100m rain zone)
That would probably need to be modified to fit for a night scene.

I would have shared it with you.
But the Particles editor seems to be broken in this release (I tried on at least 2 domains with some restart of Interface in between. I got the same issue each time.)
The entity can’t open on the Particles properties (it works only if we create without exit the editor)
The Properties exporter is not even enabled, and I can’t return to the properties after that.
Maybe someone could confirm that the problem can be reproduced.

However, yes it’s possible to do something, it’s even not that bad in VR too (if you keep your head perpendicular to the horizon)


#7

I also noticed that the particle editor is quite broken :frowning:
But I was at the end almost able to “export” a json I have shown in my latest post.
Yes your rain is really much more realistic than mine, and I would really enjoy haing the “recipe”.
Actually I’m holding a volunteer class teaching Blender to teachers starting from scratch, most of them did not know a bit of Blender before and after a month they are now producing a lot of low poly models, many of them depicting animals, so we were considering to build up a scene about Noah Arch, and rain is needed :slight_smile:
I wil post this rain on the group, I bet they will be really excited in seeing this…
What about having the particle editor be fixed
by HiFi crew? :sunny:


#8

The json export was also buggy too for Particles, I already describe what was broken on a post somewhere.
But using it, I think I will be able to make a add entity script… (To be continue…) :wink:


#9

Here a script to install a 200m wide raining zone:

(function(){
	//Rain by Alezia Kurdis - May 2018
	var Rain;
	
	function AddRain() {
		

		var RainRotation = MyAvatar.orientation;
		var RainPosition = MyAvatar.position;
		
		Rain = Entities.addEntity({
			"accelerationSpread": {  
				"x": 0,
				"y": -30,
				"z": 0
			}, 
			"alpha": 0.3,
			"alphaFinish": 0.3,
			"alphaSpread": 0.3,
			"alphaStart": 0.0,
			"azimuthStart": -3.14159,
			"azimuthFinish": 3.14159,			
			"clientOnly": 0,
			"collisionless": 1,
			"color": {
				"blue": 255,
				"green": 255,
				"red": 255
			},
			"colorFinish": {
				"blue": 255,
				"green": 255,
				"red": 255
			},
			"colorSpread": {
				"blue": 255,
				"green": 255,
				"red": 255
			},
			"colorStart": {
				"blue": 255,
				"green": 255,
				"red": 255
			},
			"dimensions": {
				"x": 200,
				"y": 200,
				"z": 40
			},
			"emitAcceleration": {
				"x": 0,
				"y": -30,
				"z": 0
			},
			"emitDimensions": {
				"x": 200,
				"y": 200,
				"z": 40
			},
			"emitOrientation": {
				"w": 0.7071068,
				"x": -0.7071068,
				"y": 0,
				"z": 0
			},
			"emitRate": 1000,
			"emitterShouldTrail": 0,			
			"emitSpeed": 0.469,
			"ignoreForCollisions": 1,
			"isEmitting": 1,			
			"lifespan": 1.7,
			"maxParticles": 2000,
			"name": "RAIN - AK2018-R200",
			"particleRadius": 5,
			"polarStart": 0,
			"polarFinish": 0.8702,
			"position":{
				"x": RainPosition.x,
				"y": RainPosition.y + 0.6,
				"z": RainPosition.z
			},
			"lifetime": -1,
			"radiusFinish": 5,
			"radiusSpread": 5,
			"radiusStart": 5,
			"rotation": {
				"w": RainRotation.w,
				"x": RainRotation.x,
				"y": RainRotation.y,
				"z": RainRotation.z
			},
			"speedSpread": 0.469,
			"textures": "{##### YOUR SERVER PATH #####}/PARTICLE_RAIN_2018.png",
			"type": "ParticleEffect",
			"userData": "{\"grabbableKey\":{\"grabbable\":false}}"
		});
		
		
	}		



	AddRain();

}());

You will need to set the path of the particle png file once you will have hosted it on your server

You can copy the png file here: PARTICLE_RAIN_2018.png

(Don’t forget to stop the script once used, otherwise you might generate rain particle each time you start Interface :wink: )


#10

really nice effect… Thank you very much :slight_smile: