POV-Ray : Newsgroups : povray.newusers : Dodgy Wine Glass : Re: Dodgy Wine Glass Server Time
29 Jul 2024 12:30:05 EDT (-0400)
  Re: Dodgy Wine Glass  
From: Chris B
Date: 6 Dec 2005 07:19:07
Message: <439581bb$1@news.povray.org>
"nzdzeni" <nzd### [at] gmailcom> wrote in message 
news:web.4395545b90f42f19b2fe0630@news.povray.org...
> Hi Warp,
>
> Thanks for the sturm tip.  It gets rid of the noise beautifully but the
> shadow of the glass is still wrong.  This bothers me a lot as the shadow
> should match the image that casts it.
>
> PM 2,
>
> I commented out the planes to see if that would get rid of the noise and
> interstingly, it didn't!  Which would imply that the planes are not the
> problem.
>
> So, that leaves me still looking for answers to the noise / dodgy shadow
> problem.
>
> Thanks for all the input so far.
>
> G-d Bless
> Dzeni :)
> http://www.dzeni.blogspot.com
>
>

As well as what Warp said, there are also quite a few other things wrong 
with your SDL, some of which also distort the shadows.
Your texture and pigment definitions seem to me to be in the wrong places, 
so the texture definition of the glass is applied on top of the White 
pigment you seem to want for the content. The planes used to slice off the 
top and bottom of the content don't have any pigment, so will be black.
Also the scaling that you use for the content w.r.t. the glass is not 
centred on the origin so will move the content down a little, with the 
danger of giving you coincident or overlaping surfaces.
The message stream shows a max_trace_level reached warning and another about 
the glass texture you've chosen.

The following SDL shows where I would put the pigment and texture 
statements, and I think it probably gets over quite a few of your shadow 
problems:
Regards,
Chris B.


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

camera {
  location <0, 8, -20>
  look_at <0, 0, 0>
  angle 50
}

background { color Silver }

light_source {
  0*x                  // light's position (translated below)
  color rgb <1,1,1>    // light's color
  translate <50, 50, -30>
}

plane {
  <0, 1, 0>, -4
  pigment {color LightBlue }
  finish{reflection .2}
}

//Wine Glass
#declare Wine_Glass= sor {
  12,
  <0.0,  -0.5>,
  <2.0,   0.1>,
  <0.2,   0.15>,
  <0.2,   0.18>,
  <0.2,   1.0>,
  <0.2,   2.0>,
  <0.2,   3.0>,
  <0.2,   4.0>,
  <0.4,   4.4>,
  <2.0,   6.0>,
  <1.5,   8.5>,
  <2,   10.0>
  open
  sturm
}


#declare Red_Wine = intersection {
  object {Wine_Glass
    translate -7*y
    scale .9
    translate 7*y
    translate <0, 0.001, 0>
  }
  plane {-y,-4.5}
  plane { y, 0 rotate z*30 rotate -x*30 translate 7*y}  // or plane {y,7}
  pigment {color Red+0.5*t}
}

object {Red_Wine
  translate <0, -2, 0>
  rotate <30, 0, -30>
}

object {Wine_Glass
  texture {
    T_Glass3    // Pre-defined from glass.inc
    scale 3
  }
  translate <0, -2, 0>
  rotate <30, 0, -30>
}


Post a reply to this message

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