How to do anti-alias when using rpict to render a picture?

I use rpict to calculate the contribution of Klems patches, similar to what is done in the three-phase method. When I compare the pictures rendered with rpict to those rendered with the three-phase method, I notice that the rpict renderings have some black pixels between adjacent Klems patches. I suspect this may be due to jagged edges in the rendering, resulting in gaps when combining contribution pictures from different Klems patches.
Below are rendering pictures:
Left: calculating the contribution with rpict
Right: Three-phase method (rcontrib)

Hi Yongqing,

I am not sure how you calculate the contributions (usually, this is done with a continuous sky hemisphere, and the patches just define the scaling factors), but in general anti-aliasing can be done by rendering with twice the pixel resolution and down-sampling with a moderate gaussian filter using pfilt: pfilt -x /2 -y /2 -r .7 hires.hdr > antialiased.hdr

Best, Lars.

Hi, Lars

I calculate the contributions by including only one klems patch (glow material with brightdata) in the radiance scene files, and then use rpict to calculte it. I use this method to replace with rcobtrib calculation.

so I want to understand why there are some jagged edges with rpict but no jagged edges with pure mont carlo raytracing method.

check your -ps and -pt parameters, as by default rpict does not sample every pixel, instead it assumes you will do some filtering procedure like Lars suggests. With -ps 1 and the same ambient settings (-aa 0) you should get a similar result to rtrace/rcontrib.

1 Like