POV-Ray : Newsgroups : povray.general : Oject as Light Source Server Time
16 Nov 2024 21:13:24 EST (-0500)
  Oject as Light Source (Message 1 to 6 of 6)  
From: yang444
Subject: Oject as Light Source
Date: 10 Apr 1998 23:26:01
Message: <352EE2C9.996FDC95@pacbell.net>
I have POVRay 3.0 for Windows, running on W95.

Object-as-Light_Source seems to only partially work for me.

I have declared a sphere as an object, with a position.
I have a light_source with a position.

When rendered, the object's position is always the sum of
the two positions, but the light always seems to come from
the position of the light_source alone.

In the example below, you can see the light is coming from the position of
light_source.
Change the positions around, and see if what I say isn't true.

Can someone explain this?
Isn't the light supposed to come from the object?
--------------------

#include "colors.inc"
camera
{ location <-3, 3, -15>  look_at 0  angle 30
}
#declare s = sphere
{ < -1 , -1 ,  1>, .5
  pigment { color White }
  finish {ambient .8}
}
light_source
{ < 1  , 1  , -1  >
  color White
  looks_like { s }
}
#declare b = box
{ <1 , -1 , 1.3>, <3, 1.2, 3.3>
  pigment { color White }
  finish {ambient .3}
}
b
//x-y-z axes
cylinder { -100*x, 100*x, .03  pigment {Gold} finish {ambient .8}}
cylinder { -100*z, 100*z, .03  pigment {Gold} finish {ambient .8}}
cylinder { -100*y, 100*y, .03  pigment {Gold} finish {ambient .8}}


--
Alan


Post a reply to this message

From: GrimDude
Subject: Re: Oject as Light Source
Date: 11 Apr 1998 02:03:55
Message: <6gn1ah$5su$1@oz.aussie.org>
What I have done in the past is to place the light_source at the origin,
and then use the "looks_like { object }. It then comes out right.
  Explain it? heh, I wouldn't presume to know how. :)

- Grim


Post a reply to this message

From: Roland Mas
Subject: Re: Oject as Light Source
Date: 11 Apr 1998 07:02:48
Message: <6gniko$r6v$1@melchior.cuivre.fr.eu.org>
Hello!

yan### [at] pacbellnet wrote:
> I have declared a sphere as an object, with a position.
> I have a light_source with a position.

  Alright. (I guess you use a looks_like statement.)

> When rendered, the object's position is always the sum of
> the two positions, but the light always seems to come from
> the position of the light_source alone.

  Of course it does! Where do you want it to come from?

> In the example below, you can see the light is coming from the position of
> light_source.
> Change the positions around, and see if what I say isn't true.

> Can someone explain this?
> Isn't the light supposed to come from the object?

  No. The documentation (section 7.5.6.6) explains it all. The phrase
"position of the object" has no meaning: what is the "position" of a union
of a cube and a sphere? It cannot be assigned a unique meaning. So, you just
have to calculate the place you put your object in relation to the position
of the light_source, presumably around <0,0,0> so that the light_source is
in the object.

> --
> Alan

Roland.
--

bob### [at] casimirrezelenstfr -- Linux, POV-Ray, LaTeX


Post a reply to this message

From: yang444
Subject: Re: Object as Light Source
Date: 11 Apr 1998 13:22:57
Message: <352FA6F1.3E8F75A5@pacbell.net>
Thanks GrimDude.  That works!

I was doubled confused, since I didn't realize that the light_source does not
light up
the object it looks_like.  So, in those instances in which I got the
light_source and
object in the same place, it looked to me as if the light was being blocked by
the
object.

GrimDude wrote:

>   What I have done in the past is to place the light_source at the origin,
> and then use the "looks_like { object }. It then comes out right.
>   Explain it? heh, I wouldn't presume to know how. :)
>
> - Grim

--
Alan


Post a reply to this message

From: Nieminen Mika
Subject: Re: Object as Light Source
Date: 11 Apr 1998 20:42:01
Message: <6gp2kp$87d$2@oz.aussie.org>
yan### [at] pacbellnet wrote:
: I was doubled confused, since I didn't realize that the light_source does not
: light up
: the object it looks_like.  So, in those instances in which I got the
: light_source and
: object in the same place, it looked to me as if the light was being blocked by
: the
: object.

  If the light source is inside the object, all the surface of the object
will be shadowed (because there's nothing illuminating it from outside),
even if it's a no_shadow object.
  The usual trick to "illuminate" this object is to set
finish { ambient 1 }
to this object.

--
                                                              - Warp. -


Post a reply to this message

From: Lance Birch
Subject: Re: Oject as Light Source
Date: 4 May 1998 06:32:09
Message: <6ik5gv$3em$1@oz.aussie.org>
What's an Oject?  Sorry, I couldn't help myself!

--
Lance Birch
Remove the smiley to e-mail.
http://www1.tpgi.com.au/users/ambient/lance


Post a reply to this message

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