Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Particle systems and computer performance  (Read 2661 times)

0 Members and 1 Guest are viewing this topic.

Offline CH

  • Members
  • *
Particle systems and computer performance
« on: 27 Aug 2009, 14:25:47 »
Hello,

I'm working on a fireworks script for a mission but it is unstable. When I use it on Rahmadi it looks good 9 out of 10 times but when I try to use it under more difficult circumstances, with lots of smoke and units,  the explosion looks more like an implosion. Does anyone know how to get around this problem?
 ???

Edit:
Ok, so I've been trying to isolate the problem by making small changes to the code. And when I run it, it appear as the particles don't get a "MoveVelocity" when running missions with a lot of smoke and units. Could this be a clue?

The sample mission that I've attached to the first post works just fine when I run it. Has anyone else tried it ? Did it look ok?
« Last Edit: 01 Aug 2010, 00:34:26 by CH »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Particle systems and computer performance
« Reply #1 on: 29 Aug 2009, 10:07:21 »
Might be there is a limitation related to drop command, you might try the setParticle commands with:
_source = "#particlesource" createVehicleLocal getPos whatever;
_source setParticleParams [similar to drop particle array)
_source setParticleRandom [...];
_source setParticleCircle [...];

Check these commands in the COMREF and play with them.

Offline CH

  • Members
  • *
Re: Particle systems and computer performance
« Reply #2 on: 31 Aug 2009, 12:48:10 »
I replaced the drop command with the ones you suggested (for details download fireworks_2_1.intro.zip) only to find out that the problem got worse. With these commands the code only worked approximately 1 out of 10 times in an otherwise non problematic environment.

After playing around with the code for a while I found out that the problem was probably caused by the quick deceleration of the particles. Don't ask me why, but by changing the "Rubbing" and "MoveVelocity" parameters (for details download fireworks_2_2.intro.zip) I could get the code to run properly even under demanding circumstances.

The result can be seen in this mission.
« Last Edit: 01 Aug 2010, 00:33:29 by CH »