POV-Ray : Newsgroups : povray.newusers : Transparent Objects Become Black : Re: Transparent Objects Become Black Server Time
18 Aug 2022 17:00:48 EDT (-0400)
  Re: Transparent Objects Become Black  
From: bubble person
Date: 3 Dec 2021 07:55:00
Message: <web.61aa129c28696f3216bfacdf7c94cc22@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:

>
> > light_source {
> >      <0, 0,100>
> >      color White
> >      area_light <160, 0, 0>, <, 200, 0>, 100, 100
> >      adaptive 1
> >      jitter
> >    }
> >
> > When I do this, however, the background is all black, as I believe this only
> > produces rays from the defined area_light, but doesn't really simulate the
> > appearance of looking into a bright backlight.  To mimic realistic backlighting,
> > I can then use the command looks_like{ light_box } where I predefine a white
> > rectangle called "light_box."  My code then looks like this:
> >
> > #declare light_box = box{ <-80,-100,0>, <80,100,2>
> >          pigment{color White}
> >         } //end light box
> >
> > light_source {
> >      <0, 0,100>
> >      color White
> >      area_light <-10, -10, 0>, <10, 10, 0>, 100, 100// Not correct !
> >      adaptive 1
> >      jitter
> >      looks_like { light_box }
> >    }
> >
> > Doing this, I have defined an area_light parallel to the XY, stretched it over
> > my box dimensions, and translated that box/area_light +100 units in the
> > Z-direction.
> >
> > Is this correct?
> Not quite...
> >
> > Sincerely,
> >
> > bubble_person
> >
>
> First point : It is important to remember that light sources are never
> directly visible by the camera. They are ONLY places from where light
> emanate to illuminate the scene, they are not actual objects.
>
> In your example, one side of the area_light is parallel to a line going
> from the origin to a point at <-10, -10, 0>, and the other side is
> parallel to a line going from the origin to <10, 10, 0>.
> Those two lines are co-linear. This will cause soft shadows in only one
> direction. That direction is a diagonal.
>
> There is an obvious, for me, confusion about what is defined where.
>
> When defining a box, you use the two opposite corners. You effectively say :
> Here is a box with faces parallel to the orthogonal planes, and it's
> opposite corners are at those locations.
>
> When defining an area_light, you define the DIRECTION and length of each
> sides, NOT the location of the corners of the parallelogram covering the
> area_light. Here, you are effectively saying :
> Here is a parallelogram centred at the light's location with one side
> oriented this way and this long, and the other side oriented that way
> and that long.
>
> Normally, you want those to be orthogonal. In your case, they need to
> align to the X and Y axis. That mean that only one coordinate have to be
> non-zero and the other two have to be zero. The sign is not important,
> only the absolute value of the length.
>
> area_light 160*x, 200*y, 100, 100
> area_light -160*x, 200*y, 100, 100
> area_light 160*x, -200*y, 100, 100
> and
> area_light -160*x, -200*y, 100, 100
> all define exactly the same area_light.
>
> As you want the light to be parallel to the X-Y plane, it should be
> defined as :
> #declare light_box = box{ <-80,-100,0>, <80,100,2>
>          pigment{color White}
>    finish{emission 1}
>         } //end light box
>
> light_source {
>      <0, 0,100>
>      color White
>      area_light 160*x, 200*y, 65, 65
>      adaptive 0 // May be enough
>      jitter
>      looks_like { light_box }
>    }
>
> The smaller size is more than adequate. Because it use the adaptive
> mechanism, the performance is nearly identical.
> Just using adaptive 0 will enable the adaptive sampling. The value is
> not an on/off switch, but determine the minimum number of elements to
> start with.
>
> adaptive 0 start with just the four corners, a 2x2 array. (2^0 +1)
> adaptive 1 start with a 3x3 array. (2^1 +1)
> adaptive 2 start with a 5x5 array. (2^2 +1)
> adaptive 3 start with a 9x9 array. (2^3 +1)
> .
> .
> .
>
> That progression is also why your 100 by 100 array get increased to 129
> by 129, or 2^7 + 1.

Hello Alain,

Thank you so much for the in-depth description and example to illustrate the
concepts.  I see exactly what you mean, and I definitely got myself turned
around on it.  This makes total sense about the light source not being visible
by itself, and the coordinate system.  I think I got turned around on the online
diagrams of the area_light, and trying to figure out where the two defining
vectors were connected (as you said, an origin which is why I was doing wacky
things like making two co-linear vectors!).

As for the adaptive, this makes sense now and thank you for making this clear.
I just posted another question on my rendering that includes essentially this
same question.  I did not see your reply, and will go change the post if I can
because this has cleared up my questions.  Thank you again for all of your
support and insight!

Sincerely,

Bubble_person


Post a reply to this message

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