[eq-dev] simple tile_equalizer application

5 views
Skip to first unread message

Carlos Duelo

unread,
Apr 2, 2013, 4:21:23 AM4/2/13
to Equalizer Developer List
Hi,

I would like to understand how works the decomposition tile_equalizer,
so I am trying to build a simple application using tile_equilizer in the
config file which should render a picture where each tile has a
different color. Something like a chess table but with many colours.

I am using the attached config file and my code for Channel::frameDraw(
const eq::uint128_t& frameID ) is:
{
EQ_GL_CALL( glEnable(GL_SCISSOR_TEST));
EQ_GL_CALL( eq::Channel::applyBuffer() );
EQ_GL_CALL( eq::Channel::applyViewport() );

eq::PixelViewport viewport = getPixelViewport();

// Choose the tile colour r g b

float * data = new float [3*viewport.h*viewport.w];
for(int i=0; i<3*viewport.w*viewport.h; i+=3)
{
data[i] = r;
data[i+1] = g;
data[i+2] = b;
}

EQ_GL_CALL( glDrawPixels(viewport.w, viewport.h, GL_RGB,
GL_FLOAT, data) );
delete[] data;
}

This code render just the first tile in the position (0,0) but not the
others.
I need any thing else to render my multi colour chess table.

I really appreciate any help you can provide.

Cheers

--
Carlos Duelo

tile_screen.pdf
config.eqc

Stefan Eilemann

unread,
Apr 2, 2013, 9:38:24 AM4/2/13
to eq-...@equalizergraphics.com

On 2. Apr 2013, at 10:22, Carlos Duelo [via Software] <ml-node+s171...@n2.nabble.com> wrote:

> I would like to understand how works the decomposition tile_equalizer,
> so I am trying to build a simple application using tile_equilizer in the
> config file which should render a picture where each tile has a
> different color. Something like a chess table but with many colours.

This works for me (use a debug build to get the channel tainting):

env EQ_TAINT_CHANNELS=1 ../../Build/Equalizer/bin/eqPly --eq-config examples/configs/4-window.all.eqc --eq-layout Tile

> This code render just the first tile in the position (0,0) but not the
> others.

All tiles on the source channel are rendered at (0,0), on top of each other. Each tile is read back correctly and assembled in the right place on the destination channel.

What is your exact problem?


HTH,

Stefan.






--
View this message in context: http://software.1713.n2.nabble.com/simple-tile-equalizer-application-tp7582847p7582848.html
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.

_______________________________________________
eq-dev mailing list
eq-...@equalizergraphics.com
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Carlos Duelo

unread,
Apr 2, 2013, 11:17:23 AM4/2/13
to Equalizer Developer List
On 02/04/13 15:38, Stefan Eilemann wrote:
> On 2. Apr 2013, at 10:22, Carlos Duelo [via Software] <ml-node+s171...@n2.nabble.com> wrote:
>
>> I would like to understand how works the decomposition tile_equalizer,
>> so I am trying to build a simple application using tile_equilizer in the
>> config file which should render a picture where each tile has a
>> different color. Something like a chess table but with many colours.
> This works for me (use a debug build to get the channel tainting):
>
> env EQ_TAINT_CHANNELS=1 ../../Build/Equalizer/bin/eqPly --eq-config examples/configs/4-window.all.eqc --eq-layout Tile
>
>> This code render just the first tile in the position (0,0) but not the
>> others.
> All tiles on the source channel are rendered at (0,0), on top of each other. Each tile is read back correctly and assembled in the right place on the destination channel.
>
> What is your exact problem?

I want a simple application which fill each tile with a different colour.

A simple example could be:

|ZXCVB |
|QWERT|
|ULOYM |

where each letter is a tile with a different colour.

My result is:

| |
| |
|U |

The unique tile that is render is the first.

My problem is that I do not know how to achive this "Each tile is read
back correctly and assembled in the right place on the destination
channel."
Do I need two channels, one to fill the tiles and another to use as
destination channel?

>
> HTH,
>
> Stefan.
>

Thanks Stefan

Stefan Eilemann

unread,
Apr 2, 2013, 10:23:46 AM4/2/13
to Equalizer Developer List

On 2. Apr 2013, at 17:17, Carlos Duelo <cdu...@cesvima.upm.es> wrote:

>> What is your exact problem?
>
> I want a simple application which fill each tile with a different colour.

