SPPM renderer (CPU-only)

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: jromang, tomb, zcott, coordinators

Re: SPPM renderer (CPU-only)

Postby jensverwiebe » Mon Feb 28, 2011 2:31 pm

binarycortex wrote:Dade, I have noticed that when the luxrender gui is minimized or when I use luxconsole at all, the png never gets written. However in the gui when I un-minimize it the png will write as soon as the display updates, but only then. Do you want me to open a mantis bug for this?

EDIT: I believe the same is true for flm files.

Thanks for the tips Dade. I knew about the photonperpass setting you spoke of because I looked in the code. Last night I added sppm to my local copy of luxblend for blender 2.49. Which brings up a question or 3. Can you explain the startradius, and the alpha settings please? Do any of the other lookupaccel options work? And lastly is random/linear/1 the only sampler/sampler combination that work currently?


Thats on purpose with minimized GUI, watch the code..

Jens
User avatar
jensverwiebe
Developer
 
Posts: 2124
Joined: Wed Apr 02, 2008 4:34 pm

Re: SPPM renderer (CPU-only)

Postby binarycortex » Mon Feb 28, 2011 4:12 pm

jensverwiebe wrote:Thats on purpose with minimized GUI, watch the code..

Jens


I understand that it doesn't update the image in the gui when minimized, I actually like that feature. But it doesn't write any files. When using mlt+bidir for example or any of the other existing samplers+integrators it still writes the png and flm. With SPPM it does not. Also nothing is written when using luxconsole.
Competition Coordinator.
Current Competition: Math is Beautiful / Abstract Wallpaper

Member of the first official jeanphi-fan club
User avatar
binarycortex
Developer
 
Posts: 1502
Joined: Fri Feb 22, 2008 10:44 pm

Re: SPPM renderer (CPU-only)

Postby Abel » Mon Feb 28, 2011 4:16 pm

binarycortex wrote:When using mlt+bidir for example or any of the other existing samplers+integrators it still writes the png and flm

I like it too that it doesn't update the GUI, but if I recall correctly that also means that the png files that are being written will be identical (i.e. without showing any progress) until the GUI is being updated again. This may be the same for .flm. So if anything is being changed, I think it would be good to rethink the desired behaviour instead of just copying the current mlt+bidir behaviour.
User avatar
Abel
Developer
 
Posts: 1414
Joined: Sat Oct 20, 2007 8:13 am
Location: Helsinki, Finland

Re: SPPM renderer (CPU-only)

Postby Lord Crc » Mon Feb 28, 2011 4:43 pm

I think this is due to the direct way SPPM updates the Film. Normally the process goes through the Contribution pool, which also calls the the film writing check. As far as I can see SPPM does not use the Contribution pool and does not call this function manually. I'll see if I can fix it :)
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4455
Joined: Sat Nov 17, 2007 2:10 pm

Re: SPPM renderer (CPU-only)

Postby binarycortex » Mon Feb 28, 2011 5:35 pm

Abel wrote:
binarycortex wrote:When using mlt+bidir for example or any of the other existing samplers+integrators it still writes the png and flm

I like it too that it doesn't update the GUI, but if I recall correctly that also means that the png files that are being written will be identical (i.e. without showing any progress) until the GUI is being updated again. This may be the same for .flm. So if anything is being changed, I think it would be good to rethink the desired behaviour instead of just copying the current mlt+bidir behaviour.


Under normal circumstances the flm and png do get updated. But as stated before sppm behaves differently, this makes it unusable with luxconsole as it never writes anything.

Lord Crc wrote:I think this is due to the direct way SPPM updates the Film. Normally the process goes through the Contribution pool, which also calls the the film writing check. As far as I can see SPPM does not use the Contribution pool and does not call this function manually. I'll see if I can fix it :)


Thank you.
Competition Coordinator.
Current Competition: Math is Beautiful / Abstract Wallpaper

Member of the first official jeanphi-fan club
User avatar
binarycortex
Developer
 
Posts: 1502
Joined: Fri Feb 22, 2008 10:44 pm

Re: SPPM renderer (CPU-only)

Postby binarycortex » Tue Mar 01, 2011 9:17 am

LordCrc has provided me the fix via IRC.

