Hi all,
long time reader first time poster.
I'm trying to do a project that is using a whole bunch or sensors for movement and such. Its required to have three people playing as a single tank at one time therefore im trying to work out a way that we can render 3 different camera's on to 3 different monitors, for example, 3rd person camera for the person controlling the tank, a 1st person camera for the person controlling the gun and another 1st person camera for inside the tank.
I have seen a few different tutorials on the forums about it, but haven't really been able to follow them very well.
Any help on this would be appreciated,
Cheers
Courtney
Rendering on Muliple Monitors
It might be easier to make the software network aware. Have one 'server' reads the sensors and control input. It could also display one of the views. The other views would be 'clients' that would take information provided by the 'server' to display their views, and they would feed control input back to the server.
Travis
Travis
Depending the rendering: I've implemented something similar with 2DImages and a GUI on the first monitor and and a 3D-scene on the second monitor. There are two solutions to display this (beside vitek's networking solution):
First you make one window for each monitor and render to each one seperately. Have a look at the last posts in this thread: http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=20887
Second you span one big window over the three monitors and every frame you do this for each monitor: setViewport - setActiveCamera - drawAll.
For 2 monitors with a resolution of 1280x1024:
But getting the right user input for each viewport should be a bit more difficult (if you want to control the cameras)...
First you make one window for each monitor and render to each one seperately. Have a look at the last posts in this thread: http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=20887
Second you span one big window over the three monitors and every frame you do this for each monitor: setViewport - setActiveCamera - drawAll.
For 2 monitors with a resolution of 1280x1024:
Code: Select all
ICameraSceneNode* camera = smgr->addCameraSceneNode(0, vector3df(0,10,-7), vector3df(0,0,-2));
f32 aspect = 1280.0f / 1024.0f;
camera->setAspectRatio(aspect);
ICameraSceneNode* camera2 = smgr->addCameraSceneNodeFPS(0, 100, 20);
camera2->setPosition(vector3df(0,10,-7));
camera2->setTarget(vector3df(0,0,-2));
camera2->setAspectRatio(aspect);
while(device->run())
{
driver->beginScene(true, true, SColor(255,0,0,0));
driver->setViewPort(rect<s32>(1280,0,2560,1024));
smgr->setActiveCamera(camera);
smgr->drawAll();
driver->setViewPort(rect<s32>(0,0,1280,1024));
smgr->setActiveCamera(camera2);
smgr->drawAll();
driver->endScene();
}