POV-Ray : Newsgroups : povray.newusers : Where is a bug ? : Re: Where is a bug ? Server Time
14 Sep 2025 10:19:50 EDT (-0400)
  Re: Where is a bug ?  
From: Alain Martel
Date: 1 Sep 2025 12:23:22
Message: <68b5c87a$1@news.povray.org>
Le 2025-09-01 à 11:54, kurtz le pirate a écrit :
> 
> Hello,
> 
> The holidays are over. I've started a new project... which has me 
> confused. I don't understand POV's behavior.
> 
> 
> The attached image illustrates the issue well. Both objects are defined 
> in the same way, but one is a union{} (magenta) and the other is a 
> merge{} (cyan).
> 
> It's a very very simple object: two boxes and four cylinders.
> 
> 
> So, why le merged object (in cyan) show a hole ?
> 
> 
> <sdl>
> 
> #declare S = 11.00;
> #declare R = 3.00;
> #declare H = 0.50;
> 
> #declare corner = cylinder { <0, -H, 0>, <0, 0, 0>, R }
> 
> merge or union
>    {
>    box { <-S+R, -H, -S>, <+S-R, 0, +S> }
>    box { <-S, -H, -S+R>, <+S, 0, +S-R> }
> 
>    object { corner translate <+(S-R), 0, +(S-R)> }
>    object { corner translate <-(S-R), 0, +(S-R)> }
>    object { corner translate <+(S-R), 0, -(S-R)> }
>    object { corner translate <-(S-R), 0, -(S-R)> }
>    }
> 
> </sdl>
> 
> For the rendering, I added a translate 15*y for the cyan object but the 
> problem is not here.
> 
> 
> 
> If you have an idea...
> Regards
> 
> 
> 
> ps : actually, I'm trying to understand how subsurface scattering works, 
> and I've already noticed that this feature requires merge{} because 
> union{} don't work, certainly due to surface coincidence.
> 
> 
> 

The noise in the hole lead me to think that it may be a coincident 
surface issue.
The merge remove internal surfaces. When two surfaces are in the exact 
same location, you get all sort of glitches as the program can't tell 
witch one is inside and need to get removed.
Try moving one of the box up or down by a very small amount, like :
translate y*10^-7

Does that help ?


Post a reply to this message

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