POV-Ray : Newsgroups : povray.binaries.images : Canister of Elbow Macaroni : Re: NOT a Canister of Elbow Macaroni Server Time
30 Jul 2024 12:26:13 EDT (-0400)
  Re: NOT a Canister of Elbow Macaroni  
From: James Holsenback
Date: 13 Dec 2012 10:26:35
Message: <50c9f3ab@news.povray.org>
On 12/12/2012 04:55 PM, Alain wrote:

>
>> Now I have a question .... because holy crap my first stab at photons in
>> this scene took 28 hrs and it just didn't suit. I think some of the rays
>> are getting through the gaps between the peppercorns. I've been reading
>> (and re-reading) the docs on photons and I'm unclear about the setup I'm
>> using. I'd like to trim some time off that process and here's what I
>> have:
>>
>> union {
>>    object { PepperMill scale 1.01 #if (UsePhotons) split_union off #end }
>>    object { Peppercorns #if (UsePhotons) split_union off #end }
>>    translate <-120,0,12.5>
>>    rotate y*60
>>    #if (UsePhotons)
>>      photons { target reflection on refraction on collect off }
>>    #end
>>    }
>>
>> The peppercorns are a union of all the peppercorns is why I did it like
>> that, and just wanted a reality check so I don't waste another 28 hrs!
>
> I'm not sure that turning split_union off help you. If the union is
> split, you stop checking if you hit any object of the union, but, if you
> don't split it, each ray must test against all of your 2000 peper corns,
> even those on the oposite side or in the middle that have no hope of
> ever interacting with your photons...
> Anyway, do a test using only mockup spheres and one photons target
> object shining photons on the whole thing. Compare with and without
> split_union off.
>
> Not splitting the union of the peper mill itself may help in some cases,
> but it also may not.
> Do a test render with the empty peper mill and simple planes to collect
> the photons and compare the performances with and without split_union off.
>
> You don't need to use the conditional expression for your photons block.
> In a non-photons scene, any photons block is just silently ignored.
>
>
> Alain

Well after running a few test cases it became painfully obvious that the 
peppercorns were the culprit ...

split_union off on the empty pepper-mill showed a gain in performance of 
a little more than 30% (photon time) ... on just the peppercorns about 
the same gain in photon time, but the render time increased by over 10x!!!

Using pass_through on the peppercorns just didn't seem to make any sense 
for this case, so I took the peppercorns out of the pepper-mill union 
and added them as a separate instance ... they appeared incorrectly 
shaded, so back into the pepper-mill union.

While going over the docs yet again, the "Using Photon Mapping in Your 
Scene" section in the reference gave me the idea to try (with what 
appears to be favorable results) the following :

union {	
   object { PepperMill scale 1.01 #if (UsePhotons) split_union off #end }
   object { Peppercorns
   #if (UsePhotons)
     photons { reflection off refraction off collect off }
   #end
   }
   translate <-120,0,12.5>
   rotate y*60
   #if (UsePhotons)
     photons { target reflection on refraction on collect off }
   #end
   }

The photon global settings previously used (that yielded 28 hrs render 
time) now comes in at 35 min photon time and 13 min render time! Now I 
hope I can decrease my spacing parameter (for better results) and save 
that photon map, then move on to working on the radiosity :-)


Post a reply to this message


Attachments:
Download 'work.png' (602 KB)

Preview of image 'work.png'
work.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.