POV-Ray : Newsgroups : povray.newusers : Emitting objects masked by trasnparent ones. Server Time: 27 Jun 2019 04:00:28 GMT
  Emitting objects masked by trasnparent ones. (Message 1 to 5 of 5)  
From: EdR
Subject: Emitting objects masked by trasnparent ones.
Date: 16 May 2016 16:25:00
Message: <web.5739f353c23a6d9cb2407280@news.povray.org>
Hi,

I'm having a problem rendering emitting objects, where transparent objects seem
to be blocking the light from others behind.

It can be seen in the minimal code (part of a larger scene) below and in this
render https://www.dropbox.com/s/fki0av19wjwnbvu/minimal_bug_example.png?dl=0

The left hand cylinder seems to obscure the right hand one, and I can't work out
why. Can anyone help?

Thanks!

----
#include "colors.inc"
camera {
  location <15,0,40>
  look_at <5,0,0>
  angle 45
}

//background
background { color Black }

#declare thick = 1.5;
union {
  #for (ii, 8, 9)
    cylinder{
      (ii*thick*x), (((ii+1)*thick*x)-0.000001), 1
      pigment { Clear }
      hollow

      interior {
        media {
          emission White * 0.03
        }
      }
    scale <1,12.4,12.4>
    }
  #end
}
----


Post a reply to this message

From: green
Subject: Re: Emitting objects masked by trasnparent ones.
Date: 16 May 2016 16:55:00
Message: <web.5739fa8f352152539c083ab80@news.povray.org>
"EdR" <nomail@nomail> wrote:
> Hi,
>
> I'm having a problem rendering emitting objects, where transparent objects seem
> to be blocking the light from others behind.
>
> It can be seen in the minimal code (part of a larger scene) below and in this
> render https://www.dropbox.com/s/fki0av19wjwnbvu/minimal_bug_example.png?dl=0
>
> The left hand cylinder seems to obscure the right hand one, and I can't work out
> why. Can anyone help?
>
> Thanks!
>
> ----
> #include "colors.inc"
> camera {
>   location <15,0,40>
>   look_at <5,0,0>
>   angle 45
> }
>
> //background
> background { color Black }
>
> #declare thick = 1.5;
> union {
>   #for (ii, 8, 9)
>     cylinder{
>       (ii*thick*x), (((ii+1)*thick*x)-0.000001), 1
>       pigment { Clear }
>       hollow
>
>       interior {
>         media {
>           emission White * 0.03
>         }
>       }
>     scale <1,12.4,12.4>
>     }
>   #end
> }
> ----

maybe not related, but did you realize -0.000001 is -0.000001*<1,1,1> ?


Post a reply to this message

From: scott
Subject: Re: Emitting objects masked by trasnparent ones.
Date: 17 May 2016 10:51:39
Message: <573af7bb$1@news.povray.org>
> Hi,
>
> I'm having a problem rendering emitting objects, where transparent objects seem
> to be blocking the light from others behind.
>
> It can be seen in the minimal code (part of a larger scene) below and in this
> render https://www.dropbox.com/s/fki0av19wjwnbvu/minimal_bug_example.png?dl=0
>
> The left hand cylinder seems to obscure the right hand one, and I can't work out
> why. Can anyone help?

Seems to be a coincident surface/numeric accuracy issue, try changing 
your 0.0000001 offset to 0.001 instead, that fixed it for me. And as 
already mentioned, you probably meant 0.001*x


Post a reply to this message

From: William F Pokorny
Subject: Re: Emitting objects masked by trasnparent ones.
Date: 17 May 2016 11:17:33
Message: <573afdcd$1@news.povray.org>
On 05/16/2016 12:22 PM, EdR wrote:
> Hi,
>
> I'm having a problem rendering emitting objects, where transparent objects seem
> to be blocking the light from others behind.
>
> It can be seen in the minimal code (part of a larger scene) below and in this
> render https://www.dropbox.com/s/fki0av19wjwnbvu/minimal_bug_example.png?dl=0
>
> The left hand cylinder seems to obscure the right hand one, and I can't work out
> why. Can anyone help?
>
> Thanks!
>
> ----
> #include "colors.inc"
> camera {
>    location <15,0,40>
>    look_at <5,0,0>
>    angle 45
> }
>
> //background
> background { color Black }
>
> #declare thick = 1.5;
> union {
>    #for (ii, 8, 9)
>      cylinder{
>        (ii*thick*x), (((ii+1)*thick*x)-0.000001), 1
>        pigment { Clear }
>        hollow
>
>        interior {
>          media {
>            emission White * 0.03
>          }
>        }
>      scale <1,12.4,12.4>
>      }
>    #end
> }
> ----
>
>
>
>

