POV-Ray : Newsgroups : povray.binaries.images : Media discrepancy (artifact?) : Re: Media discrepancy (artifact?) Server Time
1 Aug 2024 16:28:24 EDT (-0400)
  Re: Media discrepancy (artifact?)  
From: Bruno Cabasson
Date: 4 Jun 2008 04:05:01
Message: <web.48464b819a2aa192e8ba46670@news.povray.org>
Thanks a lot Kenneth for your analysis. I guess you spent quite a lot of time!

Media in POV can be sometimes a little puzzling and mysterious. Not the best
situation for controlling what happens in my clouds. Your work-around is a good
idea. However, and AFAIK, extinction is not the same as density, but it might
compensate. Before I posted, I tried many things in order to have some symptoms
and clues, but I did not try to increase the number of spheres.

Perhaps that is the most significant symptom in that problem and this will help
finding the reason.

    Bruno


"Kenneth" <kdw### [at] earthlinknet> wrote:
> "Bruno Cabasson" <bru### [at] alcatelaleniaspacefr> wrote:
> > Hi there!
> >
> > ...I discovered recently
> > something that puzzles me unexpectedly. Two media-filled objects that I was
> > expecting to render the same do not. Run the following fragment of code. You
> > can notice that the spheres on the right (UnionedSpheres) are significantly
> > brighter than those on the left (DistinctSpheres).
> >
>
> I played around with your code in lots of different ways, trying to see what
> might happen by changing this or that. (My usual problem-solving method!)  My
> own conclusion is that the spheres on the right--the ones made from a single
> interior and multiple shifted medias--are the problem spheres, not the ones on
> the left. (I guess that's kind of obvious, eh?) IMO, what you're seeing is yet
> another scattering-media-and-transparency problem. Not that I know the
> solution. Out of curiosity, I added another media sphere to both of your
> 'schemes'--and it makes the spheres on the right even brighter! What that tells
> me is that the multiple medias in that union are 'adding
> up' in some way...even though they are properly translated and supposedly don't
> overlap. OR, that the medias' (default) extinction values are not behaving
> properly...something I've noticed in some scenes of my own. (OR, it just might
> be a strange by-product of your coding method--multiple unioned spheres sharing
> a single interior with multiple shifted medias. That's new to me; very
> interesting!)
>
> But crazy experimenter that I am, I kept messing around with your code and came
> across a quasi-solution to the problem that actually seems to fix it! I arrived
> at this through...sheer luck. :-) It doesn't 'explain' the problem, but may give
> some insight into it. In your code for the right-hand sphere grouping, I first
> commented-out the density functions (which, as you say, are optional) just as a
> way to eliminate one possible problem. Then, since your union has two spheres in
> it, I reduced the color_map brightness of each media to .5 at index list .001
> (i.e., 1/2 of its original value), then changed extinction in each media to
> 2--twice its value. Each of these 'fixes' has a reason behind it: Reducing the
> brightness to half makes the media half as dense--and kind of 'watered down,'
> color-wise--yet doubling the extinction compensates for that color weakening,
> like a contrast control. Again, this was just some wild experimenting--but the
> result happens to look identical to the spheres on the left; I'm hard-pressed
> to see any difference. (The only thing I DO see is the lack of that subtle
> shadow-line on the bottom/right sphere...which *might* actually be a
> coincident-surface-like shadow problem on the bottom/LEFT sphere, from the
> parallel light source.)
>
> BTW, with THREE spheres (and three medias) in the right-hand union, the same
> visual match is created by using extinction 3 and a color_map value of .333.
> Strange but fascinating!
>
> I can't say this 'scheme' of mine makes any real sense, but it does seem to be a
> workaround to the problem.
>
> Here's the re-worked code (with slightly different media values that work
> better, I think).
>
> Ken W.
>
> -----------
>
> #declare UnionedSpheres = // grouping to RIGHT
> union{
>     sphere {0, 1 translate 1.1*y}
>     sphere {0, 1 translate -1.1*y}
>     hollow
>     pigment {rgbt 1}
>     interior
>     {
>         media{
>            method 3
>            intervals 1
>            samples 40
>            scattering {1, Blue extinction 2}
>             density {
>               spherical
>               color_map {
>                [0 rgb 0]
>                [0.001 rgb .5]
>                }
>               translate 1.1*y
>                  }
>              }
>         media{
>            method 3
>            intervals 1
>            samples 40
>             scattering {1, White extinction 2}
>             density {
>               spherical
>               color_map {
>                [0 rgb 0]
>                [0.001 rgb .5]
>                }
>               translate -1.1*y
>                  }
>              }
>          }
>      }


Post a reply to this message

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