POV-Ray : Newsgroups : povray.newusers : Problem with the simplest shapes Server Time
30 Jul 2024 00:23:21 EDT (-0400)
  Problem with the simplest shapes (Message 1 to 6 of 6)  
From: jkVogel
Subject: Problem with the simplest shapes
Date: 4 Feb 2005 16:30:00
Message: <web.4203e88a93656e605087354c0@news.povray.org>
I'm making a bottle. It looks like glass of course. And I have a problem -
the part of the bottle between its wide and narrow cylinders (actually
difference of two cones) looks like very strange. It seems to be not
transparent at all. In addition its color is blue while the color of bottle
is gray. Whats my fault?
The code of the bottle:

union {
  difference {
    cylinder {
      <0, 0, 0>, <0, 2, 0>, 0.5
    }
    cylinder {
      <0, 0.1, 0>, <0, 2.1, 0>, 0.45
    }
  }
// problem place starts...
  difference {
    cone {
      <0, 2, 0>, 0.5, <0, 2.5, 0>, 0.2
    }
    cone {
      <0, 1.9, 0>, 0.51, <0, 2.6, 0>, 0.09
    }
  }
// ... ends
  difference {
    cylinder {
      <0, 2.5, 0>, <0, 3, 0>, 0.2
    }
    cylinder {
      <0, 2.4, 0>, <0, 3.1, 0>, 0.15
    }
  }
  texture {
    pigment {
    color rgbf <0.95, 0.95, 0.95, 0.92>
    }
    finish {
      ambient 0.05
      diffuse 0.05
      reflection 0.2
      specular 0.2
      roughness 0.005
    }
  }
  interior {
    ior 1.5
  }
  translate <-1, 1, 0.5>
}


Post a reply to this message

From: Neil Kolban
Subject: Re: Problem with the simplest shapes
Date: 4 Feb 2005 16:53:29
Message: <4203eed9@news.povray.org>
I didn't render your code so don't know for sure that this is the problem 
but ... instead of using the "union" construct, try using the "merge" 
construct.  Consult the POV-Ray documentation for the difference between 
"union" and "merge".

Neil


Post a reply to this message

From: Jim Charter
Subject: Re: Problem with the simplest shapes
Date: 4 Feb 2005 17:21:25
Message: <4203f565$1@news.povray.org>
jkVogel wrote:
> I'm making a bottle. It looks like glass of course. And I have a problem -
> the part of the bottle between its wide and narrow cylinders (actually
> difference of two cones) looks like very strange. It seems to be not
> transparent at all. In addition its color is blue while the color of bottle
> is gray. Whats my fault?
> The code of the bottle:
> 
> union {
>   difference {
>     cylinder {
>       <0, 0, 0>, <0, 2, 0>, 0.5
>     }
>     cylinder {
>       <0, 0.1, 0>, <0, 2.1, 0>, 0.45
>     }
>   }
> // problem place starts...
>   difference {
>     cone {
>       <0, 2, 0>, 0.5, <0, 2.5, 0>, 0.2
>     }
>     cone {
>       <0, 1.9, 0>, 0.51, <0, 2.6, 0>, 0.09
>     }
>   }
> // ... ends
>   difference {
>     cylinder {
>       <0, 2.5, 0>, <0, 3, 0>, 0.2
>     }
>     cylinder {
>       <0, 2.4, 0>, <0, 3.1, 0>, 0.15
>     }
>   }
>   texture {
>     pigment {
>     color rgbf <0.95, 0.95, 0.95, 0.92>
>     }
>     finish {
>       ambient 0.05
>       diffuse 0.05
>       reflection 0.2
>       specular 0.2
>       roughness 0.005
>     }
>   }
>   interior {
>     ior 1.5
>   }
>   translate <-1, 1, 0.5>
> }
> 
> 
Without texting I notice two things:

Use merge instead of union with transparent csg

and the cones difference looks a little inside out

maybe use:
    difference {
      cone {
        <0, 2, 0>, 0.5, <0, 2.5, 0>, 0.2

      }
      cone {
        <0, 1.99, 0>, 0.45, <0, 2.51, 0>, 0.15

      }
    }


Post a reply to this message

From: jkVogel
Subject: Re: Problem with the simplest shapes
Date: 5 Feb 2005 05:40:00
Message: <web.4204a2464fdd1c116e720d780@news.povray.org>
Jim Charter <jrc### [at] msncom> wrote:
> Use merge instead of union with transparent csg

I've done it. And I got the same result.

> and the cones difference looks a little inside out

It's mistaken opinion. I'd calculated all numbers before making the SDL
code.

It seems to me I've solved my problem. It's, possible, the background
reflection. But it's not good. Objects maked from glass must reflect, don't
they? And they do. At the same time final picture don't looks... realistic.
Thanks for help anyway.


Post a reply to this message

From: Alain
Subject: Re: Problem with the simplest shapes
Date: 5 Feb 2005 10:01:51
Message: <4204dfdf$1@news.povray.org>
jkVogel nous apporta ses lumieres en ce 2005-02-05 05:39:

> It seems to me I've solved my problem. It's, possible, the background
> reflection. But it's not good. Objects maked from glass must reflect, don't
> they? And they do. At the same time final picture don't looks... realistic.
> Thanks for help anyway.
> 
> 
Glass objects do reflect somewhat, a little at sharp angle, strongly at very shalow
angle. Generaly, 
the best way is to use variable reflection with fresnel on and conserve_energy.
The problem is that you have an angle and the reflection jump sudently fron something
near the 
horizontal, to something almost straight up.
You may try using a lathe object. Read the documentation entry 3.4.1.7  Lathe

Alain


Post a reply to this message

From: jkVogel
Subject: Re: Problem with the simplest shapes
Date: 5 Feb 2005 13:55:00
Message: <web.420515e84fdd1c113a5123f50@news.povray.org>
Alain, thanks a lot for the "lathe"! I've tryed to use "sor", but I've got a
bad result. Now it looks the same, but it was easier to create. Thank you.
Anyway my problem remains unsolved. However, the variable reflaction and
the understanding of the heart of the problem helps me. It's the real world
view (with the "Cyan" sky) in spite of unrealistic picture.


Post a reply to this message

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