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