|
![](/i/fill.gif) |
When adding the photon section to objects is it better to place the photon
declaration within each small element of a larger complex object or simply
declare the photon statement at the very last one time? Simplistic Example:
union {
Sphere {<0,0,0> 1.0 pigment {Red} photons {target reflection on}}
Sphere {<1,0,0> 1.0 pigment {Green} photons {target reflection on}}
}
or
union {
Sphere {<0,0,0> 1.0 pigment {Red}}
Sphere {<1,0,0> 1.0 pigment {Green}}
photons {target reflection on}
}
It seems faster by using the latter but I'm not sure if there are advantages
or disadvantages of either. I might be able to see using the former if the
various elements were glass in some and not in others.
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
This is an interesting question.
The algorithm works so that it sends photons (in a spiral pattern) towards
the (bounding box of the) each object marked as target. That is, it sends
individually photons to each marked object.
If there are more objects marked as target, it will send more photons since
there are more objects.
On the other hand, if you specify each CSG component separately as a target,
what you are actually doing is to confine better the space which the object
takes and photons should be shot to. This means that less photons are shot
in vain.
I don't know which method send less photons in total. It probably depends
a lot in the geometry of the CSG object.
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |