POV-Ray : Newsgroups : povray.newusers : Light passing through my wall... Server Time
25 Nov 2024 07:33:36 EST (-0500)
  Light passing through my wall... (Message 1 to 6 of 6)  
From: Gyscos
Subject: Light passing through my wall...
Date: 11 Apr 2006 17:35:00
Message: <web.443c20674cd3d3441ba56a630@news.povray.org>
Hello !!
I'm sorry, i tried to post it in Bugreport, so i'm pretty sure the
moderators refused it since it was more likely a newbie question...

I have a room, closed, and a light inside.
The camera is outside and looks at the room...

But at the bottom of the wall (from the outside) i can see a kind of light
(maybe 1 pixel only) and it is there only when the light inside is ON.
So here is the quesion : If the light is INSIDE and the room is well close,
why do I see this from the outside ???

Sorry, the comments are in french... and i'm feeling too lazy to translate
them, i just hope you won't need them.

Here is the source code and a link to the picture...

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


#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>
}


#declare a=0;
#declare b=0;
#declare c=0;
#declare d=0;
#declare e=0;
// #declare a=clock*360;
/*
#if (clock < 1)

#declare a = clock*0.15;
  #declare b = 0;
  #declare c = 0;
  #declare d = 0;
#end

#if ((clock > 1) & (clock<2))
  #declare a = 0.15;
  #declare b = (clock-1) * 2;
  #declare c = 0;
  #declare d = 0;
#end

#if ((clock >2) & (clock < 3))


  #declare a = 0.15;
  #declare b = 2;
  #declare c = (clock-2)*2;
  #declare d = 0;
#end

#if ((clock >3) & (clock < 4))


  #declare a = 0.15;
  #declare b = 2;
  #declare c = 2;
  #declare d = clock-3;

#end

#declare e=0;

#if ((clock >4) & (clock > 4))


  #declare a = 0.15;
  #declare b = 2;
  #declare c = 2;
  #declare d = 1;
  #declare e = (clock-3)*360;

#end
*/
camera {
  location <0.12-a,-0.8+c,-1.32-b>
//  location <0.15-a,-0.8+c,-1.42-b>
//  location <3.15-a,2.8+c,-2.45-b>
  look_at <-0.0,-.81+d,-1.29>

}

plane {
  <0,1,0>,
  -2
  texture {
    pigment { Yellow }
  }
}

#declare lampe = union {
  difference {
    union {
      cylinder {
 <0,0,0>
 <0.03,0,0>
 0.0025

      }


      sphere {
 <0.03,0,0>
 0.01
      }
    }

    union {
      box {
 <0.03,3,3>
 <3,-3,-3>
      }
      sphere {
 <0.03,0,0>
 0.0085
      }
    }
    texture {
      Bronze_Metal
    }


  }

  difference {
    sphere {
      <0.03,0,0>
      0.01
    }

    union {
      sphere {
 <0.03,0,0>
 0.0085
      }
      box {
 <0.03,3,3>
 <-3,-3,-3>
      }
    }

    texture {
      NBglass
    }

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

}


#declare lampe2 = union {
  difference {
    union {
      cylinder {
 <0,0,0>
 <0.03,0,0>
 0.0025

      }


      sphere {
 <0.03,0,0>
 0.01
      }
    }

    union {
      box {
 <0.03,3,3>
 <3,-3,-3>
      }
      sphere {
 <0.03,0,0>
 0.0085
      }
    }
    texture {
      Bronze_Metal
    }


  }

  difference {
    sphere {
      <0.03,0,0>
      0.01
    }

    union {
      sphere {
 <0.03,0,0>
 0.0085
      }
      box {
 <0.03,3,3>
 <-3,-3,-3>
      }
    }

    texture {
      NBglass
    }

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

}



