tag:blogger.com,1999:blog-8992579354369393419.post2718798123807828742..comments2023-12-14T09:51:40.760-05:00Comments on Photorealizer: Physically Based Renderer by Peter Kutz: Photon Mapping RevampPeterhttp://www.blogger.com/profile/00411424533792457362noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-8992579354369393419.post-87982059611640199022014-03-18T14:29:11.428-04:002014-03-18T14:29:11.428-04:00Thank you Peter! You have a very interesting appro...Thank you Peter! You have a very interesting approach and it sounds reasonable! I implemented your method, with 500,000 photons both for global illumination and caustics each pass, and in total I tried 10 passes and 50 passes. For each pixel, I summed up the colors from all passes and divide it by total pass amount. <br /><br />My final result still has a lot of noises, and the smoothing is prominent for the first 5 passes, after that, the noises seems staying there for ever. Did you have such a problem in your work? Also I'm not sure if my way of averaging the color from every pass is correct for convergence? <br />Xiao Lihttps://www.blogger.com/profile/01615295308360447734noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-9955331956984291832014-03-18T02:04:24.946-04:002014-03-18T02:04:24.946-04:00Hey Xiao,
In each pass, I scattered new photons a...Hey Xiao,<br /><br />In each pass, I scattered new photons and built a new k-d tree. Each pass used the same parameters (the same maximum sampling radius) but different photons.<br /><br />I did not decrease the search radius in each pass as in progressive photon mapping. That would have been a consistent algorithm, but it also would have introduced additional bias at the beginning of the render that would have had to have been overcome with more passes.<br /><br />Instead, I started with a very small search radius. That was the key to the very sharp, detailed caustics. Because of the small radius, the image started out with a lot of high frequency noise, but eventually converged to something smooth and sharp.<br /><br />I estimated the irradiance using all of the photons inside the fixed search radius, not just the farthest photon. This should make the image converge faster than using only one, since all of the photons typically have different powers. Also, gathering all of the photons inside a fixed search radius instead of gathering a certain number of photons ensured that the distance to the gathered photons was small, which ensured that the caustics would be sharp and not blurred out, even in areas of low photon density.Peterhttps://www.blogger.com/profile/00411424533792457362noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-86143920483797522352014-03-18T00:06:18.625-04:002014-03-18T00:06:18.625-04:00Sorry if I made some confusion... I combined my bl...Sorry if I made some confusion... I combined my blogspot account 棋坪的顾渚紫笋 with my google account :PXiao Lihttps://www.blogger.com/profile/01615295308360447734noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-37086249256121819612014-03-17T02:38:44.521-04:002014-03-17T02:38:44.521-04:00Thanks for your reply!!
I'm more curious abou...Thanks for your reply!!<br /><br />I'm more curious about your multiple pass estimation~ Did you scattered multiple times, build several kdtrees to store photons (I assume), and do multiple passes of irradiance estimation with same parameters (like how many photons per intersection, maximum sampling radius)? Or did you use the same kdtree, and do multiple irradiance estimation with sampling in different parameters? <br /><br />I tried so hard to get the super nice looking and accurate caustics in your caustic only image! But my method (Jensen's, in which I try to gather a certain number of photons and estimate irradiance with the radius of the farthest photon of sample set) lost details of caustics. The caustic under the transmissive sphere is more like some very bright spots. Xiao Lihttps://www.blogger.com/profile/01615295308360447734noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-66650864952839627842014-03-16T02:10:54.347-04:002014-03-16T02:10:54.347-04:00Thank you for the comment!
To estimate the irradi...Thank you for the comment!<br /><br />To estimate the irradiance at a point on a surface, I first gathered all of the photons within a sphere of a small fixed radius. Then I made the assumption that all of the gathered photons lay on a flat disc. This allowed me to compute the irradiance by summing the power of all of the gathered photons and dividing by the surface area of the disc. The radius of the disc was assumed to be the same as the search radius, and the normal of the disc was assumed to be the same as that of the surface at the ray intersection point. This is a pretty good approximation when the radius is really small relative to the variation of the surface normal.<br /><br />I didn't apply any filter kernels. That's correct: the smooth result comes from multiple passes, each with lots of photons.Peterhttps://www.blogger.com/profile/00411424533792457362noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-85031344325615817832014-03-14T19:50:55.987-04:002014-03-14T19:50:55.987-04:00Nicely done! I learnt a lot from reading your proc...Nicely done! I learnt a lot from reading your process! Did you use sphere or disc or cube for photon gathering? Are there any filter kernels applied? (If not, is the smooth result comes from multiple passes?)Xiao Lihttps://www.blogger.com/profile/01615295308360447734noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-81917629619694636182013-01-10T23:33:29.322-05:002013-01-10T23:33:29.322-05:00Very interesting! Thanks for the pointer, RC.Very interesting! Thanks for the pointer, RC.Peterhttps://www.blogger.com/profile/00411424533792457362noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-80318639228553821242013-01-10T23:32:03.451-05:002013-01-10T23:32:03.451-05:00Thanks for the comment Michal. To address the prob...Thanks for the comment Michal. To address the problem of including photons from other surfaces, I do two main things:<br /><br />1. Weight samples based on the similarity of the surface normal and the photon normal. (Based on your blog, it sounds like you've done something similar in your own renderer.)<br />2. Make the search radius small enough that the problem isn't noticeable.<br /><br />Yes, I'm doing direct illumination using standard techniques.Peterhttps://www.blogger.com/profile/00411424533792457362noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-84755765935813667102012-12-08T16:59:01.337-05:002012-12-08T16:59:01.337-05:00Hi there. Nice work :). How do you address the pho...Hi there. Nice work :). How do you address the photon mapping problem of including photons from other surfaces (edges, corners)? Are you doing the direct illumination using standard techniques i. e. like in PT?<br />Michalhttps://www.blogger.com/profile/00169605863590992253noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-86904471394792899612012-10-28T11:00:47.422-04:002012-10-28T11:00:47.422-04:00Search for Linear Congruential Generators in Wikip...Search for Linear Congruential Generators in Wikipedia to read about the problems with the low quality PSRNs you have foundRCnoreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-35813896503670251462012-08-31T13:42:06.688-04:002012-08-31T13:42:06.688-04:00Thanks Karl!
It actually converges to those artif...Thanks Karl!<br /><br />It actually converges to those artifacts—they are hardly visible at first, and then they crystallize with more samples. From what I could tell from a few tests, there was a correlation between the location on the light that a photon was emitted from, and the direction that the photon was emitted in. In the test above, I color-coded the photons based on where they were emitted from the light, and you can see that the brighter parts of ripples are more purple, while the darker parts are more blue (confirmed in Photoshop by extracting the hue). Seems like the problem was only evident in the caustics because the rays stay coherent when they bounce off of the ideal specular sphere—otherwise there's nothing special about the caustics. I was able to see a similar crisscrossed ripple pattern in these caustics with backwards path tracing when I injected some rand() influence on Windows (where my compiler has a RAND_MAX of only 32767). In general, rand implementations don't use the highest quality PRNGs (sounds like rand_s on Windows might be better though).Peterhttps://www.blogger.com/profile/00411424533792457362noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-42985953059537214882012-08-30T23:35:19.400-04:002012-08-30T23:35:19.400-04:00Hey, thanks Xing!Hey, thanks Xing!Peterhttps://www.blogger.com/profile/00411424533792457362noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-17860435448834644802012-08-30T20:42:31.731-04:002012-08-30T20:42:31.731-04:00Very nice! The bit with the artifacts from not usi...Very nice! The bit with the artifacts from not using the Mersenne Twister is very curious, are those artifacts that arise from the nature of rand() itself, or just from not enough convergence? Karl Lihttps://www.blogger.com/profile/08771538175445551400noreply@blogger.comtag:blogger.com,1999:blog-8992579354369393419.post-79304831572027523112012-08-30T19:28:26.731-04:002012-08-30T19:28:26.731-04:00nice work!nice work!Anonymoushttps://www.blogger.com/profile/03534347156739163614noreply@blogger.com