Hello All,
I am quite new to Equalizer library and doing my bachelor thesis based on
eqOgre. I am creating a projection system with 3 projectors creating a one
large curved screen. Projector are positioned so that middle one is
pointing straight towards middle and left and right have little bit of yaw
towards center of the screen.
I use windows 7 platform, equalizer 1.0.1 and ogre 1.7.2
Example config file I used ( omitting multiple pipes) is
3-window.curved.eqc. Everything works nicely, but hpr for channel-left and
channel-right does not work.
I changed bit of eqOgre code and assumption that to get that orientated
frustum I have to call getHeadTransform. This seems to be the right way go
because I get cameras pointed towards center, but I lose my ability to
rotate camera. That seems to be because I don't use the last cameras
matrix, so it reverts back. But when I use ogre::Camera.getViewMatrix and
multiply it with getHeadTransform I get cameras that rotate around some
axis.
So question is which is the correct way to set canvas using projection
format so the hpr component is used. Chancing fov for example works.
segment
{
viewport [ 0 0 .333333 1 ]
channel "channel-left"
projection
{
origin [ 0 0 0 ]
distance 3
fov [ 54 40 ]
hpr [ -22.5 0 0 ]
}
}
Best example I got was from Andreas Kirsch bachelor thesis, but when I
implement it with eqOgre is not perfect, and buggy.
This is the relevant code I try to use:
pWin->setFrustum(frust.compute_matrix());
// setup viewmat.
const FrameData& frameData = _getFrameData();
const eq::Vector3f& position = frameData.getCameraPosition();
Ogre::Vector3 relVec(position.x(), position.y(), position.z() );
const Ogre::Radian tmpYaw(frameData.getCameraRotationX());
const Ogre::Radian tmpPitch(frameData.getCameraRotationY());
const eq::Matrix4f& headTransform = getHeadTransform();
eq::Vector4f viewDirection = headTransform.get_column(2);
pWin->getCamera()->setDirection( viewDirection.x(), viewDirection.y(),
viewDirection.z() );
//set Camera
pWin->getCamera()->moveRelative(relVec);
pWin->getCamera()->yaw(tmpYaw);
pWin->getCamera()->pitch(tmpPitch);
// render one frame.
pWin->render();
Does any one have any suggestion how to get this to work? I am not that
proficient with 3d mathematics, equalizer or Ogre, so this seems a bit
difficult for me. I think I am missing something obvious or have
misunderstood something.
I can send source files I use if someone request them. For me dropbox might
be most easiest place, because I haven't used github or sourceforge.
As soon I have finished this project I will upload this someplace, perhaps
in github.
Best Regards,
Jussi Tyynelä
ps. Almost forgot. Thank you for an excellent software!
_______________________________________________
eq-dev mailing list
[email protected]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com