Light tracing image conversion back
Board:
Home
Board index
Raytracing
General Development
(L) [2014/05/10] [tby Benjamin-L] [Light tracing image conversion] Wayback!I am attempting to implement bidirectional path tracing in my renderer but I have run into a problem handling the light image. I am able to compute the screen space location of light samples but I still have no way to normalize these samples into a correct image. I have two main problems here. The first is that I am not quite sure how to set it up so that the areas with less samples contribute less light without making the whole image have a different exposure from the path tracing reference. The problem is that when I specifically divide by a constant then the image changes brightness when I change the number of samples but I can't seem to find the right expression that is dependent on the image size and number of samples (I think the size issue might be related to the next problem). The second problem I am having is that I cannot seem to find the right expression for converting the flux into luminance depending on the distance from the camera. The farther that the sample is from the camera the more it should contribute less because the samples are more dense farther away from the camera. I am currently getting images that look like this:
[IMG #1 cornell_lightspace.png]
while a photon mapping reference looks like this (path tracing does not work for the caustics):
[IMG #2 cornell_photon.png]
[IMG #1]:Not scraped:
/web/20161005163033im_/http://ompf2.com/download/file.php?id=162&sid=7252a849f3ade58fae01ff17a5c4728b
[IMG #2]:Not scraped:
/web/20161005163033im_/http://ompf2.com/download/file.php?id=161&sid=7252a849f3ade58fae01ff17a5c4728b
(L) [2014/05/10] [ost
by Benjamin-L] [Light tracing image conversion] Wayback!I am attempting to implement bidirectional path tracing in my renderer but I have run into a problem handling the light image. I am able to compute the screen space location of light samples but I still have no way to normalize these samples into a correct image. I have two main problems here. The first is that I am not quite sure how to set it up so that the areas with less samples contribute less light without making the whole image have a different exposure from the path tracing reference. The problem is that when I specifically divide by a constant then the image changes brightness when I change the number of samples but I can't seem to find the right expression that is dependent on the image size and number of samples (I think the size issue might be related to the next problem). The second problem I am having is that I cannot seem to find the right expression for converting the flux into luminance depending on the distance from the camera. The farther that the sample is from the camera the more it should contribute less because the samples are more dense farther away from the camera. I am currently getting images that look like this:
cornell_lightspace.png
while a photon mapping reference looks like this (path tracing does not work for the caustics):
cornell_photon.png
(L) [2014/05/12] [tby beason] [Light tracing image conversion] Wayback!I don't see any images
(L) [2014/05/12] [tby Benjamin-L] [Light tracing image conversion] Wayback!I fixed the images now. The problem was that I was using Google Drive to host them but forgot to make the images public so I saw them because I was logged in but nobody else was able to.
(L) [2014/05/13] [tby Dade] [Light tracing image conversion] Wayback!>> Benjamin-L wrote:I fixed the images now. The problem was that I was using Google Drive to host them but forgot to make the images public so I saw them because I was logged in but nobody else was able to.
Nope, you can not share images on forums via Google Drive, it is a known (stupid) limitation. Anyway the images still seem to not have public access rights.
(L) [2014/05/13] [tby Benjamin-L] [Light tracing image conversion] Wayback!I fixed it (hopefully) correctly this time by uploading the images as attachments. I didn't realize that this was possible originally. The limitation with Google Drive is very strange since I think that I signed out of my account on Google before copying the links. I hope this solves the problem. Sorry that I did not do this in the first place.
(L) [2014/05/14] [tby Dade] [Light tracing image conversion] Wayback!About your problem: you need 2 image buffers, in the first one, you accumulate the eye path samples (and the weight of each sample), in the second, you accumulate light path samples. When you want to update the screen or save the rendering, you have only to:
1) divide each pixel in the first buffer by the stored weight (i.e. the average of sample values);
2) divide each pixel in the second buffer by the number of light paths traced;
3) merge the 2 buffers.
This is the generic solution that works with any kind of samplers (i.e. Metropolis, etc.) and any number of eye/light path ratio.
P.S. I suggest you to check [LINK http://www.smallvcm.com/], it can answer to a lot of your questions about BiDir (even if it doesn't use the generic solution described above).
(L) [2014/05/15] [tby Benjamin-L] [Light tracing image conversion] Wayback!Thanks for the SmallVCM resource, that looks very helpful for this. I also realized that I made yet another mistake with the images: I swapped them. That is also fixed now.
back