POV-Ray : Newsgroups : povray.newusers : Making a light source in a building... Server Time
13 Nov 2024 17:44:54 EST (-0500)
  Making a light source in a building... (Message 1 to 6 of 6)  
From: Lt  Kettch
Subject: Making a light source in a building...
Date: 10 Jul 2000 02:45:47
Message: <39696E4E.6971BF0C@aol.com>
Lets say I have a box that has a smaller box cut out of it, I.E. a room.
The room also has a window. But when I put a light in the room, it does
not show through the window. But it does seem to go through walls. What
is wrong? Could some one post some code for me to paste in?

--
"Yub-Yub!" Lt. Kettch


Post a reply to this message

From: Wil Hale
Subject: Re: Making a light source in a building...
Date: 10 Jul 2000 12:06:21
Message: <3969f47d@news.povray.org>
Here ya go Lt.  The code could be better documented but you should be able
to follow it.  Its a garage  with a light upstairs and one downstairs.

Hope this helps

Wil Hale
SAIC
wil### [at] cal-businesscom

Lt. Kettch <AKK### [at] aolcom> wrote in message
news:39696E4E.6971BF0C@aol.com...
> Lets say I have a box that has a smaller box cut out of it, I.E. a room.
> The room also has a window. But when I put a light in the room, it does
> not show through the window. But it does seem to go through walls. What
> is wrong? Could some one post some code for me to paste in?
>
> --
> "Yub-Yub!" Lt. Kettch
>
>


Post a reply to this message

From: Wil Hale
Subject: Re: Making a light source in a building...
Date: 10 Jul 2000 12:07:54
Message: <3969f4da@news.povray.org>
It helps if I include the code...Sorry

Wil Hale
SAIC
wil### [at] cal-businesscom

#version 3.1
file://scale  1 unit = 1 foot
#include "colors.inc"

global_settings
{
  assumed_gamma 1.0
}

// ----------------------------------------
camera
{
  location  <-30.0, 16, -50.0>
  direction 1.5*z
  right     4/3*x
  look_at   <0.0, 10.0,  0.0>
}

sky_sphere
{
  pigment
  {
    gradient y
    color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
  }
}

light_source                                                   //  Upstairs
Light
{                                                              //
  0*x // light's position (translated below)                   //
  color red 1.0  green 1.0  blue 1.0  // light's color         //
  translate <-0, 15, -0>
}

// ----------------------------------------
plane { y, -0 pigment {color rgb <0.7,0.5,0.3>}}

file://Floor
// create a box that extends between the 2 specified points
box
{
  <-12, -0.2, -12>  // one corner position <X1 Y1 Z1>
  < 12,  0.2,  12>  // other corner position <X2 Y2 Z2>

pigment { rgb <0,1,0>}}


file://left wall
difference{
box
{
  <-12, 0.2, -12>  // one corner position <X1 Y1 Z1>
  < -11.6,  10,  12>  // other corner position <X2 Y2 Z2>

texture{ pigment {rgb <1,1,0>}
// texture pigment {} attribute
// create a texture that lays an image's colors onto a surface
// image maps into X-Y plane from <0,0,0> to <1,1,0>
normal{
bumps 5 }scale 20
rotate y*90} // image_map

}

file://window
box
{
  <-12.2, 4, -3>  // one corner position <X1 Y1 Z1>
  < -11.2,  6,  0>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}

box
{
  <-12.2, 4, 0.1>  // one corner position <X1 Y1 Z1>
  < -11.2,  6,  3>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}

box
{
  <-12.2, 6.1, -3>  // one corner position <X1 Y1 Z1>
  < -11.2,  8,  0>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}

box
{
  <-12.2, 6.1, 0.1>  // one corner position <X1 Y1 Z1>
  < -11.2,  8,  3>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}

}




file://right wall
box
{
  <12, 0.2, -12>  // one corner position <X1 Y1 Z1>
  < 11.6,  10,  12>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}


file://***************************back wall and doorways
difference{
box
{
  <-12, 0.2, 12>  // one corner position <X1 Y1 Z1>
  < 12,  10, 11.6>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}

file://back door doorway
box
{
  <-10, 0.1, 12.2>  // one corner position <X1 Y1 Z1>
  < -7,  8, 11.2>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}  }


file://****************************Front wall and doorways
file://front wall
difference{
box
{
  <-12, 0.2, -12>  // one corner position <X1 Y1 Z1>
  < 12,  10, -11.6>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}

file://left doorway
box
{
  <-10, 0.1, -12.2>  // one corner position <X1 Y1 Z1>
  < -2,  8, -11.2>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}

file://right doorway
box
{
  <10, 0.1, -12.2>  // one corner position <X1 Y1 Z1>
  < 2,  8, -11.2>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}} }
file://**************************************************end front wall

file://Ceiling
box
{
  <-12, 9.8, -12>  // one corner position <X1 Y1 Z1>
  < 12,  10.2,  12>  // other corner position <X2 Y2 Z2>

pigment { rgb <0,1,0>}}


