POV-Ray : Newsgroups : povray.newusers : Newbie gets lots of black pixels on nested spheres Server Time
1 Nov 2024 14:19:53 EDT (-0400)
  Newbie gets lots of black pixels on nested spheres (Message 1 to 7 of 7)  
From: JEofVA
Subject: Newbie gets lots of black pixels on nested spheres
Date: 1 Jul 2008 17:05:01
Message: <web.486a9b1613f6a9318a187d850@news.povray.org>
As the Subject says, I'm very new at this, and not sure what I'm doing wrong.
The image I am trying to render is one of a sphere of nested multi colored
spheres with a wedge removed to reveal the inner layers. I get what I think I'm
suppose to get, except the inner spheres are speckled with lots of black pixels.

I read the piece about coincident surfaces causing this effect, but if that is
what the problem is, I don't know what surface needs moving.

Can anyone tell me what I've done wrong?

Jonathan
---------------------

Here's my .pov file contents:

  #include "colors.inc"
  camera
  {
    location <0, 10, -20>
    look_at 0
  }
  light_source
  {
    <30, 20, -30>
    color White
    spotlight
    radius 15
    falloff 20
    tightness 10
    point_at <0, 0, 0>
  }
  #declare Crust = difference
  {
    sphere
    {
      <0, 0, 0>, 10
      pigment {Blue}
    }
    box
    {
      <0, 0, 0>, <10, 10, -10>
      pigment {Blue}
    }
  }
  #declare Mantle = difference
  {
    sphere
    {
      <0, 0, 0>, 9.5
      pigment {Brown}
    }
    box
    {
      <0, 0, 0>, <9.5, 9.5, -9.5>
      pigment {Brown}
    }
  }
  #declare OuterCore = difference
  {
    sphere
    {
      <0, 0, 0>, 6
      pigment {Yellow}
    }
    box
    {
      <0, 0, 0>, <6, 6, -6>
      pigment {Yellow}
    }
  }
  #declare InnerCore = difference
  {
    sphere
    {
      <0, 0, 0>, 3
      pigment {Red}
    }
    box
    {
      <0, 0, 0>, <3, 3, -3>
      pigment {Red }
    }
  }
  #declare NestedSpheres  = merge
  {
    object {InnerCore}
    object {OuterCore}
    object {Mantle}
    object {Crust}
  }
  object
  {
    NestedSpheres
    rotate y*30
    rotate x*-10
  }


Post a reply to this message

From: Chris B
Subject: Re: Newbie gets lots of black pixels on nested spheres
Date: 1 Jul 2008 17:34:08
Message: <486aa2d0$1@news.povray.org>
"JEofVA" <jce### [at] attglobalnet> wrote in message 
news:web.486a9b1613f6a9318a187d850@news.povray.org...
> As the Subject says, I'm very new at this, and not sure what I'm doing 
> wrong.

Welcome to the newsgroup.

> The image I am trying to render is one of a sphere of nested multi colored
> spheres with a wedge removed to reveal the inner layers. I get what I 
> think I'm
> suppose to get, except the inner spheres are speckled with lots of black 
> pixels.

This sounds like a very similar problem to the one discussed a couple of 
weeks ago in the thread 
http://news.povray.org/povray.newusers/thread/%3Cweb.48513efe78241c82b979a58c0%40news.povray.org%3E/

>
> I read the piece about coincident surfaces causing this effect, but if 
> that is
> what the problem is, I don't know what surface needs moving.
>

I think it is indeed coincident surfaces. The cut surfaces of your Crust, 
Mantle, OuterCore and InnerCore all align exactly.

Two alternative solutions are mentioned in the thread above. One is to 
'difference' the next smaller sphere from each larger sphere (Subtract the 
Mantle sphere from the Crust, the OuterCore sphere from the Mantle and the 
InnerCore sphere from the OuterCore). The second is to just have one sphere 
and use a color_map to give the shells different colours.

