View topic - Beta release: Photon Mapping Irradiance Cache

Beta release: Photon Mapping Irradiance Cache

This forum hosts proposals sent to YafaRay, discussions about GSOC 2010 accepted projects and their betatesting.

Beta release: Photon Mapping Irradiance Cache

Post Sun Aug 08, 2010 11:58 pm

Hi!
this is the first release of the Irradiance Cache (IC from now on) for the photon mapping integrator. What it does, is to "remember" the value of irradiance at some points so it can interpolate it through the surfaces. This in theory save us time and in some cases can improve the quality of the render. There are two main parameters at the moment, Accuracy and Max Samples.
Accuracy is inversely correlated to the radius of action of a given IC record (the point in the surface that saves the real value of the irradiance -the sum of all the incoming radiance-). So, the bigger the number, the more IC records will be generated, which means a more accurate interpolation.
Max Samples is the number of divisions that the sampling hemisphere will have along the "altitude" angle. The total number of samples per record will be Max Samples*Integer(Max Samples*PI) (approx. 3*Max Samples^2). The bigger the number the more samples per IC record will be taken.
So, both numbers will have a great impact into the final solution. The only problem is that the number of IC records can climb really fast, so I recommend to start with Accuracy=1 and Max Samples=10. If the image is too splotchy then you need a bigger Accuracy (>3 is just a waste, so try to keep it between 1 and 3). Max Samples should be kept between 10 and 25.
There are lots of ways to use IC with a PM integrator, right now I am using a very simple approach:IC records are created with just one bounce into the diffuse photon map, and the integrator just interpolates between the IC records for the diffuse component.

I want to warn you all that the code is being changed very often, and It haven't been optimized yet. IC tends to eat lots of memory (it can goes >1GB), so start small, every scene works differently.

You can find the sources at:
http://github.com/Glaskows/YafaRay
http://github.com/Glaskows/YafaRay_Blender-2.49

Last note, Final Gather option must be on.

There is an issue with the forum right now, I can't upload any picture, sorry
Glaskows
 
Posts: 12
Joined: Mon Mar 22, 2010 11:50 am

Re: Beta release: Photon Mapping Irradiance Cache

Post Mon Aug 09, 2010 7:41 am

Stupid question, but, how I can istall it....?....Im not coder, or betatester, but Irradiance Cache in Yafaray interest me really much.....

www.hangardesign.ic.cz  www.hangardesign.wordpress.com /use google translate

User avatar
HANGAR
 
Posts: 457
Joined: Sun Dec 13, 2009 1:54 pm

Re: Beta release: Photon Mapping Irradiance Cache

Post Mon Aug 09, 2010 8:21 am

IrrCache is fast... :D but tricky. For this simple scene I tried the settings with the minimum visible noise for a point lamp inside a kind of Cornell box... material is glossy and glass.
Attachments
irrcachetest.png

"Power tends to corrupt, and absolute power corrupts absolutely. Great men are almost always bad men."

User avatar
condar
 
Posts: 771
Joined: Sun Apr 12, 2009 2:41 am

Re: Beta release: Photon Mapping Irradiance Cache

Post Mon Aug 09, 2010 8:52 am

This rendertimes looks great....40% faster?

www.hangardesign.ic.cz  www.hangardesign.wordpress.com /use google translate

User avatar
HANGAR
 
Posts: 457
Joined: Sun Dec 13, 2009 1:54 pm

Re: Beta release: Photon Mapping Irradiance Cache

Post Mon Aug 09, 2010 12:24 pm

I tried some quick tests of ic with a simple scene, but I struggled to find the settings that would give acceptable results, so i will ask for some hints. :)

Here is the scene, rendered with regular pm as reference:

pedestal001-pm.png


I first tried the scene with the recommended initial settings of accuracy = 1 and max samples = 10, and the result was blazing fast but low quality with splotches in the corners and under the window:

pedestal001-ic1_10.png


So I tried increasing the settings to 1.5 and 15, and the quality better (not perfect), but the render slowed to an absolute crawl:

pedestal001-ic1.5_15.png


IC seemed to struggle most near the window where samples from the sun and an area light and everything else were most influential. I tried lowering the fg samples to 16 while keeping the same IC settings of 1.5 and 15, but that still crawled so I gave up on the render. Also it seems glossy materials have problems, but I don't know if that is directly related to the IC code or not.

I think no combination of IC settings lower than 1.5 and 15 would give good quality and nice render times, but maybe I'm wrong. Is there something different I could do with the scene setup to help?
User avatar
wizofboz
 
Posts: 235
Joined: Tue Sep 16, 2008 7:00 pm

Re: Beta release: Photon Mapping Irradiance Cache

Post Mon Aug 09, 2010 4:36 pm

