Hi,
try to use the following calibration file. You should see some
distortions and the colors red and blue should be swapped.
Change m1 with your cluster server name.
<?xml version="1.0"?>
<displaycalibration>
<server name="m1">
<colormatrix>
0 1 0 0
1 0 0 0
0 0 1 0
0 0 0 1
</colormatrix>
<gamma>
1
</gamma>
<gammaramp>
<color> 0 0 0</color>
<color> 1 1 1</color>
</gammaramp>
<grid>
<row><point>0 0</point><point>200 0</point><point>399 0</point></row>
<row><point>0 150</point><point>200 150</point><point>399 150</point></row>
<row><point>0 299</point><point>200 299</point><point>399 299</point></row>
</grid>
</server>
</displaycalibration>
Marcus
Enrico Borrione wrote:
Hi marcus,
i tryied to make some experiment with the display calibration,
as you suggested, but i can't get on top of it.
Using the source files and some examples i've found,
i tried to run a simple cluster, with one client and
two servers. To set up the calibration i use this xml file:
<?xml version="1.0"?>
<displaycalibration>
<server name="test1">
<gamma> 0.5f </gamma>
</server>
<server name="test2">
</server>
</displaycalibration>
as you can see i try just to alter the gamma correction
of one of the servers, while the other remains unchanged.
I load this via:
std::filebuf fb;
fb.open ("test_due.xml",std::ios::in);
std::istream os(&fb);
mwin->loadCalibration(os);
//DisplayCalibrationPtr calibPtr = DisplayCalibration::create();
//
mwin->getCalibration()[0]->calibrate(mwin,(RenderAction*)mgr->getAction());
std::cout << "GAMMA1 " << mwin->getCalibration()[0]->getGamma() <<
std::endl;
fb.close();
and for what i can see the xml is correctly parsed. (the Gamma corresponds).
The problem is that the corrisponding server window remains all black,
no matter what parameter i pass in it. Why? What's wrong?
I tried also a more direct approach with:
mwin->getCalibration()[0]->calibrate(mwin,(RenderAction*)mgr->getAction());
but it just segmentation faults (i admit i haven't experimented much
this second way).
Any suggestion? thanks Enrico
Il ven, 2005-05-13 alle 14:49, Marcus Roth ha scritto:
Hi,
it ist possible to render the contents of a cluster server into a
texture and the do color correction and
geometrical correction to this texture. This is done by the
DisplayCalibration class.
A clusterwindow has a multi field clusterCalibration. This field
can hold references to a DisplayCalibration object. A display
calibration can hold a grid that
can be used to do distortion.
Marcus
Enrico Borrione wrote:
Hi Dirk,
i am still struggling after the second viewpor problem.
As you may remember my final goal is to make it run on
my cluster, to simulate the geometric distortion of a
cilindrical screen and the ovaerlapping between the projections.
In order to achieve this objective, i was thinking about
adding the second viewport trick to my cluster servers,
so half of the application works as a slave of the client
(rendering its part of the scene), and half of the app
uses the obtained buffer to texture the target mesh and
obtaining my desired effect.
I did a little experiment of mixing two programs (the
render to texture and cluster server) but i can't get
but a crash after another. In a few words I create
a second viewport, add a TextureGrabBackground and
add all this to the main window of the server:
winid = glutCreateWindow(name);
window = GLUTWindow::create();
window->setId(winid);
window->init();
.
.
.
server = new ClusterServer(window,name,connectionType,"");
// start the server
server->start();
.
.
.
ViewportPtr vp2 = Viewport::create();
beginEditCP(vp2);
vp2->setCamera(cam);
vp2->setRoot(tr);
vp2->setBackground(tg);
vp2->setLeft(0);
vp2->setRight(1);
vp2->setBottom(0);
vp2->setTop(1);
endEditCP(vp2);
beginEditCP(window);
window->addPort(vp2);
endEditCP(window);
I noticed that the program crashes as soon as i add the second
viewport to the window.
Probably i am misunderstanding something crucial in the
rendering pipeline of OSG :)
Does anyone has some clue to offer?
Many thanks,
enrico
Il lun, 2005-05-09 alle 21:59, Dirk Reiners ha scritto:
Hi Enrico,
On Fri, 2005-05-06 at 10:54 +0200, Enrico Borrione wrote:
Hi dirk,
after playing with the example you pointed me for a bit,
i understood the basic principles...
Now I am trying to change the textured quad in the
second viewport with a simple geometry (as you suggested).
So... I modelled a half tube with blender,
exported it in wrml along with the texture coordinates
and tried to use it as the *screen* of the application.
Surprise surprise, it isn't working, i just see the
solid background. My best guess is that the matrixcameraptr
is pointing in the wrong direction, so i pointlessy looked for a
way to move the camera.
I used to query the simple scene manager for the navigator
and then update the projection matrix all by myself, but
in this case i think the navigator is linked to the first vieport...
Yup.
So: how can i update the camera position of the second vp?
and the target of the look at? :)
The easiest would probably be to create your own Camera and use that in
the second viewport, which should work just fine.
Dirk
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users