In this case there is also a simple third option and that is to move the 
corner of the box that you are using to slice out the segments. If the Crust 
box starts at <0,0,0> you can use 0.00001*<1,1,-1> for the Mantle box, 
0.00002*<1,1,-1> for the OuterCore box and 0.00003*<1,1,-1> for the 
InnerCore box. This tiny difference is enough to make sure that the cut 
surfaces are no longer coincident.

Regards,
Chris B.


Post a reply to this message

From: Stephen
Subject: Re: Newbie gets lots of black pixels on nested spheres
Date: 1 Jul 2008 17:40:31
Message: <4r8l64l98b3ku8p7m3hraho2rq982u26hh@4ax.com>
On Tue,  1 Jul 2008 17:01:10 EDT, "JEofVA" <jce### [at] attglobalnet>
wrote:

>As the Subject says, I'm very new at this, and not sure what I'm doing wrong.
>The image I am trying to render is one of a sphere of nested multi colored
>spheres with a wedge removed to reveal the inner layers. I get what I think I'm
>suppose to get, except the inner spheres are speckled with lots of black pixels.
>
>I read the piece about coincident surfaces causing this effect, but if that is
>what the problem is, I don't know what surface needs moving.
>
>Can anyone tell me what I've done wrong?
>
Increase the max_trace_level in global settings

 global_settings { max_trace_level NN}

Read 3.3.3.7  Max_Trace_Level in the help
-- 

Regards
     Stephen


Post a reply to this message

From: Chris B
Subject: Re: Newbie gets lots of black pixels on nested spheres
Date: 1 Jul 2008 18:03:01
Message: <486aa995$1@news.povray.org>
"Stephen" <mcavoysAT@aolDOTcom> wrote in message 
news:4r8l64l98b3ku8p7m3hraho2rq982u26hh@4ax.com...
> Increase the max_trace_level in global settings

I don't think it's that because there are no reflective or transparent 
surfaces in the SDL that Jonathan listed.

Jonathan, for future reference, if you add anything important below your 
signature it's a good idea to refer to it above your signature, otherwise 
people are likely to stop reading once they hit your signature.

Regards,
Chris B.
--------

See! There's nothing down here worth reading :-)


Post a reply to this message

From: Stephen
Subject: Re: Newbie gets lots of black pixels on nested spheres
Date: 1 Jul 2008 18:23:24
Message: <7hbl64pp9bstji9ttlegs18j0pj594l9sa@4ax.com>
On Tue, 1 Jul 2008 23:03:00 +0100, "Chris B" <nom### [at] nomailcom>
wrote:

>
>"Stephen" <mcavoysAT@aolDOTcom> wrote in message 
>news:4r8l64l98b3ku8p7m3hraho2rq982u26hh@4ax.com...
>> Increase the max_trace_level in global settings
>
>I don't think it's that because there are no reflective or transparent 
>surfaces in the SDL that Jonathan listed.
>
>Jonathan, for future reference, if you add anything important below your 
>signature it's a good idea to refer to it above your signature, otherwise 
>people are likely to stop reading once they hit your signature.
>

Well this one did :)

>Regards,
>Chris B.
>--------
>
>See! There's nothing down here worth reading :-) 
>
I don't know about that ;)
-- 

Regards
     Stephen


Post a reply to this message

