POV-Ray : Newsgroups : povray.newusers : Transparent Round_Box has many artifacts Server Time
23 Nov 2024 11:52:41 EST (-0500)
  Transparent Round_Box has many artifacts (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: ceving
Subject: Transparent Round_Box has many artifacts
Date: 23 Feb 2024 04:40:00
Message: <web.65d86792b02b090b9901d2cada2676d5@news.povray.org>
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
    }
  }
}

light_source { <-2, 4, 4> color White}


Post a reply to this message


Attachments:
Download 'player.png' (15 KB)

Preview of image 'player.png'
player.png


 

From: Bald Eagle
Subject: Re: Transparent Round_Box has many artifacts
Date: 23 Feb 2024 06:35:00
Message: <web.65d8828711ba5a471f9dae3025979125@news.povray.org>
"ceving" <nomail@nomail> wrote:
> 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

use:
#declare UseMerge = true;

or
> how I can produce this object in another way?

The Round_Box macro is going to make 8 cylinders and 8 spheres.  You only need 1
cylinder and 2 spheres, so just do that using merge {}

- BE


Post a reply to this message

From: Alain Martel
Subject: Re: Transparent Round_Box has many artifacts
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

From: Cousin Ricky
Subject: Re: Transparent Round_Box has many artifacts
Date: 23 Feb 2024 16:41:59
Message: <65d91127$1@news.povray.org>
On 2024-02-23 05:38 (-4), ceving wrote:
> 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?

Round_Cylinder() doesn't solve the problem; I tried it with UseMerge =
true, and that caused the object to vanish entirely.  But using UseMerge
= true with Round_Box() got rid of the artifacts.

I have created a set of macros that avoids redundant spheres and cylinders:

  https://github.com/CousinRicky/POV-RoundEdge/releases

Macros RE_Box() and RE_Cylinder will both work for this object, using
UseMerge = true.

I don't normally give advice that asked (I prefer to let new users deal
with problems one at a time), but Alain is correct about assumed_gamma 1.

However, I disagree with a blanket statement about rgbt vs. srgbt.  For
your particular example, it makes no difference, but the truth is that
srgbt is more likely to give you the colors that you expect, regardless
of your assumed_gamma setting. This is a whole bed of weeds that you
need to understand before taking advice blindly.


Post a reply to this message

From: Cousin Ricky
Subject: Re: Transparent Round_Box has many artifacts
Date: 23 Feb 2024 16:53:29
Message: <65d913d9$1@news.povray.org>
On 2024-02-23 17:41 (-4), Cousin Ricky wrote:
> 
> I don't normally give advice that asked (I prefer to let new users deal
> with problems one at a time), but Alain is correct about assumed_gamma 1.

*wasn't asked.


Post a reply to this message

From: Bald Eagle
Subject: Re: Transparent Round_Box has many artifacts
Date: 23 Feb 2024 19:05:00
Message: <web.65d9318711ba5a471f9dae3025979125@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
>  This is a whole bed of weeds that you
> need to understand before taking advice blindly.

YESSSS!!!!

Can we rehash gamma and srgb conversion again?   *PLEASE*?

That's totally one of my favorite topics!


Post a reply to this message

From: Kenneth
Subject: Re: Transparent Round_Box has many artifacts
Date: 24 Feb 2024 09:05:00
Message: <web.65d9f75911ba5a479b4924336e066e29@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
>
> Can we rehash gamma and srgb conversion again?   *PLEASE*?
>
> That's totally one of my favorite topics!

Personally, I would rather dance on a bed of hot coals instead; it would
probably be less painful, and far less confusing...

;-)


Post a reply to this message

From: ceving
Subject: Re: Transparent Round_Box has many artifacts
Date: 24 Feb 2024 14:40:00
Message: <web.65da453411ba5a4777ee2d97da2676d5@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> I have created a set of macros that avoids redundant spheres and cylinders:
>
>   https://github.com/CousinRicky/POV-RoundEdge/releases
>
> Macros RE_Box() and RE_Cylinder will both work for this object, using
> UseMerge = true.

Thanks! RE_Cylinder works fine.

https://ceving.github.io/breakout/Player.png

There are some minor artifacts on both ends, but maybe they are normal, I don't
know.

> I don't normally give advice that asked (I prefer to let new users deal
> with problems one at a time), but Alain is correct about assumed_gamma 1.

I used the gamma value just as a brightness slider. The images were too dark
with 1.


Post a reply to this message

From: Bald Eagle
Subject: Re: Transparent Round_Box has many artifacts
Date: 24 Feb 2024 17:30:00
Message: <web.65da6cc111ba5a471f9dae3025979125@news.povray.org>
"ceving" <nomail@nomail> wrote:

> I used the gamma value just as a brightness slider. The images were too dark
> with 1.

Well yeah, you had a black background.
use
sky_sphere {pigment {rgb 1}}
and see the dramatic difference.


Post a reply to this message

From: kurtz le pirate
Subject: Re: Transparent Round_Box has many artifacts
Date: 25 Feb 2024 12:35:13
Message: <65db7a51$1@news.povray.org>
On 24/02/2024 20:36, ceving wrote:
> Thanks! RE_Cylinder works fine.
> 
> https://ceving.github.io/breakout/Player.png
> 
> There are some minor artifacts on both ends, but maybe they are normal, I don't
> know.


Do you really have to use a macro for such a simple object ?


Back to basics csg : a simple merge { sphere{} sphere{} cylinder{} } is
more than enough, but maybe I've missed something?





-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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