POV-Ray : Newsgroups : povray.newusers : Black spots in my glass Server Time
28 Nov 2024 03:35:10 EST (-0500)
  Black spots in my glass (Message 1 to 9 of 9)  
From: Hershel Robinson
Subject: Black spots in my glass
Date: 6 Sep 2001 05:02:13
Message: <3b973b95@news.povray.org>
I am working on a simple image, with a light blue background and a union of
interconnected glass balls and cylinders in the foreground.  It is almost
exactly what I want, but there is one problem.  At almost all of the
connections of the cylinders to the spheres, I am seeing black.

How can I fix this?  By the way, I can not move the camera, nor change the
background much--this image is being used for a web page.

Furthermore, I need to translate this image into a GIF so I can have an
invisible background, so I am using +FN8 in the command line options
(Windows version) which I believe creates a 256 color image which can be
transformed into a GIF without destroying it.  That part, anyhow, seems to
be working.

I am using a glass texture and then a glass-like finish over it simply
because that created the effect I want--I want the glass parts to appear
almost translucent.  This is the background for a web page, so I want it
very subtle.  Mind you, however, I am a newbie with POV-Ray and actually
have no idea what I am doing.  I just put the finish in there and it looked
good, so I left it. :)

Thanks,
Hershel

PS: Here is my code (there is more to it than this, but this is enough to
see the problem):

#include "colors.inc"
#include "glass.inc"

light_source

  <-100, 00, 0>
//  color Blue * Intensity
  color White   shadowless
}

#declare SphiraCamera = camera { location <0,-1.5,-18>
                      look_at <0,-1.5,0>
}

camera {SphiraCamera}

plane { z , 2
      pigment{rgb <.7,1,1>}
      finish {
         diffuse 1
         ambient 1
      }
}

#declare sphira =
   sphere { <0,0,0>,1
}
#declare Width=6;
merge {
   // keter
   object {
      sphira
      translate 6*y
   }
   cylinder {
      <0,6,0>, <-1*Width,4,0>, .2
   }
   cylinder {
      <0,6,0>, <Width,4,0>, .2
   }
   cylinder {
      <0,6,0>, <0,-9,0>, .2
   }
   // bina
   object {
      sphira
      translate <-1*Width,4>
   }
   cylinder {
      <-1*Width,4,0>, <Width,4,0>, .2
   }
   cylinder {
      <-1*Width,4,0>, <Width,1,0>, .2
   }
   cylinder {
      <-1*Width,4,0>, <-1*Width,1,0>, .2
   }
   cylinder {
      <-1*Width,4,0>, <0,-1,0>, .2
   }
   // chochma
   object {
      sphira
      translate <Width,4>
   }
   cylinder {
      <Width,4,0>, <Width,1,0>, .2
   }
   cylinder {
      <Width,4,0>, <-1*Width,1,0>, .2
   }
   cylinder {
      <Width,4,0>, <0,-1,0>, .2
   }

   texture {T_Glass3}
   interior{ I_Glass}
   finish {
      ambient 0.6
      diffuse 0.1
      reflection .2345
      specular 1
      roughness .001
   }
}


Post a reply to this message

From: Ken
Subject: Re: Black spots in my glass
Date: 6 Sep 2001 06:17:21
Message: <3B974E0F.AD20B01C@pacbell.net>
Hershel Robinson wrote:
> 
> I am working on a simple image, with a light blue background and a union of
> interconnected glass balls and cylinders in the foreground.  It is almost
> exactly what I want, but there is one problem.  At almost all of the
> connections of the cylinders to the spheres, I am seeing black.
> 
> How can I fix this?  By the way, I can not move the camera, nor change the
> background much--this image is being used for a web page.

> PS: Here is my code (there is more to it than this, but this is enough to
> see the problem):

Add the following line to your code:

global_settings { max_trace_level 15 }
 
#include "colors.inc"
#include "glass.inc"

etc...

-- 
Ken Tyler


Post a reply to this message

