Diffuse bounces are additive?



  • The ONLY difference between these two SF test renders is the number of diffuse bounces (the setting on the right hand side of the render settings window) - the left image is 6 bounces, the right image is 1 bounce. Every additional bounce between 1 and 6 creates a brighter render.

    0_1470346088401_6&1DS.jpg

    I would not expect additional diffuse bounces to be additive like this. It seems to make a nonsense of having calculated, realistic light intensity settings. Am I wrong? Is this behaviour expected?

    Thanks



  • Interesting question... Does it depends on the kind of light being used?



  • Can you post your render settings?


  • Poser Ambassadors

    "Am I wrong? Is this behaviour expected?"

    Yes, and yes.

    Let's reduce the simulation to an absurdly simple scenario, one that, hopefully, is something you could calculate with a pencil instead of requiring a computer.

    Imagine a tiny 1-dimensional universe consisting only of two dots of matter (call them A and B) and one light source (call that L). The universe looks like this:

    A-----L-----B

    The dashes represent empty space.

    Let's assume that the "material" or shader on the matter dots A and B is such that it reflects 80% of the light that arrives. Let's also assume that L is a "spot light", emitting 1000 units of light energy in the direction of A, but not at B. Let's also assume that in this one-dimensional world, the inverse square law doesn't apply. (In 3D it does, but that only serves to confuse the issue for us, since in 3D we also collect light from all directions - the two effects tend to cancel out.)

    Anyway...

    L shoots 1000 units of light towards A. What is the reflected light from A?

    We said it would be 80% so A bounces 800. (first bounce) In a simulator with bounces set to 0, the B dot gets no light but with one bounce it does. From the point of view of the B dot, the A dot is effectively a light source set to 800 units.

    But wait ... if B is reflecting 80% as well, and there's 800 units arriving at B, then there must be some reflecting FROM B as well.

    B reflects 80% of 800, or 640 units of light back towards A. (bounce = 2)

    Wait a sec... that's a lot of light. We should take that into account.

    OK so now an additional 640 units is arriving back at A. Added to the original 1000, we actually have 1640 units arriving at A, not 1000 from the light source L alone.

    So A reflect 80% of 1640 = 1312 units. (bounce = 3)

    Wait .. so the B calculation was wrong. B would reflect 80% of 1640 = 1049.6. (bounce = 4)

    Wait ... so the A calculation was wrong. A would reflect 80% of (1000 + 1049.6) = 1639.68 (bounce = 5)

    Wait ... so the B calculation was wrong. B would reflect 80% of 1639.68 = 1311.744.

    Wait ... hopefully you see what's happening now. Every bounce makes the equation calculate a bit more. But the contribution of each bounce is less than the previous, since 20% of each bounce is disappearing from the system.

    Eventually the additive amount of an individual bounce converges to, but never quite reaches, 0. We decide arbitrarily to cut it off since it doesn't make that much difference. But cutting off at 2 or 3 bounces is very early as quite a bit more energy will move around after that and this gets ignored if not calculated.

    I wrote a program to show the brighness of A and B for all bounce cutoffs from 0 to 30.

    Bounce 0: A = 800.000000 B = 0.00
    Bounce 1: A = 800.000000 B = 640.00
    Bounce 2: A = 1312.000000 B = 640.00
    Bounce 3: A = 1312.000000 B = 1049.60
    Bounce 4: A = 1639.680000 B = 1049.60
    Bounce 5: A = 1639.680000 B = 1311.74
    Bounce 6: A = 1849.395200 B = 1311.74
    Bounce 7: A = 1849.395200 B = 1479.52
    Bounce 8: A = 1983.612928 B = 1479.52
    Bounce 9: A = 1983.612928 B = 1586.89
    Bounce 10: A = 2069.512274 B = 1586.89
    Bounce 11: A = 2069.512274 B = 1655.61
    Bounce 12: A = 2124.487855 B = 1655.61
    Bounce 13: A = 2124.487855 B = 1699.59
    Bounce 14: A = 2159.672227 B = 1699.59
    Bounce 15: A = 2159.672227 B = 1727.74
    Bounce 16: A = 2182.190226 B = 1727.74
    Bounce 17: A = 2182.190226 B = 1745.75
    Bounce 18: A = 2196.601744 B = 1745.75
    Bounce 19: A = 2196.601744 B = 1757.28
    Bounce 20: A = 2205.825116 B = 1757.28
    Bounce 21: A = 2205.825116 B = 1764.66
    Bounce 22: A = 2211.728074 B = 1764.66
    Bounce 23: A = 2211.728074 B = 1769.38
    Bounce 24: A = 2215.505968 B = 1769.38
    Bounce 25: A = 2215.505968 B = 1772.40
    Bounce 26: A = 2217.923819 B = 1772.40
    Bounce 27: A = 2217.923819 B = 1774.34
    Bounce 28: A = 2219.471244 B = 1774.34
    Bounce 29: A = 2219.471244 B = 1775.58
    Bounce 30: A = 2220.461596 B = 1775.58


  • Poser Ambassadors

    If you'd like to try different setups yourself, here's the Python script.

    # calculate and print the updated brightness of a and b after n bounces
    # Use shader value to define what fraction is reflected.
    # Use energy created by light source l
    def bounce(shader, l, a, b, n = 0):
        # if n is even, bounce light from a (which gets light from l and b)
        if n % 2 == 0:
            a = shader * (l + b)
        else: # bounce light from b (which only gets light from a)
            b = shader * a
        print "Bounce %s: A = %.2f  B = %.2f" % (n, a, b)
        # if we're not at 30 bounces yet, recurse to do another one
        if n < 30:
            bounce(shader, l, a, b, n + 1)
    
    # initial conditions - shader reflects 80%, light emits 1000 units - go!
    bounce(.8, 1000.0, 0, 0)
    


  • @bagginsbill

    Thank you so much for the explanation. I was suspecting something like this but you manage to explain it in such a clear manner.



  • a couple of weeks back I found that defuse bounce control and played with it a bit and it did not seem to do anything much to the scene but I think I only had the enviroshere lighting that up. Now that I'm testing this with the actual lights it make a huge difference in the render.


Log in to reply
 

Looks like your connection to Graphics Forum was lost, please wait while we try to reconnect.