POV-Ray : Newsgroups : povray.bugreports : Merge doesn't merge correctly : Merge doesn't merge correctly Server Time
26 Apr 2024 08:59:17 EDT (-0400)
  Merge doesn't merge correctly  
From: Mirfaelltkeinerein
Date: 6 May 2014 05:05:01
Message: <web.5368a51b8e5a517fa733cb390@news.povray.org>
Hello all,

I experienced a problem with merging several objects together.
If transparent boxes with the same hight are merged together, the intersecting
parts are visible and broken.

This behavior occurs on version 3.7.0.msvc10.win64, on
version 3.7.0.RC7.msvc10.win64, and also on version 3.6.2.msvc9.win64.
Shouldn't 'merge' avoid such a problem?  As far as I remember, this behavior is
present for a long time now.

To reproduce the problem, I set up the following scene:

//*********************************************************************
#include "glass.inc"
#include "colors.inc"

camera {
  location <6,25,14>
  direction <0, 0, 1.5>
  sky <0,0,1>
  angle 42
  look_at <0,5,0.4>
}

light_source { <-5, 12, 12> color rgb<1, 1, 1>}
light_source { <15, 6, 17> color rgb<1, 1, 1>}

box{<-8.5,-8.5,-1.0>,<8.5,8.5,0.10> pigment{color White}} //white base


merge{
    box{<-6.0,-6.5,0.09>, <6.0,3.0,0.20> translate<0,0,0>} //large red box

    box{<-1.0,1.99,0.09>, <-1.1,5.001,0.20> translate<0,0,0>} //small red box
    box{<-0.1,1.99,0.09>, <-0.2,7.001,0.20> translate<0,0,0>} //small red box
    box{< 0.3,1.99,0.09>, < 0.2,6.001,0.20> translate<0,0,0>} //small red box
    box{< 0.7,1.99,0.09>, < 0.6,5.001,0.20> translate<0,0,0>} //small red box
    box{< 1.1,1.99,0.09>, < 1.0,4.001,0.20> translate<0,0,0>} //small red box

    material {
        texture {
            pigment { rgbf <0.99, 0.3, 0.3, 0.8> }
            finish {
                ambient 0.1
                diffuse 0.1
                reflection .25
                specular 1
                roughness .001
            }
        }
        interior{ I_Glass4
                  fade_distance 0.1
                  fade_power 1001
                  fade_color <0.9,0.25,0.25>
                  caustics 0.25
        }
    }
}
//*********************************************************************

Is there a solution to avoid this error except using different heights or
cutting away the top with a 'difference'?


Post a reply to this message

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