Jump to content

Shader particle geometry applied to weathers are different?


Xilante

Recommended Posts

Hello everyone =)!

It has been a few days I tried to remove or apply new particles to the weather through script but without success unfortunately.

 

By reading CKwiki guide and giving a look at the shader particle geometry script in CK I learnt the commands and tried different things to use them for the weather and various attempts to activate them (As in the past, with another script, it wouldn't activate in all ways).

 

Here's what I tried so far:

 

In this one I just let it rain and then step on the trigger to remove the SPG, while it compilated fine, nothing happened when I stepped on the trigger, weather's SPG was still there (Tried with a weather using RainParticles, tried the same script by using RainStormParticles just in case but the results were the same).

 

ShaderParticleGeometry Property RainParticles  Auto
float property FadeOutTime = 1.0 auto


Event OnTrigger(ObjectReference akActionRef)
   RainParticles.remove(FadeOutTime)
EndEvent

 

 

Here I thought that the weather actually needed another SPG to work and couldn't just remove it without applying something else and also set the condition that it must be raining when I step on the trigger to do this "switching" but again, even if it compiled fine nothing happened in game (Weather still kept his rain SPG).

 

ShaderParticleGeometry Property RainParticles  Auto
ShaderParticleGeometry Property RainParticlesModified  Auto

Event OnTrigger(ObjectReference akActionRef)
   Weather CurrentWeather = Weather.GetCurrentWeather()
       if CurrentWeather.GetClassification() == 2
           RainParticles.remove(1)
           RainParticlesModified.apply(1)
       endif
EndEvent

 

 

I stopped using triggers and put the script in a genpullbar01 instead then I tried to put a particular target instead of rainy weathers in general by using OnEffectStart where in CKwiki says that the "akTarget" is the SPG applied to it, so I set the target to be the weather playing in-game thinking it would remove and apply a new SPG in the target, it did compile fine but as above, it didn't work at all.

 

ShaderParticleGeometry Property RainParticles  Auto  
ShaderParticleGeometry Property RainParticlesModified  Auto  
Weather Property SkyrimOvercastRainTU  Auto  
float property FadeInTime = 1.0 auto
float property FadeOutTime = 1.0 auto

Event OnEffectStart(Weather Target)
 
   if Target == SkyrimOvercastRainTU
       RainParticles.remove(FadeOutTime)
       RainParticlesModified.apply(FadeInTime)
   endif

EndEvent

 

Again, by using a genpullbar01 I went super simple and just put an OnInit to remove the RainParticles, I loaded a save in which it was raining those and OnInit it should have removed them, but nothing happened.

 

ShaderParticleGeometry Property RainParticles  Auto

Event OnInit() 
RainParticles.remove(1)
EndEvent

 

 

I also tried other various things which are just slightly edited version of those which I didn't save but in short the commands don't work (no matter what I try to activate the script), in both the guide and the script example in CK they were used for spells, does it mean that even though both are Shader Particle Geometry in weather they behave differently? or did I overlook something or need to add an extra command I don't know about or use a particular event for weathers?

Edited by Xilante
Link to comment
Share on other sites

Ok, I tried some more stuff, even though a simple ".remove" didn't work I thought that maybe because it's part of the weather I had to state some uhm "conditions" and stuff, so I tried this:

 

ShaderParticleGeometry Property RainParticles  Auto  
ShaderParticleGeometry Property RainCol  Auto  
ShaderParticleGeometry Property RainStormParticles  Auto  
Weather Property SkyrimOvercastRainTU  Auto  
float property FadeInTime = 1.0 auto
float property FadeOutTime = 1.0 auto



Event OnEffectStart(Actor akTarget, Weather akCaster)
 
   if akTarget == Game.GetPlayer()
       if akCaster == SkyrimOvercastRainTU
           RainParticles.remove(FadeOutTime)
           RainStormParticles.remove(FadeOutTime)
           RainCol.apply(FadeInTime)
       endif
   endif

EndEvent

 

So what I did above is similar to what I did a few days ago, but instead of having "target" as the weather (Thinking the target is the shader particle applied to the weather) I put it as the player, because the rain is applied to the player's screen and the caster is well... the weather but it didn't work.

 

So, doing what I've been thinking for a few days which is that maybe ".remove" doesn't make much sense IF the weather can't really "stay" without a shader particle effect, I made a few tries by having scripts that only try to apply another shader particle effect, without really trying to remove the current one, here's what I tried so far:

 

Same one but without the remove thing (Didn't work):

Event OnEffectStart(Actor akTarget, Weather akCaster)
 
   if akTarget == Game.GetPlayer()
       if akCaster == SkyrimOvercastRainTU
           RainCol.apply(FadeInTime)
       endif
   endif

EndEvent

 

With trigger (didn't work):

Event OnTriggerEnter(ObjectReference akActionRef)
Weather CurrentWeather = Weather.GetCurrentWeather()
    if akActionRef == Game.GetPlayer()
        if CurrentWeather.GetClassification() == 2
            RainCol.apply(FadeInTime)
        Endif
    Endif
EndEvent

 

I also tried a simple "oninit" but with apply instead of remove, didn't work.

Even though it may seem useless at this point, I also tried putting an update every second thing, just in case it needed constant checking but it didn't work as well.

 

I don't really know what I'm doing wrong or which step I'm missing =O

It's almost as if the shader particle of weathers is not editable through scripting, but only by making a new weather so because of that I thought that maybe there was a particular event I had to use so in these days I surfed pretty much all the CKwiki's scripting references hoping I'd find the right one but no luck.

 

Perhaps I'm just blind and didn't see it so if you guys could point me to the right direction or any help it'd be great =).

Thanks in advance.

Link to comment
Share on other sites

  • 3 months later...

It seems to me that there should be a way to create a transparent mesh that has no collision but would fill a region with image depth coordinates that could be made to win a z-buffer fight with the precip particles.

Z-buffering - Wikipedia, the free encyclopedia

Z-fighting - Wikipedia, the free encyclopedia

 

If dry zones could be filled with such a mesh...

Edited by Apprentice Harper
Link to comment
Share on other sites

  • 1 month later...

It seems to me that there should be a way to create a transparent mesh that has no collision but would fill a region with image depth coordinates that could be made to win a z-buffer fight with the precip particles.

Z-buffering - Wikipedia, the free encyclopedia

Z-fighting - Wikipedia, the free encyclopedia

 

If dry zones could be filled with such a mesh...

 

Thats a good idea. You can change the transparency of fog and such too, so I wonder if that would work?

 

Also there are some mods that make the rain heavier. I wonder if they know what it is that affects the particles (perhaps this is where you got your info from already).

 

Maybe you can get some other weather modders to help with this. Its a great idea, and I absolutely love it. It had always bugged me to see rain go through roofs as if they weren't there. Good luck.

Link to comment
Share on other sites

It seems to me that there should be a way to create a transparent mesh that has no collision but would fill a region with image depth coordinates that could be made to win a z-buffer fight with the precip particles.

Z-buffering - Wikipedia, the free encyclopedia

Z-fighting - Wikipedia, the free encyclopedia

 

If dry zones could be filled with such a mesh...

 

Thats a good idea. You can change the transparency of fog and such too, so I wonder if that would work?

 

Also there are some mods that make the rain heavier. I wonder if they know what it is that affects the particles (perhaps this is where you got your info from already).

 

Maybe you can get some other weather modders to help with this. Its a great idea, and I absolutely love it. It had always bugged me to see rain go through roofs as if they weren't there. Good luck.

Thanks but I am not very skilled with rendering. I saw information about Z-fighting that seemed to be related to a kind of effect that would work here. I posted the information i could find in hope it would help Xilante. But these days I have some other concerns so I will probably not be pursuing this.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...