Code: Select all
void SPPMRenderer::UpdateFilm() {
   // Assume a linear pixel sampler
   const u_int bufferId = sppmi->bufferId;
   int xstart, xend, ystart, yend;
    scene->camera->film->GetSampleExtent(&xstart, &xend, &ystart, &yend);

   int x = xstart;
   int y = ystart;

   u_int lightGroupsNumber = scene->lightGroups.size();
   for (u_int i = 0; i < hitPoints->GetSize(); ++i) {
      HitPoint *hp = hitPoints->GetHitPoint(i);

      for(u_int j = 0; j < lightGroupsNumber; j++) {
         Contribution contrib(x - xstart, y - ystart, hp->lightGroupData[j].radiance, hp->eyeAlpha,
               hp->eyeDistance, 0.f, bufferId, j);
         scene->camera->film->SetSample(&contrib);
      }

      ++x;
      if (x == xend) {
         x = xstart;
         ++y;
      }
   }
   scene->camera->film->CheckWriteOuputInterval();        <========== Added this line
}


It now writes png and flm files when the gui is minimized and when using luxconsole.
Competition Coordinator.
Current Competition: Math is Beautiful / Abstract Wallpaper

Member of the first official jeanphi-fan club
User avatar
binarycortex
Developer
 
Posts: 1502
Joined: Fri Feb 22, 2008 10:44 pm

Re: SPPM renderer (CPU-only)

Postby binarycortex » Tue Mar 01, 2011 9:52 am

Copper luxball rendered for 5.5 hours.
copper_sppmball.png
Love those copper caustics.

Dade, thanks for the tip I dropped the photon count to 10000 and it took a long enough time to build the hitpoints and what not that it was only running single threaded for almost the entire time. So I raised it up to 150000 and that seemed better, it actually spent time shooting photons. I could probably have done 250000 or so, but I wanted to try 150k first. I also noticed that sppm ignores halttime. I expected it to ignore haltspp since it's not producing spp stats right now, but I had hoped the core would handle the halttime setting.
Competition Coordinator.
Current Competition: Math is Beautiful / Abstract Wallpaper

Member of the first official jeanphi-fan club
User avatar
binarycortex
Developer
 
Posts: 1502
Joined: Fri Feb 22, 2008 10:44 pm

Re: SPPM renderer (CPU-only)

Postby Dade » Tue Mar 01, 2011 2:42 pm

binarycortex wrote:Copper luxball rendered for 5.5 hours.


Very sexy :D

binarycortex wrote:Dade, thanks for the tip I dropped the photon count to 10000 and it took a long enough time to build the hitpoints and what not that it was only running single threaded for almost the entire time. So I raised it up to 150000 and that seemed better, it actually spent time shooting photons. I could probably have done 250000 or so, but I wanted to try 150k first. I also noticed that sppm ignores halttime. I expected it to ignore haltspp since it's not producing spp stats right now, but I had hoped the core would handle the halttime setting.


The list of unsupported options is very long. I'm still working on the basic stuff, my 2 next targets are multi-threaded support for the eye pass and the samplers for the eye and photon pass (this will fix also the huge amount of memory required to store hit points at the moment).
User avatar
Dade
Developer
 
Posts: 4796
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: SPPM renderer (CPU-only)

Postby binarycortex » Tue Mar 01, 2011 5:36 pm

Dade wrote:The list of unsupported options is very long. I'm still working on the basic stuff, my 2 next targets are multi-threaded support for the eye pass and the samplers for the eye and photon pass (this will fix also the huge amount of memory required to store hit points at the moment).

Yaay!

If I am reading that right, and the samplers will control the shooting of photons, then may I suggest getting metropolis to work first. ;) If I am way off base then just ignore me. As it is, it's already producing good results, good work Dade.
Competition Coordinator.
Current Competition: Math is Beautiful / Abstract Wallpaper

Member of the first official jeanphi-fan club
User avatar
binarycortex
Developer
 
Posts: 1502
Joined: Fri Feb 22, 2008 10:44 pm

Re: SPPM renderer (CPU-only)

Postby binarycortex » Tue Mar 01, 2011 8:04 pm

An interesting finding today. I decided to try diamond cauchy settings with my sppm luxball. (viewtopic.php?f=14&t=5598) But I noticed that it took much longer to calculate the hit points. I am guessing this is due to the high IOR. Any thoughts?
Competition Coordinator.
Current Competition: Math is Beautiful / Abstract Wallpaper

Member of the first official jeanphi-fan club
User avatar
binarycortex
Developer
 
Posts: 1502
Joined: Fri Feb 22, 2008 10:44 pm

PreviousNext

Return to Architecture & Design

Who is online

Users browsing this forum: binarycortex, Enki and 2 guests