wizofboz

I think that the reason of the splotches is a low quality photon map and the IC algorithm can not smooth it out, can you show the photon map pass only?
User avatar
Samo
 
Posts: 3100
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: Beta release: Photon Mapping Irradiance Cache

Post Mon Aug 09, 2010 7:54 pm

Samo, you were right, the photon settings were hurting the render. I started with the photon map on the left below, and improved it by doubling the photons and increasing the radius to get the map on the right:

pedestal001-photons-comp.png


I used the new photon settings, increased the IC settings to 1.1 and 11, and also tweaked some other things to get this result:

pedestal001-ic1.1_11new.png


Still some splotches under the window but a lot better than before.

I had noticed that IC seemed sensitive to poor photon maps. I think regular pm can usually use photon maps like my first one without many problems, but with IC it is a little different.
User avatar
wizofboz
 
Posts: 235
Joined: Tue Sep 16, 2008 7:00 pm

Re: Beta release: Photon Mapping Irradiance Cache

Post Tue Aug 10, 2010 5:41 am

wizofboz: What would happen if you left the quality low and only increased the max samples value? My guess is that it would increase the render time sub linearly. It might help IC dependence on a dense original photon map if it is running up against that maximum number often.

I hate to always need to ask this but a windows build would be great.
loh
 
Posts: 250
Joined: Sat Sep 20, 2008 3:22 am

Re: Beta release: Photon Mapping Irradiance Cache

Post Tue Aug 10, 2010 6:59 am

One more time.....HOW I CAN INSTALL THIS ONE?.....

www.hangardesign.ic.cz  www.hangardesign.wordpress.com /use google translate

User avatar
HANGAR
 
Posts: 457
Joined: Sun Dec 13, 2009 1:54 pm

Re: Beta release: Photon Mapping Irradiance Cache

Post Tue Aug 10, 2010 5:47 pm

HANGAR wrote:One more time.....HOW I CAN INSTALL THIS ONE?.....




Try this:-
http://www.yafaray.org/community/forum/ ... 2&start=16
User avatar
stoneage
 
Posts: 1241
Joined: Sun Dec 23, 2007 1:06 pm

Re: Beta release: Photon Mapping Irradiance Cache

Post Tue Aug 10, 2010 6:21 pm

HANGAR wrote:One more time.....HOW I CAN INSTALL THIS ONE?.....

only building from source for the moment

"Power tends to corrupt, and absolute power corrupts absolutely. Great men are almost always bad men."

User avatar
condar
 
Posts: 771
Joined: Sun Apr 12, 2009 2:41 am

Re: Beta release: Photon Mapping Irradiance Cache

Post Tue Aug 10, 2010 6:22 pm

hi calm down guys, I'm recruiting volunteers to have Windows builds ASAP
User avatar
Samo
 
Posts: 3100
Joined: Tue Dec 20, 2005 10:39 am
Location: Spain

Re: Beta release: Photon Mapping Irradiance Cache

Post Tue Aug 10, 2010 6:50 pm

more tests
Attachments
volumetrics.png

"Power tends to corrupt, and absolute power corrupts absolutely. Great men are almost always bad men."

User avatar
condar
 
Posts: 771
Joined: Sun Apr 12, 2009 2:41 am

Re: Beta release: Photon Mapping Irradiance Cache

Post Tue Aug 10, 2010 7:38 pm

Yes guys, but I need to know, how I can turn on this built.... two ZIP files... on first one any .py files...put into blender scripts....and second...?..unpack..?..where..?..any for rewrite..?..

www.hangardesign.ic.cz  www.hangardesign.wordpress.com /use google translate

User avatar
HANGAR
 
Posts: 457
Joined: Sun Dec 13, 2009 1:54 pm

Re: Beta release: Photon Mapping Irradiance Cache

Post Thu Aug 12, 2010 8:19 pm

Sorry guys for not giving any replies yet... I am working very hard to optimize the algorithms and fix bugs.
With neighbor clamp disabled we got a good result faster, but we may get some leakage on some borders, so maybe we should put that into the gui as an option.
Now I present you an image of an application that renders the xml dump of the IC records (which can be enabled by editing the scene xml file, the option is called IC_DumpXML... false as default). One can navigate in realtime through it. It is in pre^inf alpha state, I want to add vectors for normals, gradients, show radios, irradiance, etc. It is written in Python, wx and vtk.

treeViewer-1208-1611.jpg


BTW, each blue point represents the position of an IC record.
Glaskows
 
Posts: 12
Joined: Mon Mar 22, 2010 11:50 am

Next

Return to Google summer of code 2010 - YafaRay Projects



Who is online

Users browsing this forum: No registered users and 1 guest

cron