Particle System with custom view matrix

Problems building or running the engine, queries about how to use features etc.
Post Reply
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Particle System with custom view matrix

Post by Pellaeon »

Ogre Version: :1.11.1:
Operating System: :Windows 10:
Render System: :DirectX:

Hi,

I want to use the particle system plugin of ogre. With predefined cameras all works fine. But when I set a custom matrix for the camera then my parictles are vanished. So I want to ask if anyone knows how to fix this.

Best regards

Pellaeon
Last edited by Pellaeon on Wed Aug 22, 2018 2:56 pm, edited 1 time in total.
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Particle System with custom view matrix

Post by Pellaeon »

*push*
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Particle System with custom view matrix

Post by paroj »

probably some transform does not get updated correctly. Check the transforms generated in BillboardParticleRenderer::_updateRenderQueue
Pellaeon
Goblin
Posts: 230
Joined: Thu Apr 28, 2011 12:23 pm
x 28

Re: Particle System with custom view matrix

Post by Pellaeon »

I looked into the method but I don't know which code in special could cause the problem.

This is how I create the camera:

Code: Select all

auto pCamera  = pSceneManager->createCamera(cameraName);
auto pCamNode = pSceneManager->createSceneNode();
pCamNode->attachObject(pCamera);
pSceneManager->getRootSceneNode()->addChild(pCamNode);
In my render loop I do the following:

Code: Select all

m_ogreManager.getDefaultCamera()->setCustomViewMatrix(true, ogreMatrix);

Ogre::Quaternion quat;
Ogre::Vector3 pos, scale;
ogreMatrix.decomposition(pos, scale, quat);

m_ogreManager.getDefaultCamera()->getParentNode()->setPosition(pos);
m_ogreManager.getDefaultCamera()->getParentNode()->setOrientation(quat);
I get the custom view matrix, set it to the camera. Then I decompose the matrix to get position and orientation and then I set these values to the parent scene node of the camera and this information is used in "BillboardSet::_notifyCurrentCamera".
But I still see no billboards when using the camera with custom matrix.

Regards

Pellaeon
Post Reply