POV-Ray : Newsgroups : povray.newusers : Transparent Round_Box has many artifacts : Re: Transparent Round_Box has many artifacts Server Time
18 May 2024 06:03:01 EDT (-0400)
  Re: Transparent Round_Box has many artifacts  
From: Alain Martel
Date: 23 Feb 2024 11:03:11
Message: <65d8c1bf$1@news.povray.org>
Le 2024-02-23 à 04:38, ceving a écrit :
> I tried to create a transparent cylinder with spherical ends. I used Round_Box,
> but I get many strange artifacts. I am not sure why. Can anybody explain why or
> how I can produce this object in another way?
> 
> This is what I have done:
> 
> #version 3.7;
> #include "colors.inc"
> #include "shapes.inc"
> global_settings {
>   assumed_gamma 0.4
> }
> background { colour srgbt <0.0, 0.0, 0.0, 1.0> }
> camera {
>    location <0, 5, 0>
>    look_at  <0, -1, 0>
> }
> 
> #declare pA = <-1.5,  0, -0.5>;  // A corner
> #declare pB = <+1.5, -1, +0.5>;  // The opposite corner
> #declare EdgeAndcornerRadius = 0.5;
> #declare UseMerge = false;
> 
> object {
>    Round_Box(pA, pB, EdgeAndcornerRadius, UseMerge)
>    texture {
>      pigment { color srgbt <0.0, 0.0, 0.0, 0.5> }
>    }
>    finish {
>      ambient .1
>      diffuse .3
>      specular 1
>      roughness .01
>      metallic
>      reflection {
>        .75
>        metallic
>      }
>    }
> }


Instead of Round_Box, you should use the Round_Cylinder for what you 
want to do here.
As Bald Eagle mentioned, you need to use
#declare UseMerge = true;
With UseMerge = false, the inner surfaces are still there. Perfect when 
the object is opaque, bad for any transparent object. merge remove the 
internal surfaces.

Unless you start with a colour from a colour picker or an external 
source, you should use rgbt instead of srgbt.
Why use assumed_gamma 0.4 ?
To have consistent results, you should use assumed_gamma 1.

Round_Cylinder(EndA, EndB, Radius, EdgeRadius, UseMerge)


Post a reply to this message

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