// create a regular point light source                                //
Downstairs Light
light_source                                                          //
{                                                                     //
  0*x // light's position (translated below)
  color red 1.0  green 1.0  blue 1.0  // light's color
  translate <-0, 9, -0>
}



file://******************************************************************sec
ond story

file://left wall
difference{
box
{
  <-12, 10.2, -12>  // one corner position <X1 Y1 Z1>
  < -11.6,  18,  12>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}

box
{
  <-122, 12, -9>  // one corner position <X1 Y1 Z1>
  < -11.4,  16,  9>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}}


file://right wall
box
{
  <12, 10.2, -12>  // one corner position <X1 Y1 Z1>
  < 11.6,  18,  12>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}

file://back wall
box
{
  <-12, 10.2, 12>  // one corner position <X1 Y1 Z1>
  < 12,  18, 11.6>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}


file://front wall
difference{
box
{
  <-12, 10.2, -12>  // one corner position <X1 Y1 Z1>
  < 12,  18, -11.6>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}

box
{
  <-8, 12, -12.2>  // one corner position <X1 Y1 Z1>
  < 8,  16, -11.4>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}} }










file://************************************roof

difference{
box
{
  <-9, -9, -12>  // one corner position <X1 Y1 Z1>
  < 9,  9, 12>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}
file://rotate x*90
rotate z*45}
box
{
  <-14, -14, -12.2>  // one corner position <X1 Y1 Z1>
  < 14,  14, 12.2>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}
translate -y*14}

box
{
  <-8.8, -8.8, -12>  // one corner position <X1 Y1 Z1>
  < 8.8,  8.8, 12>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}
file://rotate x*90
rotate z*45}

file://skylight
box
{
  <-18.8, 5, -1>  // one corner position <X1 Y1 Z1>
  < 18.8,  9.5, 1>  // other corner position <X2 Y2 Z2>

pigment { rgb <1,1,0>}}


translate y*18}




Lt. Kettch <AKK### [at] aolcom> wrote in message
news:39696E4E.6971BF0C@aol.com...
> Lets say I have a box that has a smaller box cut out of it, I.E. a room.
> The room also has a window. But when I put a light in the room, it does
> not show through the window. But it does seem to go through walls. What
> is wrong? Could some one post some code for me to paste in?
>
> --
> "Yub-Yub!" Lt. Kettch
>
>


Post a reply to this message

From: Warp
Subject: Re: Making a light source in a building...
Date: 10 Jul 2000 17:02:33
Message: <396a39e9@news.povray.org>
Lt. Kettch <AKK### [at] aolcom> wrote:
: Lets say I have a box that has a smaller box cut out of it, I.E. a room.
: The room also has a window. But when I put a light in the room, it does
: not show through the window. But it does seem to go through walls.

  Sorry, I don't understand what you mean.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Steve
Subject: Re: Making a light source in a building...
Date: 10 Jul 2000 17:59:01
Message: <slrn8mk3qc.va6.steve@zero-pps.localdomain>
On Sun, 09 Jul 2000 22:33:51 -0800, Lt. Kettch wrote:
>Lets say I have a box that has a smaller box cut out of it, I.E. a room.
>The room also has a window. But when I put a light in the room, it does
>not show through the window. But it does seem to go through walls. What
>is wrong? Could some one post some code for me to paste in?

You could try a media container the same size as the box that you used to
take the middle out of the room, or you could use a high ambient/diffuse value
on the window material.  I used ambient and diffuse on my trafficlights macro
to get that type of effect.  something like:

 object{GlassInWindow
             pigment{rgbf <1,0,0,0.85>}
             finish{ambient 5
                    diffuse 5
                    phong 0.8 
                    reflection 0.2
                    specular 0.01
                    roughness 0.001
                   }
             }
       
Not sure of the exact values I used, just play around with the diffuse and 
ambient values. 

-- 
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

  6:51pm  up 11 days, 18:32,  2 users,  load average: 1.15, 1.05, 1.01


Post a reply to this message

From: Lt  Kettch
Subject: Re: Making a light source in a building...
Date: 11 Jul 2000 05:35:49
Message: <396AE695.3A0F77DD@aol.com>
I don't quite get it. Where is the light source? That's what I'm really
looking for. And thanks for trying to help... doing this for fan art of an
online comic...

Wil Hale wrote:

> Here ya go Lt.  The code could be better documented but you should be able
> to follow it.  Its a garage  with a light upstairs and one downstairs.
>
> Hope this helps
>
> Wil Hale
> SAIC
> wil### [at] cal-businesscom
>
> Lt. Kettch <AKK### [at] aolcom> wrote in message
> news:39696E4E.6971BF0C@aol.com...
> > Lets say I have a box that has a smaller box cut out of it, I.E. a room.
> > The room also has a window. But when I put a light in the room, it does
> > not show through the window. But it does seem to go through walls. What
> > is wrong? Could some one post some code for me to paste in?
> >
> > --
> > "Yub-Yub!" Lt. Kettch
> >
> >

--
"Yub-Yub!" Lt. Kettch


Post a reply to this message

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