Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / DP 1.05 delete emitter does not clear emitter data/mesh

Author
Message
GrumpyOne
16
Years of Service
User Offline
Joined: 27th Nov 2007
Location: London, UK
Posted: 12th Jul 2010 18:21
I've found another bug within Dark Physics particle emitters.

The phy delete emitter ID command simply hides the emitter but does not clear emitter data/mesh. If another emitter is created with the same ID number, even after several seconds, planes from the deleted emitter re-appear. This means that emitters can't be used more than once without manually setting their properties so the previous instance of the emitter had no displayed planes on deletion. It also implies that system resources taken up by an emitter are not being released.



A related and more serious issue is that data seems to be shared between emitters. Having deleted an emitter then creating a new emitter with a different ID still inherits data and shows planes from the deleted mesh. The code below demonstrates the problem.




GrumpyOne - the natural state of the programmer
GrumpyOne
16
Years of Service
User Offline
Joined: 27th Nov 2007
Location: London, UK
Posted: 12th Jul 2010 18:47
Btw, there is a work around for this bug. As long as the previously deleted emitter had no planes upon deletion they will not be inherited by any subsequently created emitters.

The code below demonstrates the work around. The emitter to be deleted needs to have its emitter life span and emitter rate set to values that will show no planes in the next timestep after the call to phy update. The emitter can then be deleted in the next timestep without passing unwanted planes to any subsequently created emitters.

I was concerned that if other emitters existed they might also share data with new emitters, however, this is not the case. In the code below there is one emitter I keep persistent throughout. Its presence doesn't seem to affect newly created emitters. The bug may be something to do with the data structure management by dark physics, perhaps deletion of the last added emitter ID occurs by simply decrementing an array counter without clearing the data from the array? Just an idea.



GrumpyOne - the natural state of the programmer

Login to post a reply

Server time is: 2024-04-19 16:22:45
Your offset time is: 2024-04-19 16:22:45