#declare table1 =  union {
  // Des tables...

  box {
    <0,-0.835+0.85,-1.4+1.4>
    <0.05,-0.837+0.85,-1.38+1.4>
  }
  box {
    <0.042,-0.837+0.85,-1.397+1.4>
    <0.038,-0.85+0.85,-1.393+1.4>
  }
  box {
    <0.042,-0.837+0.85,-1.387+1.4>
    <0.038,-0.85+0.85,-1.383+1.4>
  }
  box {
    <0.012,-0.837+0.85,-1.397+1.4>
    <0.008,-0.85+0.85,-1.393+1.4>
  }
  box {
    <0.008,-0.837+0.85,-1.387+1.4>
    <0.012,-0.85+0.85,-1.383+1.4>
  }

  texture {
    pigment { Blue }
  }
}



#declare aeronef = union {



  sphere {
    <0,0,0>
    1

    texture {
      Chrome_Metal
      normal {
 facets
 size 0.15
      }

    }
    scale <1,1,2>

  }

  // Les pics
  union {


    // Le pic de devant
    cone {
      <0,0.0,-0>
      0.7
      <0,0.0,-2.4>
      0
    }


    // Les pics du dessus
    union {

      cone {
 <0,0.0,-0.4>
 0.4
 <0,1.45,-0.7>
 0
      }

      cone {
 <0,0.0,-0.8>
 0.4
 <0,1.27,-1.35>
 0
      }

      cone {
 <0,0.0,-1.2>
 0.35
 <0,0.9,-1.9>
 0
      }



      cone {
 <0,0.0,0>
 0.4
 <0,1.5,0>
 0
      }

      cone {
 <0,0.0,0.4>
 0.4
 <0,1.45,0.7>
 0
      }

      cone {
 <0,0.0,0.8>
 0.4
 <0,1.27,1.35>
 0
      }

      cone {
 <0,0.0,1.2>
 0.35
 <0,0.9,1.9>
 0
      }
    }

    // les pics de gauche
    union {

      cone {
 <0,0.0,-0.4>
 0.4
 <1.45,0,-0.7>
 0
      }

      cone {
 <-0.0,0.0,-0.8>
 0.4
 <1.270,0,-1.35>
 0
      }

      cone {
 <0,0.0,-1.2>
 0.35
 <0.9,0,-1.9>
 0
      }

      cone {
 <0,0.0,0>
 0.4
 <1.5,0,0>
 0
      }


    }
    // les pics de droite
    union {

      cone {
 <0,0.0,-0.4>
 0.4
 <-1.45,0,-0.7>
 0
      }

      cone {
 <-0.0,0.0,-0.8>
 0.4
 <-1.270,0,-1.35>
 0
      }

      cone {
 <0,0.0,-1.2>
 0.35
 <-0.9,0,-1.9>
 0
      }

      cone {
 <0,0.0,0>
 0.4
 <-1.5,0,0>
 0
      }
    }
    texture {
      Gold_Metal
    }

  }
  //Fin des pics




  //Le canon
  union {
    box {
      <0,0,-1>
      <0.7,0.7,-1.3>

    }
    texture {
      pigment { Med_Purple }
    }
  }



  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 }

      }

    }

    // La vitre
    box {
      <0.2,-0.83,-1.495>
      <-0.2,-0.7,-1.485>

      texture {
 NBglass
      }
    }



    // Des lampadaires

    object {
      lampe

      translate <-0.25,-0.75,-1.4>
    }

    object {
      lampe

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

    }

    // Une chaise principale
    union {
      prism {
 linear_sweep
 cubic_spline
 1.5,
 -1.5,
 11
 <0,0>
 <1.5,0.3>
 <2.5,1.5>
 <3,4>
 <2.8,4.1>
 <2.2,1.7>
 <1.5,0.7>
 <0,0.5>
 <0,0>
 <1.5,0.3>
 <2.5,1.5>


 scale 0.2*0.025
 rotate <0,90,90>
 rotate <0,180,00>
 translate <0,-0.844,-1.38>

 }



      cylinder {
 <0,0.2,1.5>
 <0,-4,1.5>
 0.5

 scale 0.2*0.025

 translate <0,-0.844,-1.38>
      }
      texture {
 pigment { Green }
      }

    }

    // Les tables
    object {
      table1
      rotate <0,90,0>
      translate <-0.25,-0.85,-1.4>
    }
    object {
      table1
      rotate <0,0,0>
      translate <-0.25,-0.85,-1.35>
    }

    // La table du milieu, table de commande...
    union {
      intersection {
 box {
   <-0.035,-0.835,-1.41>
   <0.035,-0.837,-1.38>

 }

 union {
   box {
     <-0.034,-0.835,-1.409>
     <0.034,-0.837,-1.381>
   }
   cylinder {
     <-0.034,-0.836,-1.409>
     <0.034,-0.836,-1.409>
     0.001
   }

   cylinder {
     <-0.034,-0.836,-1.381>
     <0.034,-0.836,-1.381>
     0.001
   }

   cylinder {
     <-0.034,-0.836,-1.409>
     <-0.034,-0.836,-1.381>
     0.001
   }

   cylinder {
     <0.034,-0.836,-1.409>
     <0.034,-0.836,-1.381>
     0.001
   }
   sphere {
     <0.034,-0.836,-1.409>
     0.001
   }
   sphere {
     <-0.034,-0.836,-1.409>
     0.001
   }
   sphere {
     <0.034,-0.836,-1.381>
     0.001
   }
   sphere {
     <-0.034,-0.836,-1.381>
     0.001
   }

 }
 texture {
   pigment { Blue }
 }

      }
      cylinder {
 <0,-0.836,-1.4>
 <0,-0.836,-1.48>
 0.0006
 texture {
   pigment { Blue }
 }

      }
      lathe {
 cubic_spline
 4,
 <0.007,-0.8>
 <0.005,-0.837>,

 <0.013,-0.85>
 <0.05,-0.85>
 pigment { Blue }
 sturm
 translate <0,0,-1.395>
      }


    }



    union {



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

/////////////////////  HERE IS THE LIGHT /////////////////
////////////// TURN IT OFF TO SEE WHAT IT DOES ///////////

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

      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>
   }
   box {
     <0.013,-0.87,0>
     <-0.013,-0.80,-1.35>

   }

 }

      }

      #if (clock < 1)

 #declare g = 0;
      #end

      #if ((clock > 1) & (clock < 2))
 #declare g = sqrt(clock-1)*0.012;
      #end

      #if ((clock > 2) & (clock < 3))
 #declare g = 0.012;
      #end

      #if ((clock > 3) & (clock <= 4))
 #declare g = (1-sqrt(clock-3))*0.012;
      #end




      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>
   }
   translate <-g,0,0>
 }

 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>
   }
   translate <g,0,0>
 }

 texture {
   T_Chrome_2A
 }






      }


      texture {

 pigment { Red }
      }


    }

  }




  union {
    difference {
      cone {
 <0,0,1.8>
 0.3
 <0,0,2.20>
 0.15
      }
      union {
 cone {
   <0,0,2.21>
   0.11
   <0,0,2>
   0.04
 }

 #declare i = 0;

 #while (i < 10)

   box {
     <0.005,1,2.3>
     <-0.005,0.13,2>
     rotate <0,0,i*36>
   }

   #declare i = i+1;

 #end
      }

    }
    texture {
      Bronze_Metal
    }
  }


}

