POV-Ray : Newsgroups : povray.newusers : Prism and CSG difference operation : Re: Prism and CSG difference operation Server Time
29 Jul 2024 06:16:20 EDT (-0400)
  Re: Prism and CSG difference operation  
From: Roman Reiner
Date: 13 May 2006 03:35:01
Message: <web.44658ba6ec628ebbb5ef244d0@news.povray.org>
What you see is not an empty space between the prismsurfaces but the
textures of the boxes namely the default texture which is black. if you
apply a texture to the boxes that is the one that will show up on that
location. If you want everything to have the same texture apply the texture
to the whole csg instead of texturing every object individually. This saves
memory and rendering time.

Here's the updated version:

#include "textures.inc"
#include "sunpos.inc"

global_settings {
        radiosity {
                pretrace_start 0.08
                pretrace_end   0.01
                count 80
                nearest_count 5
                error_bound 0.7
                recursion_limit 3
                low_error_factor 0.8
                gray_threshold 0
                minimum_reuse 0.015
                brightness 1.5
                adc_bailout 0.01/2
        }
}


// sky sphere
sphere {
          0, 1000
          pigment { color <0.7, 0.7, .9>
                     } // end of pigment
          finish {
                ambient 1
                diffuse 0
          }
}


camera {
        location <2.4, 1.8, -3.1>
        look_at <-2, 1.5, -8.45>
        angle 63
}


#declare global_diffuse= .8;

light_source {
      //SunPos(2000, 6, 21, 11, 30, 0, 51.4667, 0.00)
      <1.6, 1.2, -14>
      rgb <1,1,.9>
   }

#declare lv_room_walls = prism {
linear_sweep
linear_spline
0,   // sweep the following shape from here ...
2.2, // height of room is 2.2m
20,  // num of inner an outer points
<-0.5, 0.2>, <2.9, 0.2>, <3, -8.7>, <-2.92, -8.7>, <-2.92, -4.6>, <-4.5,
-4.6>, <-4.5, -4.5>, <-0.5, -4.4>, <-0.5, -0.5>     // outer wall
<0,0>,<2.7,0>, <2.7,-4.25>, <2.43,-4.25>, <2.18,-8.45>, <-2.62, -8.45>,
<-2.62, -4.8>, <-0.3, -4.7>, <-0.25, -0.3>, <0,-0.25>,<0,0> // inner wall
}

difference {
          object {lv_room_walls
          }

          /* window */
          box {
                <-2.619, 0.7, -7.65>
                <-2.921, 2, -6.15>
          }



          /* rear door */
          box {
                <1.38, 0.001, -8.449>
                <-0.62, 2.05, -8.701>
          }
          pigment {color rgb 1}
                finish {
                        ambient 0
                        diffuse global_diffuse
                  }
}

Regards Roman


Post a reply to this message

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