Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

1) First I have added the Particle Folder from the Ogre SDK (contains Smoke.particle).

2) Added the Smoke.material And smoke.png and smokecolors.ong.

3) After this I added the Plugin = Plugin_ParticleFX in the plugins.cfg.

Here is my code:

#Defines plugins to load

# Define plugin folder
PluginFolder=./

# Define plugins
Plugin=RenderSystem_GL
Plugin=Plugin_ParticleFX

4) I have added the particle path in the resources.cfg (adding the particle file in this causes the crash):

#Resource locations to be added to the 'bootstrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
Zip=media/packs/SdkTrays.zip

# Resource locations to be added to the default path
[General]
FileSystem=media/models
FileSystem=media/particle
FileSystem=media/materials/scripts
FileSystem=media/materials/textures
FileSystem=media/RTShaderLib
FileSystem=media/RTShaderLib/materials

Zip=media/packs/cubemap.zip
Zip=media/packs/cubemapsJS.zip
Zip=media/packs/skybox.zip

6) Finally I did all the settings, my code is here:

mPivotNode = OgreFramework::getSingletonPtr()->m_pSceneMgr->getRootSceneNode()->createChildSceneNode();  // create a pivot node

// create a child node and attach an ogre head and some smoke to it
Ogre::SceneNode* headNode = mPivotNode->createChildSceneNode(Ogre::Vector3(100, 0, 0));
headNode->attachObject(OgreFramework::getSingletonPtr()->m_pSceneMgr->createEntity("Head", "ogrehead.mesh"));
headNode->attachObject(OgreFramework::getSingletonPtr()->m_pSceneMgr->createParticleSystem("Smoke", "Examples/Smoke"));

7) I run this and got the error below:

An exception has occurred: OGRE EXCEPTION(2:InvalidParametersException): Cannot find requested emitter type. in ParticleSystemManager::_createEmitter at /Users/davidrogers/Documents/Ogre/ogre-v1-7/OgreMain/src/OgreParticleSystemManager.cpp (line 353)

8) Getting crash at:

(void)renderOneFrame:(id)sender
{
    if(!OgreFramework::getSingletonPtr()->isOgreToBeShutDown() &&
       Ogre::Root::getSingletonPtr() && Ogre::Root::getSingleton().isInitialised())
    {
      if(OgreFramework::getSingletonPtr()->m_pRenderWnd->isActive())
      {
         mStartTime = OgreFramework::getSingletonPtr()->m_pTimer->getMillisecondsCPU();
//( getting crash here)

Does anyone know what could be causing this?

share|improve this question

1 Answer 1

The error message *Cannot find requested emitter type. in ParticleSystemManager::_createEmitter* can basically have two central reasons:

  1. The ParticleFX plugin wasn't successfully loaded. This is a problem as the emitter types are defined in it.
  2. You specified a non-existing emitter type in your particle script

Either way the answer lies in the Ogre.log file. The following lines should be there:

19:19:12: Loading library .\Plugin_ParticleFX
19:19:12: Installing plugin: ParticleFX
19:19:12: Particle Emitter Type 'Point' registered
19:19:12: Particle Emitter Type 'Box' registered
19:19:12: Particle Emitter Type 'Ellipsoid' registered
19:19:12: Particle Emitter Type 'Cylinder' registered
19:19:12: Particle Emitter Type 'Ring' registered

If that part is missing in your log, then double check that the plugin DLL file is present in your execution folder and named as specified in your above listed plugins.cfg file. If those lines are present however, ensure that you used one of the mentioned emitter types in your script, spelled exactly the same way.

BTW to be exact: The crash will occur in this line, since that is when Ogre tries to use the unknown emitter type:

OgreFramework::getSingletonPtr()->m_pRoot->renderOneFrame();
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.