RE : how to use pfilt to perform anti-aliasing

Dear Raphael,

Thanks for your prompt reply and advice!

Does this mean that I may need to bear in mind that the size of the image to
be produced by rpict should always be 3 times bigger than the size of the
final image I want?

Cheers, Ji

···

2011/6/14 Compagnon Raphaël <[email protected]>

Hi

To perform anti-aliasing you need to reduce your final image size
(typically by a factor 3).
Hence your pfilt comand should be:

pfilt -x /3 -y /3 -e 1 -r 0.55 ./direct_sunlight.hdr > test.hdr

Raphael
________________________________________
De : Ji Zhang [[email protected]]
Date d'envoi : mardi, 14. juin 2011 08:36
À : Radiance general discussion
Objet : [Radiance-general] how to use pfilt to perform anti-aliasing

Dear Radiance experts,

I use pfilt to treat a .hdr image generated by rpict command.

However, the the pfilt doesn't seem to have any impact in terms of
anti-aliasing of the image.

The pfilt command I used is:
pfilt -x 1024 -y 1024 -e 1 -r 0.55 ./direct_sunlight.hdr > test.hdr

the original .hdr image (saved as png file) is:

http://i1143.photobucket.com/albums/n633/oatcracker/Radiance/direct_sunlight.png

the output .hdr of the pfilt (saved as png file) is:

http://i1143.photobucket.com/albums/n633/oatcracker/Radiance/output_of_pfilt.png

Can you kindly tell me if I'm using pfilt correctly to perform
anti-aliasing?

Thanks!
Ji

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Dear Lars and Greg, Thanks a lot for the advices! - Cheers, Ji

···

On Tue, Jun 14, 2011 at 9:42 PM, Greg Ward <[email protected]> wrote:

The "rad" program (or "trad" if it works) takes care of these details for
you.

-Greg

> From: "Lars O. Grobe" <[email protected]>
> Date: June 14, 2011 6:37:26 AM CDT
>
> Hi!
>
>> Does this mean that I may need to bear in mind that the size of the
>> image to be produced by rpict should always be 3 times bigger than the
>> size of the final image I want?
>
> Yes. You can call it oversampling. See Mark's pages:
>
> http://markjstock.org/radmisc/aa0_ps1_test/final.html
>
> Cheers, Lars.

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Dear Radiance experts,

I didn't seem to be able to generate a .hdr image when run "rad ./test.rif"
command in terminal in both Ubuntu and Mac OS system, and I got the
following error message**:

    rpict -vtv -vp 2.47958064079 1.54759073257 1.60000002384 -vd
-5.09127616882 -1.54759073257 0.0 -vu 0.0 0.0 1.0 -vh 70.0 -vv 70.0 -vo 0.0
-va 0.0 -vs 0.0 -vl 0.0 -x 2400 -y 2400 -pa 800.000 -dp 4096 -ar 158 -ms
0.033 -ds .1 -dj .9 -dt .05 -dc .75 -dr 3 -sj 1 -st .01 -ab 1 -aa .075 -ad
4096 -as 2048 -av 1.7 1.7 1.7 -lr 12 -lw .0005 -ps 1 -pt .04 ./scene.oct >
rad_test_1.unf
    pfilt -1 -e .3 -m .25 -x /3 -y /3 rad_test_1.unf > rad_test_1.hdr
Segmentation fault
rad: error filtering view 1
    rad_test_1.hdr removed

The content of the test.rif file is:

···

############################
OCTREE= ./scene.oct
scene= ./geom.rad
ZONE= I -2.5 2.5 -3.5 3.5 -0.5 3.5
UP= Z
EXPOSURE= .3
QUAL= H
DET= H
PEN= T
VAR= H
view= -vtv -vp 2.47958064079 1.54759073257 1.60000002384 -vd -5.09127616882
-1.54759073257 0.0 -vu 0.0 0.0 1.0 -vh 70.0 -vv 70.0 -vo 0.0 -va 0.0 -vs 0.0
-vl 0.0
RESOLUTION= 800 800 800
PICT= rad_test
#############################

Can you kindly advice me the source of problem and the solution?

Thanks!

Ji

On Tue, Jun 14, 2011 at 9:53 PM, Ji Zhang <[email protected]> wrote:

Dear Lars and Greg, Thanks a lot for the advices! - Cheers, Ji

On Tue, Jun 14, 2011 at 9:42 PM, Greg Ward <[email protected]> wrote:

The "rad" program (or "trad" if it works) takes care of these details for
you.

-Greg

> From: "Lars O. Grobe" <[email protected]>
> Date: June 14, 2011 6:37:26 AM CDT
>
> Hi!
>
>> Does this mean that I may need to bear in mind that the size of the
>> image to be produced by rpict should always be 3 times bigger than the
>> size of the final image I want?
>
> Yes. You can call it oversampling. See Mark's pages:
>
> http://markjstock.org/radmisc/aa0_ps1_test/final.html
>
> Cheers, Lars.

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Thanks a lot, Lars! It is the problem of the third "800" value carelessly
specified for "RESOLUTION".

Cheers, Ji

···

On Wed, Jun 15, 2011 at 5:11 PM, Lars O. Grobe <[email protected]> wrote:

Hi!

The content of the test.rif file is:

(...)

RESOLUTION= 800 800 800

Why do you have three times 800 here? Looks like the third one gets
interpreted as pixel aspect (-pa), which leads to the weird result that
pfilt tries to downsample from a resolution of 2400x2400px to 800x1px.

Try

RESOLUTION= 800 800

Cheers, Lars.

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Dear Radiance experts,

Two more questions about rad:

One of the options of the rad program is explained in the rad menu as:

[ *-n|-N* *npr* ]

1. Does this mean the "-n" and "-N npr" options are mutually exclusive?

2. Does "-N 3" mean the task to generate an .hdr image will be split
into 3 parallel rendering processes by Radiance behind the scene
regardless of the number of CPUs and number of "cores" within each CPU
of the computer?

Thanks!

Ji

···

On Thu, Jun 16, 2011 at 1:36 AM, Ji Zhang <[email protected]> wrote:

Thanks a lot, Lars! It is the problem of the third "800" value carelessly
specified for "RESOLUTION".

Cheers, Ji

On Wed, Jun 15, 2011 at 5:11 PM, Lars O. Grobe <[email protected]> wrote:

Hi!

The content of the test.rif file is:

(...)

RESOLUTION= 800 800 800

Why do you have three times 800 here? Looks like the third one gets
interpreted as pixel aspect (-pa), which leads to the weird result that
pfilt tries to downsample from a resolution of 2400x2400px to 800x1px.

Try

RESOLUTION= 800 800

Cheers, Lars.

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general