Hi, I am experiencing a couple of issues when using the upgraded Particle Universe for Ogre3D 2.1 found on "scrawl/ParticleUniverse/Ogre2.1" on the previous page.
Bug 1) A Memory leak: ok, so the first bug is caused whenever a particle is ran in the scene.
Here is some information to replicate: I am using a single particle "mp_torch.pu" in the scene and have created a hlms unlit with the correct texture.
Code: Select all
hlms mp_fire_02 unlit
{
depth_write off
scene_blend add
diffuse_map mp_fire_02_2x2.dds
diffuse 1 1 1
}
I use this code to run the particle and the system then plays the particle indefinately, and using the task manager, you can watch the memory jump.
Code: Select all
psys = ParticleUniverse::ParticleSystemManager::getSingletonPtr()->createParticleSystem("ParticleUni"+scene.getUniqueName(), "mp_torch", scene.sceneManager);
Ogre::SceneNode* node = sceneManager->getRootSceneNode()->createChildSceneNode();
node->attachObject(psys);
node->setPosition(Ogre::Vector3(0,0,0));
psys->prepare();
psys->start();
psys->setRenderQueueGroup(55); // | This is set to "V1_FAST" Render queue mode
Everything looks ok in the scene, but the memory cost is like 2-3mb addition a second per particle and none of it cleans up.
When i added a lot of the same particles to the scene, i went over 12gb of ram very quickly lol
Here is a quick image of the particle for proof that Particle Universe works on 2.1
Q) Does anyone else experience this with the same setup?
Bug 2) If you call particle system prepare() without calling start() in the same frame, it causes a crash when calling renderOneFrame().
However, when start() is called directly after the prepare() it works fine. This is not good if you want to load the assets before hand.
...(for those who can't handle unperfect code... look away now...
)...But a quick hack to get around this is to call is:
Code: Select all
psys->prepare();
psys->start();
psys->stop();
and this makes the particle be prepared and work as normal to be played later on.
I am continuing to look into this, but if someone has already solved it or knows where it is, then it would be a great head start
Thanks and looking forward to your responses.