Rain/Snow VFX attached to camera.

Everything about development and the OpenMW source code.
Post Reply
Vakath
Posts: 5
Joined: 30 Jul 2017, 18:06

Rain/Snow VFX attached to camera.

Post by Vakath » 05 Aug 2017, 14:48

Hi,

I'm just looking through the createRain method in sky.cpp

I'm trying to understanding it:
as I see it, createRain adds a number of particle emitters that are bound to the sky root node, this means that as the sky root is bound to the player, the rain/snow will move with the player.

Is there a way this could be changed to use the osgParticle::PrecipitationEffect?

Thanks

Vakath
Posts: 5
Joined: 30 Jul 2017, 18:06

Re: Rain/Snow VFX attached to camera.

Post by Vakath » 05 Aug 2017, 19:56

Alternatively, instead of having the particle emitter bound to the skybox, spawn particles in a diameter around the player within the world.

I don't know how this would be done yet but for now I'm wondering if it would be possible to just randomly spawn a single particle 600 times a second in a diameter around the player.

As the player moves, the spawn area changes but the spawned particles continue on their path in the world space (not bound to skybox) until they timeout (which i think currently is 1 second).

This would essentially mean having 600 emitters around the player in the world space whenever a weather effect is occurring.

User avatar
Thunderforge
Posts: 154
Joined: 06 Jun 2017, 05:57
Github profile: https://github.com/Thunderforge

Re: Rain/Snow VFX attached to camera.

Post by Thunderforge » 09 Aug 2017, 04:49

I assume that you're asking about this as a possible solution to bug #2698?

(I don't know enough to answer definitively, just wanting to understand your goal with this).

Vakath
Posts: 5
Joined: 30 Jul 2017, 18:06

Re: Rain/Snow VFX attached to camera.

Post by Vakath » 11 Aug 2017, 13:18

Yea trying to come up with a solution.
It wouldn't be the same solution as Vanilla but would at least look better in the mean time imo!

Post Reply

Who is online

Users browsing this forum: Raziel and 3 guests