Weather Effects: Snow

Lots of cool and useful tips to mod either serverside or clientside

Re: Weather Effects: Snow

Postby Apache Thunder » Thu Dec 17, 2009 10:23 pm

That rain effect looks pretty good. Better then DCX's rain. I'll take a look! :D

EDIT: Checked it out. Appears to use Particles (and oddly they have a endEffectTemplate code on them despite the fact that only Projectiles can have that...hmm...).

It's set up a bit differently them what I got. Perhaps I can tweak this for snow and get heavy snow without going over the sprite limit. All of the rain bundles are in 60 meter increments on a main bundle and each one produces only 25 particles a second. I'll post back on the results!
ImageImageImage

I have cameras in your head!
User avatar
Apache Thunder
 
Posts: 1199
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA

Re: Weather Effects: Snow

Postby Senshi » Fri Dec 18, 2009 12:05 am

Very nice explanation. Could serve as a basic tutorial for effects in general, or at least a good example, I'd say :)

The reason it doesn't lag is indeed the huge difference between particles and sprites that Refractor makes. When I worked on adding long and fancy smoke columns to destroyed vehicles (wrecks TTL was something about 60-120 sec), I also encountered that problem. I wanted to avoid the "smoke puff"-effect and thus had a pretty high emitter rate. But as this effect had to be attached directly to the Wreck object (which I had to transform from simpleobject to Bundle obviously), this also caused the problem that the effect interestingly stays active all the time. So when a vehicle spawns, the effect also gets started right away, it's just the LodSelector that makes it invisible. But for some reason Refractor is unable to "block" this invisible effect and calculates the smoke all the time in the background...So as soon as there are many objects and a high emitter rate I quickly reached the "particle treshold of death", meaning almost instant ultralag after the vehicles spawn or CTD. Reducing the emitter rate I approached the level and as soon as I was on the "good" side, the problems immediatly stopped (despite a slightly higher GPU perfomance drain, obviously).
I don't think it's the SizeoverTime or RGBAoverTime stuff that causes much problems, these should be very easy to handle, even by ancient BF42. I think it simply is the sheer amount of particles and thus individual elements that Refractor can't handle and thus goes boom... And as SpriteParticles are basically "ultra-light"-particles that have far less properties and values each there can be used more of them "safely".
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: Weather Effects: Snow

Postby Apache Thunder » Fri Dec 18, 2009 1:07 am