From: Hershel Robinson
Subject: Re: Black spots in my glass
Date: 6 Sep 2001 06:40:17
Message: <3b975291@news.povray.org>
"Ken" <tyl### [at] pacbellnet> wrote"
> Add the following line to your code:
>
> global_settings { max_trace_level 15 }
>
> #include "colors.inc"
> #include "glass.inc"
>
> etc...

Thanks for writing.

This took care of the black spots at the connection points, but I still have
black spots on the spheres between the connection points of the cylinders to
the spheres.  Maybe a little laundry detergent would take out these spots?

Hershel


Post a reply to this message

From: Warp
Subject: Re: Black spots in my glass
Date: 6 Sep 2001 07:43:04
Message: <3b976148@news.povray.org>
Could it be a coincident surfaces problem?

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Hershel Robinson
Subject: Re: Black spots in my glass
Date: 6 Sep 2001 09:21:06
Message: <3b977842@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3b976148@news.povray.org...
>   Could it be a coincident surfaces problem?

Definitely not.  The cylinders all end in exactly the middle of the spheres.
The spheres are radius 1 and the cylinders are radius 0.2 so the end-planes
of the cylinders are nowhere near the surface of the spheres.

Hershel


Post a reply to this message

From: Ron Parker
Subject: Re: Black spots in my glass
Date: 6 Sep 2001 09:27:58
Message: <slrn9peuev.voj.ron.parker@fwi.com>
On Thu, 6 Sep 2001 12:04:52 +0200, Hershel Robinson wrote:
>Furthermore, I need to translate this image into a GIF so I can have an
>invisible background, so I am using +FN8 in the command line options
>(Windows version) which I believe creates a 256 color image which can be
>transformed into a GIF without destroying it.  That part, anyhow, seems to
>be working.

Actually, +fn8 outputs a 24-bit-per-pixel (8-bit-per-component) PNG, so it
won't go directly to GIF without some sort of color reduction.  There is no
way to output an image of less than 15 bits per pixel from POV-Ray, so you'll
have to do some color reduction in any case.  This isn't as bad as it 
appears, however, as dedicated programs are more likely to be able to do 
sophisticated color reduction with access to the whole image than POV can
do looking at the image on a pixel-by-pixel basis.

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Ken
Subject: Re: Black spots in my glass
Date: 6 Sep 2001 09:34:28
Message: <3B977C43.DCAAE97F@pacbell.net>
Hershel Robinson wrote:
> 
> "Warp" <war### [at] tagpovrayorg> wrote in message
> news:3b976148@news.povray.org...
> >   Could it be a coincident surfaces problem?
> 
> Definitely not.  The cylinders all end in exactly the middle of the spheres.
> The spheres are radius 1 and the cylinders are radius 0.2 so the end-planes
> of the cylinders are nowhere near the surface of the spheres.
> 
> Hershel

I will guess that what you are seeing is self shadowing.
Try adding -  no_shadow - to the end of you object and
you will see the black spots dissapear before your eyes.

-- 
Ken Tyler


Post a reply to this message

From: Tom Melly
Subject: Re: Black spots in my glass
Date: 6 Sep 2001 10:11:40
Message: <3b97841c$1@news.povray.org>
"Hershel Robinson" <her### [at] yahoocom> wrote in message
news:3b977842@news.povray.org...

<snip>

I'm not entirely sure that there is a problem (well, once the appropriate
max_trace_level is set).

Could you not just be seeing appropriate behaviour of refractive material? Such
dark areas happen in RealLife (tm) IIRC. I assume that this is nothing to do
with the Matrix not setting an appropriate max_trace_level or similiar.

BTW

plane { -z , -2

rather than

plane { z , 2

will get rid of a warning message (currently you are inside your plane).


Post a reply to this message

From: IFICKIT
Subject: Re: Black spots in my glass
Date: 10 Mar 2002 03:59:52
Message: <3c8b2088@news.povray.org>
At almost all of the
> connections of the cylinders to the spheres, I am seeing black.



hey man here's a thought what you are seeing is the top of the sphere and
cylinder

a "difference"  will fix this {"note that you'll have to double all
cylinders to get them to show "}ie the origanal
will then be just holes in the spheres.

any one with an e-z way to say this speak up!


Post a reply to this message

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