#declare a=0;

object {
  aeronef


  translate <0,0,0>
  rotate <0,e,0>

}


Post a reply to this message

From: Gyscos
Subject: Re: Light passing through my wall...
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

From: Chris B
Subject: Re: Light passing through my wall...
Date: 12 Apr 2006 09:52:05
Message: <443d0605$1@news.povray.org>
Hi Gyscos,

First, on a point of protocol, it is not very polite to post long SDL 
listings, most of which have nothing at all to do with the problem you are 
experiencing.
You posted nearly 800 lines of poorly structured code. To expect people to 
find the offending section is, IMHO not reasonable. Hopefully you know your 
code sufficiently well that you should have been able to easily chop out all 
of the objects that were not relevant to your problem.

Nevertheless, it seems to me that there is something strange happening here. 
I've duplicated this problem in the following short snippet of SDL.
Maybe someone else will be able to explain what is causing this, because 
it's beyond my experience.


camera {location <0.025,0.01,-0.025>  look_at  0}
light_source {<-0.1,0.1,0.1> rgb 1}

box {<-1,-1,0>,<0,1,1> pigment {color rgb <0,0,1>}}
plane {y,0 pigment { color rgb <1,0,0> }}

// Problem Trigger
box {<100,0,-1>,<101,1,0>  pigment {color rgb 1 }}


