HeroEngine Forums

HeroEngine Support => Scripting & Programming => Topic started by: Prometheus2012 on Mar 14, 17, 06:30:00 AM

Title: Default rain - Change emit distance
Post by: Prometheus2012 on Mar 14, 17, 06:30:00 AM
Ok so i have this little problem.

How the default rain in HE works is to emit at an object that is physics enabled. It falls from about 15 meters up.

Is there any way to raise the distance at where it emits.


https://s23.postimg.org/rayugp2bf/rain_spawning.png

In this pic im standing on a covered balcony above the floor that the rain is falling to (Green DOT), i see where the rain is spawning from (Blue Line). Above the blue line there is no rain so it looks like the rain is falling in the middle of the sky from higher up.
Title: Re: Default rain - Change emit distance
Post by: FI-ScottZ on Mar 15, 17, 12:39:58 AM
I don't recall any such setting for height. But I think rain stems from one of the built-in shaders.  Investigating the contents of that might provide a way to change how it renders.
Title: Re: Default rain - Change emit distance
Post by: nocake on Mar 21, 17, 01:17:36 PM
ok i am probably going to butcher this on the first dump but this is what I can remember.

In heroengine go to create->particle->load particle

I cant remember where but somewhere there is the rain particle. Find that and load it into the area.

Click again Create->Particle and select the newly added rain particle.

You now should now have a particle spawned in your area that is rain. Be sure to turn on particle select and visibility.

Select the particle, you might have to do this a few times until you can clearly see the multiple tabs loaded in the properties panel for that specific FX. I believe there should be a minimum of two tabs. If you only see one, reload HE and reselect the particle or something (this part was a bit finicky)

Now you can see the properties of that particle. You can alter its properties to how you want.

Once you are done you take note of the areaid you are in and then open up the repository.
copy the particle from the areas folder: /world/area/{AREAID}/
Then place it over the original rain particle FX.

_____________________________________________________________________


I am sure I might be forgetting something or mistaking this process with another fx processes but I am fairly sure I played around with changing the rains texture, distance, etc this way.


Title: Re: Default rain - Change emit distance
Post by: nocake on Mar 21, 17, 01:29:47 PM
ok well I just quickly looked into scottz suggestion and looks like he is onto the right thing.

In Hero\HE\Render\shaders200a\engine\windy_rain.fx at the top there is "const float RAIN_CEILING         =  10.0f;"

Title: Re: Default rain - Change emit distance
Post by: Amanda_Brooks on Mar 21, 17, 02:48:22 PM
It'd seem to be a bit more logical for them to have it linked to the cloud layer height controls instead.
Title: Re: Default rain - Change emit distance
Post by: Prometheus2012 on Mar 26, 17, 05:26:50 PM
It'd seem to be a bit more logical for them to have it linked to the cloud layer height controls instead.

That would make more sense. Although it kinda makes sense as it has to interact with physics objects.

An easier way of editing that height would be nice. Like an emit distance slider eh.