HI, guys.
I'm trying to setup Multi-Projector with Equalizer, and I have to do
DIFFERENT image-processing for the image in each window. I go through the
tutorials but still get no idea.
Anyone get some ideas?
Thanks.
On 2. Jun 2012, at 11:47, maxtangli [via Software] wrote:
> I'm trying to setup Multi-Projector with Equalizer, and I have to do DIFFERENT image-processing for the image in each window. I go through the tutorials but still get no idea.
I infer from the context that you are trying to do something like per-projector distortion correction!? If not, please give a bit of background on what you're trying to do.
Ideally this should be integrated into Equalizer, where a per-segment setting references the appropriate distortion map. As a workaround, you can do this in Channel::frameViewFinish using a special channel name. If you use multi-view layouts, we need to implement issue #125 first.
> On 2. Jun 2012, at 11:47, maxtangli [via Software] wrote:
> Ideally this should be integrated into Equalizer, where a per-segment
> setting references the appropriate distortion map. As a workaround, you
> can do this in Channel::frameViewFinish using a special channel name. If
> you use multi-view layouts, we need to implement issue #125 first.
Hi,stefan.
Thanks for your advice. I'm setting up tiled muti-projectors on unplannar
surface, therefore geometry correction and other per-frame image operations
is required. For each projector/segment the operations is different.
I think it should be like this:
frameViewFinish(frameID, frameNumber)
{
if (channel.getName() == "channel1")
find Frame with frameID in channel.getOutputFrames() ?
do image operations to the image belongs to this Frame ?
else
...
}
I have two questions:
1. I want to get the frames belongs to a segment/projector. Will
channel.getOutputFrames() do this right?
2. how can I get the image data belongs to a Frame ? I find
Frame.getFrameData() holds serveral images, I can't tell which image belongs
to the current Frame.
On 7. Jun 2012, at 6:21, maxtangli [via Software] wrote:
> I'm setting up tiled muti-projectors on unplannar surface, therefore geometry correction and other per-frame image operations is required. For each projector/segment the operations is different.
> I think it should be like this:
> frameViewFinish(frameID, frameNumber) > { > if (channel.getName() == "channel1") > find Frame with frameID in channel.getOutputFrames() ? > do image operations to the image belongs to this Frame ? > else > ... > }
> I have two questions: > 1. I want to get the frames belongs to a segment/projector. Will channel.getOutputFrames() do this right?
You should not operate on the compositing frames, but on the back buffer of the channel. One, you might not have compositing (the channel renders itself). Two, in frameView/SegmentFinish the image already has been assembled.
What other typically to is to blit the back buffer into a texture, clear the back buffer and render the texture with distortion correction to it.
> On 7. Jun 2012, at 6:21, maxtangli [via Software] wrote:
> You should not operate on the compositing frames, but on the back buffer
> of the channel.
> What other typically to is to blit the back buffer into a texture, clear
> the back buffer and render the texture with distortion correction to it.
Thanks very much. I find it convient to modify channel::frameViewFinish in
seq.
My question is: to operate the back buffer in channel::frameViewFinish, will
the opengl functions such as glReadBuffer,glWriteBuffer be OK ? or should I
use equalizer-provided functions to get the back buffer?
On 8. Jun 2012, at 6:51, maxtangli [via Software] wrote:
> My question is: to operate the back buffer in channel::frameViewFinish, will the opengl functions such as glReadBuffer,glWriteBuffer be OK ? or should I use equalizer-provided functions to get the back buffer?
You've got full access to the OpenGL context from all the Channel::frameFoo functions, so it's ok to use glReadBuffer & friends. You only need to take into account the pixel viewport (and a few others in Draw).
> On 8. Jun 2012, at 6:51, maxtangli [via Software] wrote:
> You've got full access to the OpenGL context from all the
> Channel::frameFoo functions, so it's ok to use glReadBuffer & friends. You
> only need to take into account the pixel viewport (and a few others in
> Draw).
Hi, stefan.
Thanks for your advice.
But what do you mean by " take into account the pixel viewport"?
I tried glReadPixels&glDrawPixels in Channel::frameViewFinish, but the
results seems strange.
On 21. Jun 2012, at 4:50, maxtangli [via Software] wrote:
> Stefan Eilemann wrote
> On 8. Jun 2012, at 6:51, maxtangli [via Software] wrote:
>> You've got full access to the OpenGL context from all the Channel::frameFoo functions, so it's ok to use glReadBuffer & friends. You only need to take into account the pixel viewport (and a few others in Draw
> But what do you mean by " take into account the pixel viewport"? > I tried glReadPixels&glDrawPixels in Channel::frameViewFinish, but the results seems strange.
I mean using Channel::getPixelViewport for you read pixels.
>> Stefan Eilemann wrote
>> On 8. Jun 2012, at 6:51, maxtangli [via Software] wrote:
> I mean using Channel::getPixelViewport for you read pixels.
I'm sorry, but I don't understand the concept of pixel viewport. I go
through the website but I can't find any documents about it.
the code should be like this:
const eq::fabric::PixelViewport& pv = getPixelViewport();
// QUESTION: what should I do?
glReadPixels(0,0,readDrawWidth,readdrawHeight,GL_RGB,GL_UNSIGNED_BYTE,pixel s);
...
glDrawPixels(...);
I'm sorry for bother you so much, but I don't understand equalizer's
internal principle very well.
Would you please give me some suggestions on how to learn equalizer?
On 22. Jun 2012, at 4:53, maxtangli [via Software] wrote:
> I'm sorry, but I don't understand the concept of pixel viewport. I go through the website but I can't find any documents about it.
It's the 2D area of the window used by the channel, in pixels.
> the code should be like this: > const eq::fabric::PixelViewport& pv = getPixelViewport(); > // QUESTION: what should I do? > glReadPixels(0,0,readDrawWidth,readdrawHeight,GL_RGB,GL_UNSIGNED_BYTE,pixel s); > ... > glDrawPixels(...);
Using pv.w and pv.h would be a good start. Understanding glReadPixels and associated state (e.g. glRasterPos, glPixelStore) is essential. The Channel::frameReadback code does the same thing, though this is unnecessarily complex for your use case.
> I'm sorry for bother you so much, but I don't understand equalizer's internal principle very well. > Would you please give me some suggestions on how to learn equalizer?
I suggest reading the Programming Guide and general OpenGL documentation.