POV-Ray : Newsgroups : povray.general : How to assemble images after distributed rendering? Server Time
26 Nov 2024 05:43:03 EST (-0500)
  How to assemble images after distributed rendering? (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Marvin
Subject: How to assemble images after distributed rendering?
Date: 4 Jun 2011 17:05:00
Message: <web.4dea9d3ecd9227ba99f0841a0@news.povray.org>
Dear fellaz,

After distributed rendering with cluster, I need to reassemble image from
columns into complete image. All columns are dimensioned 400x300 (in example),
but one contains columns 0 to 99 active, second 100 to 199 ... and final 300 to
399.

$ povray +FN +W400 +H300 +SC00 +EC99 +Omodel-000000.png radiosity3a.pov
$ povray +FN +W400 +H300 +SC100 +EC199 +Omodel-000001.png radiosity3a.pov
$ povray +FN +W400 +H300 +SC200 +EC299 +Omodel-000002.png radiosity3a.pov
$ povray +FN +W400 +H300 +SC300 +EC399 +Omodel-000003.png radiosity3a.pov

I would like to reassemble images model-000000.png to model-0.000003.png (but
not limited to 4 columns) into a resulting image of entire rendered scene.

Many thanks in return. I did lots of research with ImageMagick commands, but at
no avail - it remained stubborn in doing everything but what I wanted.

Best rgds,
Marvin


Post a reply to this message

From: clipka
Subject: Re: How to assemble images after distributed rendering?
Date: 4 Jun 2011 17:16:01
Message: <4deaa091$1@news.povray.org>
Am 04.06.2011 23:01, schrieb Marvin:
> Dear fellaz,
>
> After distributed rendering with cluster, I need to reassemble image from
> columns into complete image. All columns are dimensioned 400x300 (in example),
> but one contains columns 0 to 99 active, second 100 to 199 ... and final 300 to
> 399.
>
> $ povray +FN +W400 +H300 +SC00 +EC99 +Omodel-000000.png radiosity3a.pov
> $ povray +FN +W400 +H300 +SC100 +EC199 +Omodel-000001.png radiosity3a.pov
> $ povray +FN +W400 +H300 +SC200 +EC299 +Omodel-000002.png radiosity3a.pov
> $ povray +FN +W400 +H300 +SC300 +EC399 +Omodel-000003.png radiosity3a.pov
>
> I would like to reassemble images model-000000.png to model-0.000003.png (but
> not limited to 4 columns) into a resulting image of entire rendered scene.
>
> Many thanks in return. I did lots of research with ImageMagick commands, but at
> no avail - it remained stubborn in doing everything but what I wanted.

How about an orthographic POV-Ray scene to stitch them all together?


Post a reply to this message

From: Le Forgeron
Subject: Re: How to assemble images after distributed rendering?
Date: 5 Jun 2011 02:01:00
Message: <4deb1b9c$1@news.povray.org>
Le 04/06/2011 23:01, Marvin nous fit lire :
> Dear fellaz,
> 
> After distributed rendering with cluster, I need to reassemble image from
> columns into complete image. All columns are dimensioned 400x300 (in example),
> but one contains columns 0 to 99 active, second 100 to 199 ... and final 300 to
> 399.
> 
> $ povray +FN +W400 +H300 +SC00 +EC99 +Omodel-000000.png radiosity3a.pov
> $ povray +FN +W400 +H300 +SC100 +EC199 +Omodel-000001.png radiosity3a.pov
> $ povray +FN +W400 +H300 +SC200 +EC299 +Omodel-000002.png radiosity3a.pov
> $ povray +FN +W400 +H300 +SC300 +EC399 +Omodel-000003.png radiosity3a.pov
> 
> I would like to reassemble images model-000000.png to model-0.000003.png (but
> not limited to 4 columns) into a resulting image of entire rendered scene.
> 
> Many thanks in return. I did lots of research with ImageMagick commands, but at
> no avail - it remained stubborn in doing everything but what I wanted.
> 

A hint:

convert model-000000.png -transparent black neo-000000.png
convert model-000001.png -transparent black neo-000001.png
convert model-000002.png -transparent black neo-000002.png
convert model-000003.png -transparent black neo-000003.png

 convert neo-000000.png neo-000001.png neo-000002.png neo-000003.png
-background black -flatten neo.png


Post a reply to this message

From: Marvin
Subject: Re: How to assemble images after distributed rendering?
Date: 7 Jun 2011 05:15:01
Message: <web.4dedeb5ff8ea20b673cc178a0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> Le 04/06/2011 23:01, Marvin nous fit lire :
> > Dear fellaz,
> >
> > After distributed rendering with cluster, I need to reassemble image from
> > columns into complete image. All columns are dimensioned 400x300 (in example),
> > but one contains columns 0 to 99 active, second 100 to 199 ... and final 300 to
> > 399.
> >
> > $ povray +FN +W400 +H300 +SC00 +EC99 +Omodel-000000.png radiosity3a.pov
> > $ povray +FN +W400 +H300 +SC100 +EC199 +Omodel-000001.png radiosity3a.pov
> > $ povray +FN +W400 +H300 +SC200 +EC299 +Omodel-000002.png radiosity3a.pov
> > $ povray +FN +W400 +H300 +SC300 +EC399 +Omodel-000003.png radiosity3a.pov
> >
> > I would like to reassemble images model-000000.png to model-0.000003.png (but
> > not limited to 4 columns) into a resulting image of entire rendered scene.
> >
> > Many thanks in return. I did lots of research with ImageMagick commands, but at
> > no avail - it remained stubborn in doing everything but what I wanted.
> >
>
> A hint:
>
> convert model-000000.png -transparent black neo-000000.png
> convert model-000001.png -transparent black neo-000001.png
> convert model-000002.png -transparent black neo-000002.png
> convert model-000003.png -transparent black neo-000003.png
>
>  convert neo-000000.png neo-000001.png neo-000002.png neo-000003.png
> -background black -flatten neo.png

neo-00000[0123].png work as expected, but flatten creates havoc. :-(

http://magrf.grf.hr/~mtodorov/model/neo-000000.png
http://magrf.grf.hr/~mtodorov/model/neo-000001.png
http://magrf.grf.hr/~mtodorov/model/neo-000002.png
http://magrf.grf.hr/~mtodorov/model/neo-000003.png
http://magrf.grf.hr/~mtodorov/model/neo.png

Any idea?

Did I miscompile ImageMagick? But with optipng I also receive diagnostics.

Marvin


Post a reply to this message

From: Le Forgeron
Subject: Re: How to assemble images after distributed rendering?
Date: 7 Jun 2011 05:35:54
Message: <4dedf0fa$1@news.povray.org>
Le 07/06/2011 11:11, Marvin a écrit :
> Le_Forgeron <jgr### [at] freefr> wrote:
>> Le 04/06/2011 23:01, Marvin nous fit lire :
>>> Dear fellaz,
>>>
>>> After distributed rendering with cluster, I need to reassemble image from
>>> columns into complete image. All columns are dimensioned 400x300 (in example),
>>> but one contains columns 0 to 99 active, second 100 to 199 ... and final 300 to
>>> 399.
>>>
>>> $ povray +FN +W400 +H300 +SC00 +EC99 +Omodel-000000.png radiosity3a.pov
>>> $ povray +FN +W400 +H300 +SC100 +EC199 +Omodel-000001.png radiosity3a.pov
>>> $ povray +FN +W400 +H300 +SC200 +EC299 +Omodel-000002.png radiosity3a.pov
>>> $ povray +FN +W400 +H300 +SC300 +EC399 +Omodel-000003.png radiosity3a.pov
>>>
>>> I would like to reassemble images model-000000.png to model-0.000003.png (but
>>> not limited to 4 columns) into a resulting image of entire rendered scene.
>>>
>>> Many thanks in return. I did lots of research with ImageMagick commands, but at
>>> no avail - it remained stubborn in doing everything but what I wanted.
>>>
>>
>> A hint:
>>
>> convert model-000000.png -transparent black neo-000000.png
>> convert model-000001.png -transparent black neo-000001.png
>> convert model-000002.png -transparent black neo-000002.png
>> convert model-000003.png -transparent black neo-000003.png
>>
>>  convert neo-000000.png neo-000001.png neo-000002.png neo-000003.png
>> -background black -flatten neo.png
> 
> neo-00000[0123].png work as expected, but flatten creates havoc. :-(
> 
> http://magrf.grf.hr/~mtodorov/model/neo-000000.png
> http://magrf.grf.hr/~mtodorov/model/neo-000001.png
> http://magrf.grf.hr/~mtodorov/model/neo-000002.png
> http://magrf.grf.hr/~mtodorov/model/neo-000003.png
> http://magrf.grf.hr/~mtodorov/model/neo.png
> 
> Any idea?

you need to add -page +0+0 after each source image

convert neo-000000.png -page +0+0 neo-000001.png -page +0+0
neo-000002.png -page +0+0 neo-000003.png -page +0+0 -background black
-flatten real.png

You seems to have rendered with 3.6 or previous.
My initial reply was assuming (and I tested it) a 3.7RC3.

$ Identify neo-*.png
neo-000000.png PNG 400x300 400x300+0+0 8-bit DirectClass 18.3KiB 0.000u
0:00.009
neo-000001.png[1] PNG 400x300 400x300+99+0 8-bit DirectClass 30.2KiB
0.000u 0:00.000
neo-000002.png[2] PNG 400x300 400x300+199+0 8-bit DirectClass 30.2KiB
0.000u 0:00.009
neo-000003.png[3] PNG 400x300 400x300+299+0 8-bit DirectClass 24.6KiB
0.000u 0:00.000


There is a bright line of white pixel on each left side of partial image.

-- 
Software is like dirt - it costs time and money to change it and move it
around.<br/><br/>


Just because you can't see it, it doesn't weigh anything,
and you can't drill a hole in it and stick a rivet into it doesn't mean
it's free.


Post a reply to this message

From: Marvin
Subject: Re: How to assemble images after distributed rendering?
Date: 7 Jun 2011 07:15:00
Message: <web.4dee0805f8ea20b673cc178a0@news.povray.org>
Le_Forgeron <lef### [at] freefr> wrote:
> Le 07/06/2011 11:11, Marvin a écrit :
> > Le_Forgeron <jgr### [at] freefr> wrote:
> >> Le 04/06/2011 23:01, Marvin nous fit lire :
> >>> Dear fellaz,
> >>>
> >>> After distributed rendering with cluster, I need to reassemble image from
> >>> columns into complete image. All columns are dimensioned 400x300 (in example),
> >>> but one contains columns 0 to 99 active, second 100 to 199 ... and final 300 to
> >>> 399.
> >>>
> >>> $ povray +FN +W400 +H300 +SC00 +EC99 +Omodel-000000.png radiosity3a.pov
> >>> $ povray +FN +W400 +H300 +SC100 +EC199 +Omodel-000001.png radiosity3a.pov
> >>> $ povray +FN +W400 +H300 +SC200 +EC299 +Omodel-000002.png radiosity3a.pov
> >>> $ povray +FN +W400 +H300 +SC300 +EC399 +Omodel-000003.png radiosity3a.pov
> >>>
> >>> I would like to reassemble images model-000000.png to model-0.000003.png (but
> >>> not limited to 4 columns) into a resulting image of entire rendered scene.
> >>>
> >>> Many thanks in return. I did lots of research with ImageMagick commands, but at
> >>> no avail - it remained stubborn in doing everything but what I wanted.
> >>>
> >>
> >> A hint:
> >>
> >> convert model-000000.png -transparent black neo-000000.png
> >> convert model-000001.png -transparent black neo-000001.png
> >> convert model-000002.png -transparent black neo-000002.png
> >> convert model-000003.png -transparent black neo-000003.png
> >>
> >>  convert neo-000000.png neo-000001.png neo-000002.png neo-000003.png
> >> -background black -flatten neo.png
> >
> > neo-00000[0123].png work as expected, but flatten creates havoc. :-(
> >
> > http://magrf.grf.hr/~mtodorov/model/neo-000000.png
> > http://magrf.grf.hr/~mtodorov/model/neo-000001.png
> > http://magrf.grf.hr/~mtodorov/model/neo-000002.png
> > http://magrf.grf.hr/~mtodorov/model/neo-000003.png
> > http://magrf.grf.hr/~mtodorov/model/neo.png
> >
> > Any idea?
>
> you need to add -page +0+0 after each source image
>
> convert neo-000000.png -page +0+0 neo-000001.png -page +0+0
> neo-000002.png -page +0+0 neo-000003.png -page +0+0 -background black
> -flatten real.png
>
> You seems to have rendered with 3.6 or previous.
> My initial reply was assuming (and I tested it) a 3.7RC3.
>
> $ Identify neo-*.png
> neo-000000.png PNG 400x300 400x300+0+0 8-bit DirectClass 18.3KiB 0.000u
> 0:00.009
> neo-000001.png[1] PNG 400x300 400x300+99+0 8-bit DirectClass 30.2KiB
> 0.000u 0:00.000
> neo-000002.png[2] PNG 400x300 400x300+199+0 8-bit DirectClass 30.2KiB
> 0.000u 0:00.009
> neo-000003.png[3] PNG 400x300 400x300+299+0 8-bit DirectClass 24.6KiB
> 0.000u 0:00.000
>
>
> There is a bright line of white pixel on each left side of partial image.>

How shoud that bright line of white pixel hinder flattening? I don't have enough
experience with ImageMagick. I see your point, but I don't realize where this
bright line came from in the first place. The partial images came directly from
radiosity3a.pov rendered scene, I made no intervention as to insert a white
line.

Is there a way to cut images and later reassemble stripes pf columns with
convert or composite -adjoin?

Rgds,
Marvin


Post a reply to this message

From: Le Forgeron
Subject: Re: How to assemble images after distributed rendering?
Date: 7 Jun 2011 07:46:22
Message: <4dee0f8e$1@news.povray.org>
Le 07/06/2011 13:14, Marvin a écrit :
>> >
>> > There is a bright line of white pixel on each left side of partial image.>
> How shoud that bright line of white pixel hinder flattening? I don't have enough
> experience with ImageMagick. I see your point, but I don't realize where this
> bright line came from in the first place. The partial images came directly from
> radiosity3a.pov rendered scene, I made no intervention as to insert a white
> line.

I trust you.
Can you confirm the version of povray (3.6) ?
(or maybe it's a radiosity issue ?)

I tested the initial solution with a scene in 3.7, without radiosity and
got no white line on left side. I'm going to render radiosity3a.pov per
slice to check

> 
> Is there a way to cut images and later reassemble stripes pf columns with
> convert or composite -adjoin?
> 

I do not know. I knew about -flatten.
Maybe you can try to perform the whole think in one line such as:

convert model-000000.png -transparent black -page +0+0 \
 model-000001.png -transparent black -page +0+0 \
 model-000002.png -transparent black -page +0+0 \
 model-000003.png -transparent black -page +0+0 \
...
 model-000158.png -transparent black -page +0+0 \
-background black -flatten model.png

If you want to cut image from picture, you might want to play with -size
and -page to set the framesize and move the original inside the final frame.


-- 
Software is like dirt - it costs time and money to change it and move it
around.

Just because you can't see it, it doesn't weigh anything,
and you can't drill a hole in it and stick a rivet into it doesn't mean
it's free.


Post a reply to this message

From: Le Forgeron
Subject: Re: How to assemble images after distributed rendering?
Date: 7 Jun 2011 08:03:53
Message: <4dee13a9@news.povray.org>
Le 07/06/2011 13:46, Le_Forgeron a écrit :
> Can you confirm the version of povray (3.6) ?
> (or maybe it's a radiosity issue ?)
> 
> I tested the initial solution with a scene in 3.7, without radiosity and
> got no white line on left side. I'm going to render radiosity3a.pov per
> slice to check
> 
Yep! radiosity3.pov in 3.6 get an artefact of a white line on the left
for partial column rendering.

On 3.7, it get a blocky artefact on the right (bigger), but it is
better, as long as you provide the slices from left to right in the
command line of convert, each new picture covers the previous blocky
column. No problem in 3.7 if used with care.

A real issue for 3.6.2 (tested on windows)
I did not try to provide the picture in right to left to see if they
would cover each other.

Notice: radiosity seems to not like too much partial rendering.
(or may it's just me)

-- 
Software is like dirt - it costs time and money to change it and move it
around.

Just because you can't see it, it doesn't weigh anything,
and you can't drill a hole in it and stick a rivet into it doesn't mean
it's free.


Post a reply to this message

From: Le Forgeron
Subject: Re: How to assemble images after distributed rendering?
Date: 7 Jun 2011 08:13:11
Message: <4dee15d7$1@news.povray.org>
Le 04/06/2011 23:01, Marvin a écrit :
> $ povray +FN +W400 +H300 +SC00 +EC99 +Omodel-000000.png radiosity3a.pov
> $ povray +FN +W400 +H300 +SC100 +EC199 +Omodel-000001.png radiosity3a.pov
> $ povray +FN +W400 +H300 +SC200 +EC299 +Omodel-000002.png radiosity3a.pov
> $ povray +FN +W400 +H300 +SC300 +EC399 +Omodel-000003.png radiosity3a.pov
> 

Beware of the bound of +SC/+EC too... column starts at 1

>
http://wiki.povray.org/content/Documentation:Reference_Section_1#Partial_Output_Options

So, it should be
 +SC001 +EC100
 +SC101 +EC200
 +SC201 +EC300
 +SC301 +EC400

For slices from 3.6, the order in convert should be from right to left
to avoid the white line. And do not forget the "-page +0+0" for each of
them.



-- 
Software is like dirt - it costs time and money to change it and move it
around.

Just because you can't see it, it doesn't weigh anything,
and you can't drill a hole in it and stick a rivet into it doesn't mean
it's free.


Post a reply to this message

From: Darren New
Subject: Re: How to assemble images after distributed rendering?
Date: 7 Jun 2011 09:15:48
Message: <4dee2484$1@news.povray.org>
On 6/7/2011 5:13, Le_Forgeron wrote:
> Le 04/06/2011 23:01, Marvin a écrit :
>> $ povray +FN +W400 +H300 +SC00 +EC99 +Omodel-000000.png radiosity3a.po
v
>> $ povray +FN +W400 +H300 +SC100 +EC199 +Omodel-000001.png radiosity3a.
pov
>> $ povray +FN +W400 +H300 +SC200 +EC299 +Omodel-000002.png radiosity3a.
pov
>> $ povray +FN +W400 +H300 +SC300 +EC399 +Omodel-000003.png radiosity3a.
pov
>>
>
> Beware of the bound of +SC/+EC too... column starts at 1
>
>> http://wiki.povray.org/content/Documentation:Reference_Section_1#Parti
al_Output_Options
>
> So, it should be
>   +SC001 +EC100
>   +SC101 +EC200
>   +SC201 +EC300
>   +SC301 +EC400
>
> For slices from 3.6, the order in convert should be from right to left
> to avoid the white line. And do not forget the "-page +0+0" for each of

> them.

Alternately, you can just clip out the geometry, then montage them togeth
er.

convert model-000000.png -extent 100x300+0+0 -geometry 100x300+0+0 trim-0
.png

convert model-000001.png -extent 100x300+100+0 -geometry 100x300+0+0 trim
-1.png

convert model-000002.png -extent 100x300+200+0 -geometry 100x300+0+0 trim
-2.png

convert model-000003.png -extent 100x300+300+0 -geometry 100x300+0+0 trim
-3.png


montage +frame +shadow +label -tile 4x1 -geometry 100x300+0+0 trim-0.png 

trim-1.png trim-2.png trim-3.png output.png

-- 
Darren New, San Diego CA, USA (PST)
   "Coding without comments is like
    driving without turn signals."


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.