The tile equalizer decomposes the rendering of a single view into evenly-sized tiles. While this may be abused for your needs, you could simply write a loop decomposing the PixelViewport in even tiles in Channel::frameDraw.

> My problem is that I do not know how to achive this "Each tile is read back correctly and assembled in the right place on the destination channel."

This is what Equalizer does. Did you run the example I mentioned?

> Do I need two channels, one to fill the tiles and another to use as destination channel?

One channel, used as source and dest does work. See the attached diff for what you have in mind.


HTH,

Stefan.

diff --git examples/configs/4-window.all.eqc examples/configs/4-window.all.eqc
index b578cd3..d16fd3c 100644
--- examples/configs/4-window.all.eqc
+++ examples/configs/4-window.all.eqc
@@ -78,7 +78,7 @@ server
name "2D"
view
{
- observer 0
+ observer 0
viewport [ 0 .5 .5 .5 ]
wall
{
@@ -708,12 +708,6 @@ server
tile_equalizer {}

compound {}
- compound { channel "channel2" outputframe {} }
- compound { channel "channel3" outputframe {} }
- compound { channel "channel4" outputframe {} }
- inputframe { name "frame.channel2" }
- inputframe { name "frame.channel3" }
- inputframe { name "frame.channel4" }
}

compound
@@ -721,7 +715,7 @@ server
channel ( segment 0 layout "DB_DirectSend" view 0 )
buffer [ COLOR DEPTH ]

-
+
compound
{
range [ 0.00 0.25 ]

Carlos Duelo

unread,
Apr 2, 2013, 1:27:27 PM4/2/13
to Equalizer Developer List
On 02/04/13 16:23, Stefan Eilemann wrote:
> On 2. Apr 2013, at 17:17, Carlos Duelo <cdu...@cesvima.upm.es> wrote:
>
>>> What is your exact problem?
>> I want a simple application which fill each tile with a different colour.
> The tile equalizer decomposes the rendering of a single view into evenly-sized tiles. While this may be abused for your needs, you could simply write a loop decomposing the PixelViewport in even tiles in Channel::frameDraw.
Yes, I thought that I could do it as you mention but in the future using
the tile_equalizer decomposition will give me many facilities, so I
would like use it.

Now, I have a application which render isosurfaces and I need to use
more than one node so, equalizer seems my solution. My application
return the pixels for a given tile and camera.
So, my idea is take the tile in Channel::frameDraw using getViewport and
use glDrawPixels to write the pixels that I have rendered for this tile.
Something like this:

viwport = getViewPort
tilePixels = renderTile(viewPort, Camera)
glDrawPixels(viewport.w, viewport.h, GL_RGB, GL_FLOAT, tilePixels)

For this reason, I started developing a simple application, to
understand how it works.

>
>> My problem is that I do not know how to achive this "Each tile is read back correctly and assembled in the right place on the destination channel."
> This is what Equalizer does. Did you run the example I mentioned?

Yes, I run the example and works with eqPly but not for me.

Stefan Eilemann

unread,
Apr 3, 2013, 2:15:59 AM4/3/13
to eq-...@equalizergraphics.com

On 2. Apr 2013, at 18:28, Carlos Duelo [via Software] <ml-node+s171...@n2.nabble.com> wrote:

> Yes, I thought that I could do it as you mention but in the future using
> the tile_equalizer decomposition will give me many facilities, so I
> would like use it.

Ok, then use the second approach from my last email (see below - the diff against 4-window.all.eqc)

> So, my idea is take the tile in Channel::frameDraw using getViewport and
> use glDrawPixels to write the pixels that I have rendered for this tile.

Yes, or:
- directly render into framebuffer given by Equalizer
- keep the pixels and pass them to a custom framwReadback
\
Cheers,

Stefan.
> > [hidden email]
> > http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
> > http://www.equalizergraphics.com
> >
>
>
> _______________________________________________
> eq-dev mailing list
> [hidden email]
> http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
> http://www.equalizergraphics.com
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://software.1713.n2.nabble.com/simple-tile-equalizer-application-tp7582847p7582851.html
> To start a new topic under Equalizer - Parallel Rendering, email ml-node+s1...@n2.nabble.com
> To unsubscribe from Equalizer - Parallel Rendering, click here.
> NAML

--
http://www.eyescale.ch
https://github.com/Eyescale/
http://www.linkedin.com/in/eilemann








--
View this message in context: http://software.1713.n2.nabble.com/simple-tile-equalizer-application-tp7582847p7582853.html
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.

Reply all
Reply to author
Forward
0 new messages