Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ringing pattern generated by path tracing #29

Closed
HoverDong opened this issue Apr 22, 2014 · 3 comments
Closed

ringing pattern generated by path tracing #29

HoverDong opened this issue Apr 22, 2014 · 3 comments

Comments

@HoverDong
Copy link

hi guys,

When I use path tracing to generate a very simple scene image, I got some ringing patterns. The scene is just a Cornell box with back, floor and left wall and a point light source. The material of all the walls are diffuse material. I used 200k samples/pixel to generate the scene. I set the maxDepth=0, which means the generated image only shows the direct light. When I use less samples number, the ringing pattern becomes less obvious. The attached image showed the R channel of the generated image. Any ideas?
point_gt_d

@mmp
Copy link
Owner

mmp commented Apr 23, 2014

My guess would be that you're running out of floating point precision--a
32-bit float may not have quite enough precision to accumulate the sum of
200k samples per pixel.

One way to test this would be to:

  1. Modify the Pixel struct in film/image.h to use 'double' instead of
    'float' for all members.
  2. Remove the AtomicAdd() stuff in film/image.cc and just update the Pixel
    fields directly in AddSample() and Splat().
  3. Render the scene using one thread (to be safe), with --ncores 1 on the
    command-line. (Or don't worry about this--it's probably fine.)

And see if you still see these errors. If not, it's floating-point
precision. If you do, then it's something else. (And we can work on it
from there...)

Thanks,
Matt

On Tue, Apr 22, 2014 at 1:58 PM, HoverDong notifications@github.com wrote:

hi guys,

When I use path tracing to generate a very simple scene image, I got some
ringing patterns. The scene is just a Cornell box with back, floor and left
wall and a point light source. The material of all the walls are diffuse
material. I used 200k samples/pixel to generate the scene. I set the
maxDepth=0, which means the generated image only shows the direct light.
When I use less samples number, the ringing pattern becomes less obvious.
The attached image showed the R channel of the generated image. Any ideas?
[image: point_gt_d]https://cloud.githubusercontent.com/assets/7377509/2770612/b31da966-ca60-11e3-93d0-6b6d0abc007a.jpg


Reply to this email directly or view it on GitHubhttps://github.com//issues/29
.

@HoverDong
Copy link
Author

hey Matt, Thanks for the quick reply. I really appreciate it!!! I changed the code as you suggested and tried with 200k sample numbers again. The ringing pattern has gone:) So, it is the precision problem as you said.

Hover

Date: Tue, 22 Apr 2014 19:32:02 -0700
From: notifications@github.com
To: pbrt-v2@noreply.github.com
CC: dongbo12@hotmail.com
Subject: Re: [pbrt-v2] ringing pattern generated by path tracing (#29)

My guess would be that you're running out of floating point precision--a

32-bit float may not have quite enough precision to accumulate the sum of

200k samples per pixel.

One way to test this would be to:

  1. Modify the Pixel struct in film/image.h to use 'double' instead of

'float' for all members.

  1. Remove the AtomicAdd() stuff in film/image.cc and just update the Pixel

fields directly in AddSample() and Splat().

  1. Render the scene using one thread (to be safe), with --ncores 1 on the

command-line. (Or don't worry about this--it's probably fine.)

And see if you still see these errors. If not, it's floating-point

precision. If you do, then it's something else. (And we can work on it

from there...)

Thanks,

Matt

On Tue, Apr 22, 2014 at 1:58 PM, HoverDong notifications@github.com wrote:

hi guys,

When I use path tracing to generate a very simple scene image, I got some

ringing patterns. The scene is just a Cornell box with back, floor and left

wall and a point light source. The material of all the walls are diffuse

material. I used 200k samples/pixel to generate the scene. I set the

maxDepth=0, which means the generated image only shows the direct light.

When I use less samples number, the ringing pattern becomes less obvious.

The attached image showed the R channel of the generated image. Any ideas?

[image: point_gt_d]https://cloud.githubusercontent.com/assets/7377509/2770612/b31da966-ca60-11e3-93d0-6b6d0abc007a.jpg

Reply to this email directly or view it on GitHubhttps://github.com//issues/29

.


Reply to this email directly or view it on GitHub.

@mmp
Copy link
Owner

mmp commented May 16, 2016

Closing this out. (And note that pbrt-v3 offers the ability to select double-precision for all floating-point computations at compile time.)

@mmp mmp closed this as completed May 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants