POV-Ray : Newsgroups : povray.newusers : Light passing through my wall... : Re: Light passing through my wall... Server Time
29 Jul 2024 08:15:18 EDT (-0400)
  Re: Light passing through my wall...  
From: Gyscos
Date: 11 Apr 2006 18:55:00
Message: <web.443c2ebc906ba1351ba56a630@news.povray.org>
Oops sorry again, there's no EDIT button(or i didnt find any) and i wanted
to post my *optimized* code : here are only the basic stuff (or at least
much more useless things than before)

Also, my room wasn't EXACTLY closed : there was a hole, and a double metal
door blocked this hole, so anyway so light should have passed...

But when i withdraw the hole for the door (the metal is then INSIDE the wall
since it was a little thiner) the artifact diseapear O_o

#include "colors.inc"
#include "textures.inc"
#include "metals.inc"

global_settings {
  max_trace_level 20
}


light_source {

  <4.0,1,-2>
  rgb <1,1,1>
}

camera {

  location <0.13,-0.8,-1.35>

  look_at <-0.0,-.7947,-1.3>

}

#declare lampe = union {

  light_source {
    <0.03,0,0>
    White
    fade_distance 0.2
    fade_power 2
  }

}


// THE ONLY DIFFERENCE BETWEEN LAMPE AND LAMPE2 IS THE FADE_DISTANCE AND
POWER

#declare lampe2 = union {

  light_source {
    <0.03,0,0>
    White
    fade_distance 0.1
    fade_power 1
  }

}






#declare aeronef = union {




  union {
    difference {

      box {
 <-0.3,0,-0.7>
 <0.3,-0.9,-1.5>
      }
      union {
 box {
   <-0.25,0,-0.7>
   <0.25,-0.85,-1.48>
 }

 box {
   <-0.2,-0.83,-0.7>
   <0.2,-0.7,-1.55>
 }

      }

      texture {
 pigment { Red }

      }

    }




    object {
      lampe

      rotate <0,180,0>
      translate <0.25,-0.75,-1.4>

    }







    /********************


  Here is THE LIGHT that mess up


    ********************/
    union {
      object {
 lampe2
 rotate<0,0,-90>
 translate<0,-0.76,-1.28>


      }



      ///////////////////



      difference {
 box {
   <0.025,-0,-1.3>
   <-0.025,-0.87,-1>
 }

 union {
   box {
     <0.023,0,0>
     <-0.023,-0.87,-1.298>
   }



   ////////////
   ///////////

   // AND HERE IS THE BOX THAT DIG A HOLE IN MY WALL...
   // COMMENT IT, IT WILL FILL THE HOLE AND THE ARTIFACT DISEAPEAR...
   // STRANGE, ISN'T IT ??

   ///////////
   ////////////
   box {
     <0.013,-0.87,0>
     <-0.013,-0.80,-1.35>

   }

 }

      }



      // HERE ARE THE 2 DOUBLE METAL DOOR : A FIRST BOX,
      // thiner than the wall and not wide enough to fill all the hole,
      // and another one, even thiner, that comes and fill the hole...
      // IT MAKES SOMETHING LIKE THAT (view from top)
      /*


------
     |
  W  |---------------   ---------------...
     |              |   |
  A  | FIRST BOX     -----
     |          2n BOX |
  L  |               -----
     |    DOOR 1    |   |     DOOR 2
  L  |---------------   -------------...
     |
------


      */
      union {
 union {
   box {
     <-0.013,-0.85,-1.2984>
     <-0.0002,-0.8,-1.2996>
   }
   box {
     <-0.01,-0.85,-1.2987>
     <0,-0.8,-1.2993>
   }

 }

 union {

   box {
     <0.013,-0.85,-1.2984>
     <0.0002,-0.8,-1.2996>
   }
   box {
     <0.01,-0.85,-1.2987>
     <0,-0.8,-1.2993>
   }

 }

 texture {
   T_Chrome_2A
 }






      }


      texture {

 pigment { Red }
      }


    }

  }





}



object {
  aeronef


  translate <0,0,0>


}


Also, i updated the image...

http://dragons.masters.free.fr/images/demo2.png


Post a reply to this message

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