I believe you are running into an internal a numerical cut off in the 
media sampling code(1). If you increase the overlap between cylinders, 
things work in my tests.

In addition, it would be more normal to use a merge (which eliminates 
internal boundaries) when using media or transparency vs a union - but 
maybe you want some different effect. The pigment and hollow can also be 
applied to the entire merge/union instead of each cylinder when they are 
identical.

My version of your code following some of the advice above :

   merge {
   //cylinder{ (1.5*x), ((3.0*x)-0.000001), 1 pigment { Red } }
   //cylinder{ (3.0*x), ((4.5*x)-0.000001), 1 pigment { Green } }
   //cylinder{ (1.5*x), ((3.0*x)-0.00001), 1 pigment { Clear } } // Fail
   //cylinder{ (3.0*x), ((4.5*x)-0.00001), 1 pigment { Clear } }
     cylinder{ (1.5*x), ((3.0*x)-0.0001), 1 pigment { Clear } } // OK
     cylinder{ (3.0*x), ((4.5*x)-0.0001), 1 pigment { Clear } }
     hollow

     interior {
       media {
         emission White * 0.03
       }
     }
   //scale <1,12.4,12.4>
   }

Bill P.

(1) - How individual rays move through the shapes likely will also 
affect where this accuracy / cut off issue is seen. As would, I expect, 
changing the media sampling criteria.


Post a reply to this message

From: EdR
Subject: Re: Emitting objects masked by trasnparent ones.
Date: 17 May 2016 12:05:01
Message: <web.573b087f35215253cb2407280@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 05/16/2016 12:22 PM, EdR wrote:
> > Hi,
> >
> > I'm having a problem rendering emitting objects, where transparent objects seem
> > to be blocking the light from others behind.
> >
> > It can be seen in the minimal code (part of a larger scene) below and in this
> > render https://www.dropbox.com/s/fki0av19wjwnbvu/minimal_bug_example.png?dl=0
> >
> > The left hand cylinder seems to obscure the right hand one, and I can't work out
> > why. Can anyone help?
> >
> > Thanks!
> >
> > ----
> > #include "colors.inc"
> > camera {
> >    location <15,0,40>
> >    look_at <5,0,0>
> >    angle 45
> > }
> >
> > //background
> > background { color Black }
> >
> > #declare thick = 1.5;
> > union {
> >    #for (ii, 8, 9)
> >      cylinder{
> >        (ii*thick*x), (((ii+1)*thick*x)-0.000001), 1
> >        pigment { Clear }
> >        hollow
> >
> >        interior {
> >          media {
> >            emission White * 0.03
> >          }
> >        }
> >      scale <1,12.4,12.4>
> >      }
> >    #end
> > }
> > ----
> >
> >
> >
> >
>
> I believe you are running into an internal a numerical cut off in the
> media sampling code(1). If you increase the overlap between cylinders,
> things work in my tests.
>
> In addition, it would be more normal to use a merge (which eliminates
> internal boundaries) when using media or transparency vs a union - but
> maybe you want some different effect. The pigment and hollow can also be
> applied to the entire merge/union instead of each cylinder when they are
> identical.
>
> My version of your code following some of the advice above :
>
>    merge {
>    //cylinder{ (1.5*x), ((3.0*x)-0.000001), 1 pigment { Red } }
>    //cylinder{ (3.0*x), ((4.5*x)-0.000001), 1 pigment { Green } }
>    //cylinder{ (1.5*x), ((3.0*x)-0.00001), 1 pigment { Clear } } // Fail
>    //cylinder{ (3.0*x), ((4.5*x)-0.00001), 1 pigment { Clear } }
>      cylinder{ (1.5*x), ((3.0*x)-0.0001), 1 pigment { Clear } } // OK
>      cylinder{ (3.0*x), ((4.5*x)-0.0001), 1 pigment { Clear } }
>      hollow
>
>      interior {
>        media {
>          emission White * 0.03
>        }
>      }
>    //scale <1,12.4,12.4>
>    }
>
> Bill P.
>
> (1) - How individual rays move through the shapes likely will also
> affect where this accuracy / cut off issue is seen. As would, I expect,
> changing the media sampling criteria.

Hi,

Thanks to you all. I did, indeed mean to have 0.000001 inside the bracket, but
the main issue was that 0.000001 was too small. It works fine with 0.001 as
suggested.

Thanks for all your help,
Ed


Post a reply to this message

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