Page 1 of 1

Optimization for explosion generator please!

Posted: 06 Jan 2011, 17:22
by Karl
(at moderators: move the thread to somewhere else if its wrong i dint know where i should post it)

well the issue on the ceg is that like cegs that uses alot of spawners/spawner dependant that (like fire effect, poison , gas etc...) that is heavy resource intensive
yes i know there gives lups but imo its doesn't feel like the ceg one

for example a spawner with a count of 80 and delay of "8 i3"
is it very resource intensive even when there is one particle system called with a count of 1 and particlecount of 2 or 1
and it would look fugly if i need to tone down heavly the lifetime off it

also afaik the explosiongenerator is for AGES not updated when then it was some few changes nothing major that would add new features or better yet making it less resource intensiv

i can upload some examples of cegs that causes performance drop when a few of them exist

Re: Optimization for explosion generator please!

Posted: 06 Jan 2011, 17:43
by FLOZi
There have been some changes recently such as "store all CEGs in one global structure for efficiency" but I'm not sure if that's performance efficiency or maintenance efficiency, or how much effect it will have - kloot can clarify.

It may be that the whole design of the implementation is flawed and needs rewriting (I really have no idea, but I'm guessing that LUPS can do certain effects better & faster), in which case we won't see major improvements in performance any time soon. At the end of the day, complex particle effects are probably always going to be performance gobblers. :wink:

Re: Optimization for explosion generator please!

Posted: 06 Jan 2011, 17:52
by Karl
Well but spawner is not that complex and i cannot see it why it is soo resource hungry and that is pissing me off

Re: Optimization for explosion generator please!

Posted: 07 Jan 2011, 01:33
by FLOZi
Karl wrote:Well but spawner is not that complex and i cannot see it why it is soo resource hungry and that is pissing me off
If it's so simple optimize the code yourself.

Re: Optimization for explosion generator please!

Posted: 07 Jan 2011, 01:36
by Karl
no i dint meand that i can code c++ but
that spawner is a "simple" thing that just spawns another ceg just like projectiles do

Re: Optimization for explosion generator please!

Posted: 07 Jan 2011, 03:43
by smoth
I don't notice any massive performance loss from cegs.

and i have clouds of dust

Anything can be massively taxing depending on how you ABuse it.

Re: Optimization for explosion generator please!

Posted: 07 Jan 2011, 10:03
by Karl
tell me:

http://pastebin.ca/2040183

http://pastebin.ca/2040184

i am trying for ages to make them not so resource intensiv

spawn a few of them and i got immediatly about 20~ FPS drop

Re: Optimization for explosion generator please!

Posted: 07 Jan 2011, 17:33
by Forboding Angel
well on the first one, that is at least 100 particles every time a single one is spawned once. If theya re being spawned repeatedly (for a missile trail or somehting like that, well then that is an asston of particles.

edit: the second one is even worse, at the minimum, 200 particles per spawn.

Re: Optimization for explosion generator please!

Posted: 07 Jan 2011, 17:38
by smoth
just one component:
[trailfake]
{
class=CSimpleParticleSystem;

[properties]
{

Texture=explo;
colorMap= 0.75 0.04 0.05 0.01 0.8 0.8 0.0 0.01 0.4 0.4 0.4 0.01 0 0 0 0.01;
pos = 0 r-10 r10, 20, 0 r-10 r10;
gravity = 0, 0, 0;
emitVector = 0 r-1 r1, 0 r-1 r1, 0 r-1 r1;
emitRot = 0;
emitRotSpread = 0;

sizeGrowth = -0.5;
sizeMod = 1.0;

airdrag = 1;
particleLife = 80;
particleLifeSpread = 20;
numParticles = 15;
particleSpeed = 1.07;
particleSpeedSpread = 0.5;
particleSize = 2;
particleSizeSpread = 2;

directional = 0;
useAirLos = 1;
}
air=1;
ground=1;
water=1;
count=3;
}
You are chewing massive amounts of particles because you do not know how to make it efficient. This one part is 15X3 per puff.

You need to work on your effects more.

Re: Optimization for explosion generator please!

Posted: 07 Jan 2011, 18:08
by Karl
when i reduce them they look too ugly

when i increase them they are too resource intensiv

edit: on the spawner i mean which should look like the ground is on fire

i know it is 3x15 and it is supposed to be that
look at its emitvector i am using randoms to fake a spike effect

Re: Optimization for explosion generator please!

Posted: 07 Jan 2011, 19:48
by smoth
Computer science:

cheap * well made * fast

choose 2.

want it well made, it will either be cheap or fast.
want it fast it will be cheap or well made.

you cannot have it all.

you want lots of particles fine, you want it to look good, fine, but it won't be fast. I think you are probably able to do it with less particles you just have not figured out how yet. Don't blame the engine code for your inexperience with something.

Re: Optimization for explosion generator please!

Posted: 07 Jan 2011, 20:49
by knorke
Maybe it would be good to have parameters for smokeTrail=true ?
ie its thickness, texture etc, like there is for beamlaser.
it would not be a particle effect but could serve as "base" and the trail might look good with fewer extra particles.

Re: Optimization for explosion generator please!

Posted: 07 Jan 2011, 20:52
by Karl
um those cegs are explosions and not for cegtag