

annoying particle cap
#1
Posted 09 July 2010 - 07:23
1. I've tried to manually edit the Options.ini, changing the ParticleCap to very high number. not working, lags still happened sometimes.
2. there's also a WB script that will disable particle cap. it works on singleplayer missions, but not in MP games. the particles still removed and then lagging.
anyone can help?

NProject Mod -- Recolonize -- Tidal Wars
#2
Posted 09 July 2010 - 07:41
#3
Posted 09 July 2010 - 07:45

#4
Posted 09 July 2010 - 08:22
One thing i did to optimize my particles in C&C U was remove unused codes in the particle entries in ParticleSystems.ini and reduce some of the particle counts on some unnecessary effects.
For example, I turn this:
Quote
Priority = DEATH_EXPLOSION
IsOneShot = No
Shader = ALPHA
Type = PARTICLE
ParticleName = EXCloud01.tga
AngleZ = 0.00 7.00
AngularRateZ = -0.01 0.01
AngularDamping = 1.00 1.00
VelocityDamping = 0.90 0.92
Gravity = 0.00
SlaveSystem = MammothTankExplosionFlameSlave
SlavePosOffset = X:0.00 Y:0.00 Z:0.00
Lifetime = 100.00 100.00
SystemLifetime = 1
Size = 20.00 20.00
StartSizeRate = 0.00 0.00
SizeRate = 5.00 6.00
SizeRateDamping = 0.80 0.80
Alpha1 = 1.00 1.00 0
Alpha2 = 0.00 0.00 100
Alpha3 = 0.00 0.00 0
Alpha4 = 0.00 0.00 0
Alpha5 = 0.00 0.00 0
Alpha6 = 0.00 0.00 0
Alpha7 = 0.00 0.00 0
Alpha8 = 0.00 0.00 0
Color1 = R:255 G:125 B:25 0
Color2 = R:100 G:100 B:100 60
Color3 = R:0 G:0 B:0 0
Color4 = R:0 G:0 B:0 0
Color5 = R:0 G:0 B:0 0
Color6 = R:0 G:0 B:0 0
Color7 = R:0 G:0 B:0 0
Color8 = R:0 G:0 B:0 0
ColorScale = 0.00 0.00
BurstDelay = 0.00 0.00
BurstCount = 25.00 25.00
InitialDelay = 0.00 0.00
DriftVelocity = X:0.20 Y:0.20 Z:0.25
VelocityType = OUTWARD
VelOutward = -4.00 4.00
VelOutwardOther = -4.00 4.00
VolumeType = CYLINDER
VolCylinderRadius = 3.00
VolCylinderLength = 0.00
IsHollow = No
IsGroundAligned = No
IsEmitAboveGroundOnly = No
IsParticleUpTowardsEmitter = No
WindMotion = Unused
WindAngleChangeMin = 0.149924
WindAngleChangeMax = 0.449946
WindPingPongStartAngleMin = 0.000000
WindPingPongStartAngleMax = 0.785398
WindPingPongEndAngleMin = 5.497787
WindPingPongEndAngleMax = 6.283185
End
to this:
Quote
Priority = DEATH_EXPLOSION
IsOneShot = No
Shader = ALPHA
Type = PARTICLE
ParticleName = EXCloud01.tga
AngleZ = 0.00 7.00
AngularRateZ = -0.01 0.01
AngularDamping = 1 1
VelocityDamping = 0.90 0.92
Gravity = 0
SlaveSystem = MammothTankExplosionFlameSlave
SlavePosOffset = X:0 Y:0 Z:0
Lifetime = 100 100
SystemLifetime = 1
Size = 20 20
StartSizeRate = 0 0
SizeRate = 5 6
SizeRateDamping = 0.80 0.80
Alpha1 = 1.00 1.00 0
Alpha2 = 0 0 100
Alpha3 = 0 0 0
Color1 = R:255 G:125 B:25 0
Color2 = R:100 G:100 B:100 60
Color3 = R:0 G:0 B:0 0
ColorScale = 0 0
BurstDelay = 0 0
BurstCount = 25 25
InitialDelay = 0 0
DriftVelocity = X:0.20 Y:0.20 Z:0.25
VelocityType = OUTWARD
VelOutward = -4 4
VelOutwardOther = -4 4
VolumeType = CYLINDER
VolCylinderRadius = 3
WindMotion = Unused
End
Doing that to ALL particles kindof improved the overall performance of the game.
If you still want to "increase" the particle cap of ZeroHour, edit the MaxParticleCount parameter in GameData.ini instead of the particle cap parameter in Options.ini.
#5
Posted 09 July 2010 - 10:16
It makes the game try to show those particles at all costs.
I have found this in gamedata.ini. Not sure if it'll help you though.
MaxParticleCount = 2500 ; the maximum number of particles that can exist at one time (to 5000 for demo) MaxFieldParticleCount = 30; the number of field type particles rendered to the screen, beyond which this type will begin skipping ; a field particle is one of Priority AREA_EFFECT and isGroundAligned = Yes ; Typically these are puddles, toxic contamination, radiation, decontamination, etc.
Chris does that particle tuning, greatly improve performance?
You just delete unused stuff?
Edited by Failure, 09 July 2010 - 10:17.
#6
Posted 09 July 2010 - 10:39
Failure, on 9 Jul 2010, 18:16, said:
It makes the game try to show those particles at all costs.
Some are explained by Beng in C&Cmaps:
Quote
Failure, on 9 Jul 2010, 18:16, said:
You just delete unused stuff?
Yeah, trimming the codes did improved the performance of ZeroHour. Atleast for me...
Not only that, it also trimmed my ParticleSystem.ini filesize from 1.7MB down to 817KB; Without custom particles i've added, the file's around 600KB .
ParticleSystem.ini seriously have the case of bloatware