The first box is effectively sliced in two by  the plane. The light source 
is in the upper section of the box and the camera is pointing at the origin 
where the plane and the box cut through each other. This renders without 
artifacts until another box is added, whereupon the artifacts appear at the 
junction of the first box and the plane.

The second box is nowhere near the first and can be above, below, or, as in 
this case, touching the plane without changing the artifacts. If the second 
box is commented out, the artifacts dissapear.

Has anyone seen this before?

Regards,
Chris B.


Post a reply to this message

From: Gyscos
Subject: Re: Light passing through my wall...
Date: 12 Apr 2006 13:40:01
Message: <web.443d3a4f906ba1351ba56a630@news.povray.org>
I'm trully trully sorry, now i see that i  could have done this within a
couple of lines... :(
just one quetion : What means SDL ? Simple Directmedia Layer ?...
And thanks for having answered...
even if I don't help very much xD


Post a reply to this message

From: Chris B
Subject: Re: Light passing through my wall...
Date: 12 Apr 2006 13:59:37
Message: <443d4009@news.povray.org>
"Gyscos" <gys### [at] gmailcom> wrote in message 
news:web.443d3a4f906ba1351ba56a630@news.povray.org...
> I'm trully trully sorry, now i see that i  could have done this within a
> couple of lines... :(
> just one quetion : What means SDL ? Simple Directmedia Layer ?...
> And thanks for having answered...
> even if I don't help very much xD
>

SDL = Scene Description Language
(The contents of a POV-Ray scene file or a POV-Ray include file)

Regards,
Chris B.


Post a reply to this message

From: Alain
Subject: Re: Light passing through my wall...
Date: 12 Apr 2006 20:47:19
Message: <443d9f97$1@news.povray.org>
Chris B nous apporta ses lumieres en ce 12/04/2006 09:52:
> Hi Gyscos,
> 
> First, on a point of protocol, it is not very polite to post long SDL 
> listings, most of which have nothing at all to do with the problem you are 
> experiencing.
> You posted nearly 800 lines of poorly structured code. To expect people to 
> find the offending section is, IMHO not reasonable. Hopefully you know your 
> code sufficiently well that you should have been able to easily chop out all 
> of the objects that were not relevant to your problem.
> 
> Nevertheless, it seems to me that there is something strange happening here. 
> I've duplicated this problem in the following short snippet of SDL.
> Maybe someone else will be able to explain what is causing this, because 
> it's beyond my experience.
> 
> 
> camera {location <0.025,0.01,-0.025>  look_at  0}
> light_source {<-0.1,0.1,0.1> rgb 1}
> 
> box {<-1,-1,0>,<0,1,1> pigment {color rgb <0,0,1>}}
> plane {y,0 pigment { color rgb <1,0,0> }}
> 
> // Problem Trigger
> box {<100,0,-1>,<101,1,0>  pigment {color rgb 1 }}
> 
> 
> The first box is effectively sliced in two by  the plane. The light source 
> is in the upper section of the box and the camera is pointing at the origin 
> where the plane and the box cut through each other. This renders without 
> artifacts until another box is added, whereupon the artifacts appear at the 
> junction of the first box and the plane.
> 
> The second box is nowhere near the first and can be above, below, or, as in 
> this case, touching the plane without changing the artifacts. If the second 
> box is commented out, the artifacts dissapear.
> 
> Has anyone seen this before?
> 
> Regards,
> Chris B.
> 
> 
> 
> 
Just tested with 3.7 beta. The artefact is *always* present, even with the second box
commented out!
Test with and without the +b2 switch.

-- 
Alain
-------------------------------------------------
Jehovah's Witnesses #2: May we have a moment of your time to show you some of our
shit?


Post a reply to this message

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