From: JEofVA
Subject: Re: Newbie gets lots of black pixels on nested spheres
Date: 1 Jul 2008 21:35:00
Message: <web.486ada99de595f198a187d850@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:
> "JEofVA" <jce### [at] attglobalnet> wrote in message
> news:web.486a9b1613f6a9318a187d850@news.povray.org...
> > As the Subject says, I'm very new at this, and not sure what I'm doing
> > wrong.
>
> Welcome to the newsgroup.
>
> > The image I am trying to render is one of a sphere of nested multi colored
> > spheres with a wedge removed to reveal the inner layers. I get what I
> > think I'm
> > suppose to get, except the inner spheres are speckled with lots of black
> > pixels.
>
> This sounds like a very similar problem to the one discussed a couple of
> weeks ago in the thread
>
http://news.povray.org/povray.newusers/thread/%3Cweb.48513efe78241c82b979a58c0%40news.povray.org%3E/
>
> >
> > I read the piece about coincident surfaces causing this effect, but if
> > that is
> > what the problem is, I don't know what surface needs moving.
> >
>
> I think it is indeed coincident surfaces. The cut surfaces of your Crust,
> Mantle, OuterCore and InnerCore all align exactly.
>
> Two alternative solutions are mentioned in the thread above. One is to
> 'difference' the next smaller sphere from each larger sphere (Subtract the
> Mantle sphere from the Crust, the OuterCore sphere from the Mantle and the
> InnerCore sphere from the OuterCore). The second is to just have one sphere
> and use a color_map to give the shells different colours.
>
> In this case there is also a simple third option and that is to move the
> corner of the box that you are using to slice out the segments. If the Crust
> box starts at <0,0,0> you can use 0.00001*<1,1,-1> for the Mantle box,
> 0.00002*<1,1,-1> for the OuterCore box and 0.00003*<1,1,-1> for the
> InnerCore box. This tiny difference is enough to make sure that the cut
> surfaces are no longer coincident.
>
> Regards,
> Chris B.

Chris,

I tried your "simple third option" and it worked.  I'm still not precisely sure
why it worked, but I will mull it over until I get it.  I understand what you
did, just not how it made a difference.  I guess I'm not fully understanding
this coincident surface thing.

But, thank for the help... oh, and I'll try to remember not to write below my
signature from now on.

Jonathan
-----------


Post a reply to this message

From: Chris B
Subject: Re: Newbie gets lots of black pixels on nested spheres
Date: 2 Jul 2008 03:07:59
Message: <486b294f$1@news.povray.org>
"JEofVA" <jce### [at] attglobalnet> wrote in message 
news:web.486ada99de595f198a187d850@news.povray.org...
> "Chris B" <nom### [at] nomailcom> wrote:
>> "JEofVA" <jce### [at] attglobalnet> wrote in message
> I guess I'm not fully understanding
> this coincident surface thing.
>

Yes. It's one of those things where, if you read enough different 
explanations it can suddenly all make sense.

If you have two objects (or in this case two components of the 
'NestedSpheres' object) where some of the overlapping surfaces align 
perfectly, then, when a ray that POV-Ray traces out from the camera hits 
this overlapping surface it sometimes hits one of them first and sometimes 
the other, giving an unpredictable mixture of their colours. In this 
instance the box shaped cutout caused the exposed internal surfaces of your 
spheres to align perfectly. Indeed the entire cutout surface of the 
innermost sphere aligned with the cut surfaces of all of the other 3 
spheres.

In real life this wouldn't happen because you'd have to carve a hollow out 
from inside the first sphere to be able to get the second one in, so by the 
time you sliced a corner out you'd only be cutting down through one of the 
two spheres at a time. Otherwise it's as if the crust could continue all the 
way to the centre of the earth with the inner layers also occupying the same 
3D space which would be impossible.

By moving the corner of the box that's doing the cutting slightly when 
cutting away the different spheres, you avoid the coincident surfaces. In 
this instance you need to move it away from the origin towards the opposite 
corner of the box as you cut into the progressively smaller spheres so that 
the cut surfaces of the smaller spheres stand proud of the cut surfaces of 
all larger spheres. If you expand the corner in the opposite direction you'd 
also avoid coincident surfaces, but the cut surfaces of the smaller spheres 
would be burried inside the larger one so you'd only see the crust.

I hope that helps, otherwise a google on "povray coincident surfaces": 
http://www.google.com/search?q=povray+coincident+surfaces gives links to 
various slightly different explanations and discussions that may help.

Regards,
Chris B.


Post a reply to this message

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