I also noticed there is extra physics for particles. When a object that is making a particle is set up in a certain way, the game tries to make the particle move with the object (granted it's not perfact though). SpriteParticles don't do this. They spawn and are immediately no longer part of the emitter. They go their own path as set by their initial velocity and the drag settings and that's all they listen to.

Particles can be effected by where the emitter is going, Sprites can not. This is what I think is why Particles lag bad when lots of them are around and why Sprites don't lag. Though why Sprites CTD the game after hitting 5000 is beyond me. Sounds more like a bug in the engine code that could have easily be fixed. Maybe BFV got around this. The BF42 mod conversion for that game uses the effect system to make the leave sprites on trees. I've heard that the trees produce a lot of sprites in a short time and in BFV they cause additional lag. So perhaps BFV doesn't CTD when you make lots of sprites. But BFV seems to lag because of it instead.
ImageImageImage

I have cameras in your head!
User avatar
Apache Thunder
 
Posts: 1199
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA

Re: Weather Effects: Snow

Postby fo0k » Fri Dec 18, 2009 3:47 am

:shock: :geek:

Thats some nice thinking man.. and execution of it. the shot up in the sky is the true show of how realistic it looks.
User avatar
fo0k
 
Posts: 1423
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Weather Effects: Snow

Postby Coroner47 » Fri Dec 18, 2009 6:09 am

Nice work Apache!! I also have snow & rain effects like this & ran into the same problem with lag & ctds. I posted this question on SSM a while back & no one had a answer at the time. I'll post it again... maybe someone here, or someone new might know. Is there anything on the "player" that i can addtemplate to that isn't on any bot or other human player? Maybe a player specific object like the 1st camera. My solution to the lag of the snow / rain effect was to attach it to the "player". I tested it way back when by attaching effect to all "soldiers" human & bot, & it worked beautifully with a "ObjectTemplate.lodDistance" of "5" & a down poor... only problem was when soldiers bunched up ( 8+ ) the effect would cause a CTD.

Also, glad to see you put the grenade spam into your mod!! That was my fav weapon before they tweak it for release! :twisted:
Image
Pray hard, die fast
User avatar
Coroner47
 
Posts: 213
Joined: Tue Nov 24, 2009 5:11 am
Location: Canada

Re: Weather Effects: Snow

Postby Kurosaji » Sat Aug 23, 2014 4:23 am

I was trying to add snow to my map when i saw this thread. I was going to add a lot of snow for a blizzard type map. A windy snow and stuff, but the link you provided is dead. Is there any way you could help me out with a new link to the old one, or some heavy blizzardy snow, anything would help.
Kurosaji
 
Posts: 59
Joined: Fri Aug 22, 2014 8:01 pm

Re: Weather Effects: Snow

Postby GoodDayToDie!! » Mon Sep 08, 2014 6:37 pm

Herro!,

I am working on yet another is82 map. The theme is kinda dark and "hellish". I want to take your Snow Effect and create an Ash Effect instead. I added your files into my map and when loaded up in BattleCraft, nothing shows for the e_Snow cached object....I can't select it to be in my que of objects.

As far as the Ash part goes, I took your snow_tga picture from the texture folder and blacked it out. Hopefully that will work. I added the line "e_Snow=StandardMesh(e_Snow)" to my interstate lst file in my bc42 folder....However, since I see no standardmesh for this effect, I assume something is incorrect...

Note, I actually took the snow effect from an existing is82 map made by another player a few years ago. It was easier that way considering it was already set up for is82...

Any thoughts or suggestions as to how i can get this to work?

Thanks,

I said GOODDAY SIR!!

EDIT*
LINK FOR EFFECT ON FIRST PAGE IS BROKEN.
Last edited by GoodDayToDie!! on Tue Sep 09, 2014 1:17 am, edited 1 time in total.
Image
GoodDayToDie!!
 
Posts: 217
Joined: Mon Dec 13, 2010 7:59 am
Location: Bat Country, California

Re: Weather Effects: Snow

Postby Diamondback » Mon Sep 08, 2014 10:20 pm

GoodDayToDie!! wrote:Herro!,

I am working a yet another is82 map. The theme is kinda dark and "hellish". I want to take your Snow Effect and create an Ash Effect instead. I added your files into my map and when loaded up in BattleCraft, nothing shows for the e_Snow cached object....I can't select it to be in my que of objects.

As far as the Ash part goes, I took your snow_tga picture from the texture folder and blacked it out. Hopefully that will work. I added the line "e_Snow=StandardMesh(e_Snow)" to my interstate lst file in my bc42 folder....However, since I see no standardmesh for this effect, I assume something is incorrect...

Note, I actually took the snow effect from an existing is82 map made by another player a few years ago. It was easier that way considering it was already set up for is82...

Any thoughts or suggestions as to how i can get this to work?

Thanks,

I said GOODDAY SIR!!

EDIT*
LINK FOR EFFECT ON FIRST PAGE IS BROKEN.


You say nothing at all shows? Not even the generic icon thingy? Because that's what most effects adopt in terms of geometry in most cases (in BC42). Since they don't have a SM file of their own.
See my Strasbourg map project here.
Diamondback
 
Posts: 517
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Re: Weather Effects: Snow

Postby GoodDayToDie!! » Tue Sep 09, 2014 1:18 am

What generic icon thingy?
Image
GoodDayToDie!!
 
Posts: 217
Joined: Mon Dec 13, 2010 7:59 am
Location: Bat Country, California

Previous

Return to General Modding Tutorials

Who is online

Users browsing this forum: No registered users and 7 guests