POV-Ray : Newsgroups : povray.binaries.images : Media discrepancy (artifact?) : Media discrepancy (artifact?) Server Time
1 Aug 2024 16:23:56 EDT (-0400)
  Media discrepancy (artifact?)  
From: Bruno Cabasson
Date: 3 Jun 2008 09:55:00
Message: <web.48454c2d23bf798ee8ba46670@news.povray.org>
Hi there!

Still working on atmospheres and cloudscapes for TerraPOV, I discoverd 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).

In UnionedSpheres, there is a single interior with two spherical-shaped medias.
In DistinctSpheres, each sphere has its own interior media.

I had in mind that the two definitions were equivalent.

I cannot figure out where the problem is. Could it be related to the container
artifact?


    Bruno


#version 3.5;

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  orthographic
  location  -100*z
  look_at 0
  right     5*x*image_width/image_height
  up 5*y
}


light_source {
  <0, 0, 0>
  color rgb 0.8
  parallel point_at -y
  translate 100*y
}


#declare DistinctSpheres = union
{
    sphere
    {
        0, 1
        hollow
        pigment {rgbt 1}
        interior
        {
            media
            {
                intervals 3 samples 3 method 3
                scattering {1, Blue}
                density {function{1}} // Optionnal statement
            }
        }
        translate 1.1*y
    }

    sphere
    {
        0, 1
        hollow
        pigment {rgbt 1}
        interior
        {
            media
            {
                intervals 3 samples 3 method 3
                scattering {1, White}
                density {function{1}} // Optionnal statement
            }
        }
        translate -1.1*y
    }
}

#declare UnionedSpheres = union
{
    sphere {0, 1 translate 1.1*y}
    sphere {0, 1 translate -1.1*y}
    hollow
    pigment {rgbt 1}
    interior
    {
        media
        {
            intervals 3 samples 3 method 3
            scattering {1, Blue}
            density {spherical color_map {[0 rgb 0] [0.001 rgb 1]} translate
1.1*y}
        }
        media
        {
            intervals 3 samples 3 method 3
            scattering {1, White}
            density {spherical color_map {[0 rgb 0] [0.001 rgb 1]} translate
-1.1*y}
        }
    }
}


object {DistinctSpheres translate -2*x}
object {UnionedSpheres translate 2*x}


Post a reply to this message


Attachments:
Download '2mediatest.png' (19 KB)

Preview of image '2mediatest.png'
2mediatest.png


 

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