Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making snow&rain "affect" some things?
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
Making snow&rain "affect" some things?

I am so pissed. I want to make a map, where you find yourself at the middle of the mountains.
There are a lot of "rocks" that are ontop of the "rock you walk on" so basically, what I want is I want that the rain. stops if it touches an entity. I don't mean just disable itself, but it is raining, but if there is a rock underneath, it WON'T rain where it is supposed not to rain.
It's really difficult for me to creaye a realistic looking Trenches, Mountains...
With snow either, I need trenches where it snows etc, but I can't Sad
Is there really no way to make a block box, where the particles CAN'T get in, or something like that..
It completely destroys my whole idea, I'm serious, WHOLE IDEA.
If this is the case, I'm gonna cancel my third game mode, and just stay with the "unrealistic" way on the mountains.

if you are standing on the ground, and there is an umbrella above you, the rain won't get acces, to your head, Since your umbrella is above. and in amnesia, "rain"particle is jsut baddas and just "rains" through everything.
and NO "smart" people out there, don't tell me to place the "rain" particle a little more high, I'm creating trenches, mountains. since those AREN'T planes, it won't work.

if there was only a possability that there is a "rainbox" where you can see "purple" or some other colors just like "technical box" what you can't see In game. that would make it easier to fit some rain shits.
(you can See where you place the rain particles because there is a "box" surrounded where the rain can only spawn.)
08-14-2015, 10:43 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Making snow&rain "affect" some things?

The rain particle is, like all particles, not affected by physics. It's drawn to be a certain way. If you want it differently, you need to make your own.

One possible way might be to use many smaller particles instead. Not sure how that would affect the performance, but there are some droplet particles you might be able to use here and there, where the rain should be visible.

08-15-2015, 12:02 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Making snow&rain "affect" some things?

I'm just thinking out loud now...

Create a particle system of rain, that acts like it is being stopped by an umbrella in the middle, but all other places it appears normal.
Then have a timer fire very quickly, while spawning a new particle effect at the player's location, and deleting the previous one?

The scripting isn't very hard. You just need to create the particle system first...

The only thing I'm worried about is if it's going to look natural.

To illustrate:
Spoiler below!

[Image: bfa22bdd24.png]


Trying is the first step to success.
(This post was last modified: 08-15-2015, 02:04 AM by FlawlessHappiness.)
08-15-2015, 01:58 AM
Find
Spelos Away
Banned

Posts: 231
Threads: 19
Joined: Sep 2014
#4
RE: Making snow&rain "affect" some things?

That would either look choppy or would be performance heavy.
You need to remember that such a refresh rate should be the same as player's FPS.
Creating and Removing a ParticleSystem 30 times a second or more might be too much.

But I didn't try it, so... you still might want to give it a go.
08-15-2015, 09:12 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: Making snow&rain "affect" some things?

(08-15-2015, 09:12 AM)Spelos Wrote: That would either look choppy or would be performance heavy.
You need to remember that such a refresh rate should be the same as player's FPS.
Creating and Removing a ParticleSystem 30 times a second or more might be too much.

But I didn't try it, so... you still might want to give it a go.

I was thinking 10 times a second. It's not like the player has lightning speed anyway Tongue

Trying is the first step to success.
08-15-2015, 09:15 AM
Find
Spelos Away
Banned

Posts: 231
Threads: 19
Joined: Sep 2014
#6
RE: Making snow&rain "affect" some things?

As I said... I didn't try it so I cannot effectively tell how it will look.
But keep in mind the player could jump, fall and run.

And as far as fast timers go, I think I've read somewhere that the lowest optimal timer should be around 0.20, which makes it 5 times a second. But I might remember it wrong...

Let's say he should try it and potentially report any issues, I'm quite interested what it actually looks like.
08-15-2015, 09:34 AM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#7
RE: Making snow&rain "affect" some things?

Thanks everyone for help, I think i'll stick with the untrealistic idea.
Didn't know you needed to do THIS on hpl2 lol.
Btw, idea is from another engine, I'm also creating something else, but I think that that engine stays updated until this year lol. but from there, I could create THAT, where you can place rain, and make the rain stop if it collides something Tongue so tried to do the same thing to amnesia Tongue
08-15-2015, 12:34 PM
Find
Traggey Offline
is mildly amused

Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation: 185
#8
RE: Making snow&rain "affect" some things?

Alright first of, rain effects are always expensive, but no Spelos it won't be THAT preformance heavy, I was doing it way back in the Unreal 2 days.

So here's the rundown, the problem with making a particle effect like this is that HPL will not alow you to do physics interaction on the effects and call events from it ( as far as I can recall anyway ), in a game engine like unreal what I would do is calculate hit detection on each particle and when it hits the ground, kill the particle and spawn another one which would be the splash impact.

Now rendering houndreds of these particles at once? Can become a tad expensive, that's why we don't!

You only need them rendering in an area around the player, when I do this I usually attach the particle system slightly offset to the front of the player, so that they can still see it if looking to the left or right on the screen, but nothing will be rendering behind the player, as the they will never be able to look at that anyway.

[Image: RainEffect2.png]

Then we attach what I call a rain cylinder to the player aswell, this is a big cylindrical mesh with inwards facing polygons, to this mesh we apply a material of falling water. Scale the cylinder up and it will become a nice and cheap way of faking far away rain, to make your bad weather seem a bit more impactfull.

Here's a little gif from a game I've been making for fun, demoing this kind of effect, I have not yet implemented the far away rain cylinders, but the particle system is here.

[Image: RainEffects.gif]

So basicly, look around if you can generate events from particle collision, if not, you're pretty much screwed.
(This post was last modified: 08-15-2015, 12:39 PM by Traggey.)
08-15-2015, 12:36 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#9
RE: Making snow&rain "affect" some things?

(08-15-2015, 12:36 PM)Traggey Wrote: Alright first of, rain effects are always expensive, but no Spelos it won't be THAT preformance heavy, I was doing it way back in the Unreal 2 days.

So here's the rundown, the problem with making a particle effect like this is that HPL will not alow you to do physics interaction on the effects and call events from it ( as far as I can recall anyway ), in a game engine like unreal what I would do is calculate hit detection on each particle and when it hits the ground, kill the particle and spawn another one which would be the splash impact.

Now rendering houndreds of these particles at once? Can become a tad expensive, that's why we don't!

You only need them rendering in an area around the player, when I do this I usually attach the particle system slightly offset to the front of the player, so that they can still see it if looking to the left or right on the screen, but nothing will be rendering behind the player, as the they will never be able to look at that anyway.

[Image: RainEffect2.png]

Then we attach what I call a rain cylinder to the player aswell, this is a big cylindrical mesh with inwards facing polygons, to this mesh we apply a material of falling water. Scale the cylinder up and it will become a nice and cheap way of faking far away rain, to make your bad weather seem a bit more impactfull.

Here's a little gif from a game I've been making for fun, demoing this kind of effect, I have not yet implemented the far away rain cylinders, but the particle system is here.

[Image: RainEffects.gif]

So basicly, look around if you can generate events from particle collision, if not, you're pretty much screwed.

Thanks, gonna try that out, but if I can do this, can I attach something on someone's Forehead?! like sunglasses, re breather?! so when he turns, or wlaks it will stay where it is supposed to stay
08-15-2015, 12:45 PM
Find
Traggey Offline
is mildly amused

Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation: 185
#10
RE: Making snow&rain "affect" some things?

I uh... I don't see how that's related to this.
08-15-2015, 12:50 PM
Find




Users browsing this thread: 1 Guest(s)