Edited by Kris, 09 July 2010 - 10:47.
#7
Posted 09 July 2010 - 11:08
Also there are many particles that have alpha problems. It's strange, since in stock generals you could've have a big alpha delay aka
Alpha1 0.00 0.00 0
Alpha2 1.00 1.00 200
In zero hour it varies. I'm usually making it max fade in at 25 frames. Higher values sometimes return nothing and particle isn't even spawned ( look at zero hour nukemushroomringsmoke - it works in generals, in zero hour not )
Maybe I'll have some time to trim the whole file

Edited by Failure, 09 July 2010 - 11:09.
#8
Posted 09 July 2010 - 11:12
Kris, on 9 Jul 2010, 15:22, said:
I think it's not the particle effects that makes the lag. I've once tried to trigger a lot of particles in a custom SP map and turned off the particle cap via coding. it's not lagged at all. even the framerate were dropped, all particles still shown up.
I think it depends on the computer's capability. I have a computer that can run many newer games smoothly, but how could it can't run ZH smoothly?
Kris, on 9 Jul 2010, 15:22, said:
Doing that to ALL particles kindof improved the overall performance of the game.
I'm still converting my ParticleSystem.ini for that. but that will be take a LOT of time. so I'm finding another alternatives.
Kris, on 9 Jul 2010, 15:22, said:
ah, I missed this one. tried this later.
Kris, on 9 Jul 2010, 17:39, said:
Failure, on 9 Jul 2010, 18:16, said:
It makes the game try to show those particles at all costs.
Some are explained by Beng in C&Cmaps:
Quote
anyway, because they checked them one by one, I think that's the source of the lags. so I have theory that if we skip that "checking", it will be solved. like how uncapped FPS worked.

NProject Mod -- Recolonize -- Tidal Wars
#9
Posted 09 July 2010 - 12:47
n5p29, on 9 Jul 2010, 19:12, said:
Kris, on 9 Jul 2010, 15:22, said:
Doing that to ALL particles kindof improved the overall performance of the game.
I'm still converting my ParticleSystem.ini for that. but that will be take a LOT of time. so I'm finding another alternatives.
Get Notepad++, use the replace function.
#10
Posted 09 July 2010 - 13:49
JJ_, on 9 Jul 2010, 19:47, said:
n5p29, on 9 Jul 2010, 19:12, said:
Kris, on 9 Jul 2010, 15:22, said:
Doing that to ALL particles kindof improved the overall performance of the game.
I'm still converting my ParticleSystem.ini for that. but that will be take a LOT of time. so I'm finding another alternatives.
Get Notepad++, use the replace function.
I can't do that very risky action. I need to check each ParticleSystem to make sure they're optimized correctly.

NProject Mod -- Recolonize -- Tidal Wars
#11
Posted 22 July 2010 - 16:32
Indeed there are shitloads of particles which are extremely inefficient or bloated, but finding them can be hard. There are also some particles with odd Colourscale values, which seems to completely mess up the lifetime. One such particle was an element of the default napalm explosion. I also had to rework alot of the default flame effects for EC, as I remember the small napalm fire - used something like 800 particles.. There are other cases of certain effects using 2 of the same effect as well. I never bothered to prune stuff though. Hence my particlesystem is a bit over 2mb

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users