POV-Ray : Newsgroups : povray.newusers : Transparent Objects Become Black : Re: Transparent Objects Become Black Server Time
28 Nov 2021 15:44:34 EST (-0500)
  Re: Transparent Objects Become Black  
From: Alain Martel
Date: 12 Nov 2021 13:34:33
Message: <618eb3b9$1@news.povray.org>
Le 2021-11-11 à 13:19, bubble_person a écrit :
> Alain Martel <kua### [at] videotronca> wrote:
>> Le 2021-11-11 à 08:06, bubble_person a écrit :
>>> Hello Forum,
>>>
>>> I am relatively new to POV-RAY, but have a functional script .
>>>
>>> I am simulating air bubbles in a glass tube full of gel.  I am running into a
>>> funny problem where, if I add too many bubbles to the script, they go from being
>>> transparent and rendered correctly, to a completely opaque, black object through
>>> which no light shines.
>>>
>>> Things that don't seem to work:
>>>
>>> 1) Increasing the  max_trace_level
>>>
>>> 2) I have tried to be sure that the inner surface of the gel is not in contact
>>> with the air bubble by reducing the bubble radius by epsilon (.0001).  Oddly
>>> enough, the script with up to 4 bubbles works only when the two surfaces are
>>> coincident, and subtracting an epsilon value (.0001,.001,.01) causes the bubbles
>>> to turn black, no matter the number.
>>>
>>> I would love your input on this issue as I am stumped.  I cannot figure out why
>>> this renders without issue when I only have a certain number of objects defined.
>>>
>>>
>>> The order of my file:
>>>
>>> In my scene, centered at the origin, I have bubbles, inside of gel, inside of a
>>> glass tube, inside of water, inside of a plexiglass cylinder.
>>>
>>> My code
>>>
>>> 1) I define variables, set trace level, and place the camera
>>>
>>> 2) I create a distributed area light source on a rectangular box
>>>
>>> 3) I define the bubbles I want in the gel
>>>
>>> 4) I create the glass tube into which the gel will sit
>>>
>>> 5) I create the gel region with voids into which the bubbles sit.
>>>
>>> 6) I then add water around the glass tube, and then a plexiglass perimeter.
>>>
>>>
>>>
>>>
>>
>> The first thing that I would to would be to increase max_trace_level
>> further still. It can go up to 255.
>>
>> Note : Your area_light is oblique. If you want it to be flat, then, it's
>> size should be something like this :
>> area_light 160*x 200*z 65 65
>> adaptive 0 // start with zero, then, increase if needed
>> Size of area_light adjusted to match the light_box dimensions.
>>
>> During testing, you should disable the area_light. It makes testing and
>> debugging faster.
>>
>> The 100 by 100 get silently increased to 129 by 129 when adaptive is
>> used. That increase DO NOT affect the rendering time.
>>
>> Using dispersion 1 is the same as not using dispersion. It must be
>> slightly different than 1. Realistic values are usually in the 1.01 to
>> 1.08. Values less than 1 result in inverted dispersion.
>>
>> You are using fade_power 1000 !? You should use 1 or 1001.
>> Using 1000 may cause some issues.
> 
> Hello Alain,
> 
> Thank you so much for your reply and suggestions.  As you may have noticed, I am
> still in the process of understanding the different features.
> 
> In the case of max_trace_level, I have put this all the way up to the max as you
> suggested, but this did not resolve the issue from my original script.  I'll
> have to keep digging for a solution in that regard.
> 
> For the area_light, I was certainly not clear on the pov-ray documentation and
> examples.  From what I understand, I am creating a box (light box) that is
> parallel with the xy-plan, onto which I'm stretching an array of 100x100 light
> sources.  And as you stated, by adding the adaptive, feature, this gets
> increased when running (Great thing to know!  I wasn't completely clear on what
> happened in the background).
> 
> I am, however, still confused on why the area_light would be tilted.  As you
> mentioned, I want a light parallel to the xy plane, and thought that this was
> the case.
> 
> Given this example below, my understanding is that my light_box is a box that is
> 160x200x2 units (x,y,z) and collared white.  I then locate my light_source at
> <light_loc_x, light_loc_y,light_loc_z>.  I then use the area_light feature to
> define two points <-10, -10, 10>, <10, 10, 10> from the origin to indicate the
> vectors over which to stretch the light.
> 
> #declare light_box = box{ <-80,-100,0>, <80,100,2>
>          pigment{color White}
>         } //end light box
> light_source {
>      <light_loc_x, light_loc_y,light_loc_z>
>      color White
>      area_light <-10, -10, 10>, <10, 10, 10>, 100, 100
>      adaptive 1
>      jitter
>      looks_like { light_box }
>    }
> 
> 
The size vectors of an area_light define the 2D dimentions of the 
area_light. A line going from the origin to one of them will be parallel 
to the side of the area_light.

Simple length are used for a light array with sides parallel to the axis.
Two non-zero component are used for an array parallel to one of the 
major planes but rotated/sheared.
Three non-zero components will define an array that is not parallel to 
any of the planes.

Normally, we use simple lengts parameters, each in line with one of the 
axis.

In the present example, the vectors are diagonal. They pass through the 
origin <0,0,0> and the defined points, or <-10, -10, 10> and <10, 10, 10>.

It goes from <-10, -10, 10> to <0, 0, 0> to <10, 10, 10>.
This is perpendicular to the X-Z plane, and at 45° from the X-Y plane.

If you want an area_light parallel to the X-Z plane, then, the vectors 
need their Y components to be zero.

light_source {
     <light_loc_x, light_loc_y,light_loc_z>
     color White
     area_light <-10, 0, 10>, <10, 0, 10>, 100, 100
     adaptive 1
     jitter
     looks_like { light_box }
   }
Defines an area_light parallel to the Z-X plane, rotated 45°.

light_source {
     <light_loc_x, light_loc_y,light_loc_z>
     color White
     area_light <-10, -10, 0>, <10, 10, 0>, 100, 100
     adaptive 1
     jitter
     looks_like { light_box }
   }
Defines a LINEAR light array as the two vectors are colinear. It won't, 
but should, generate at least a warning.


Post a reply to this message

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