|
![](/i/fill.gif) |
Two points here:
1) You probably don't want to use looks_like for the whole lamp as
looks_like = no_shadow for the whole object and I assume you wnat parts of
the lamp to shade the light as in call 2.
2) I think the problem that you see with the lighting has to do with the
light source being so close to the wall. When a light source is close to a
flat surface like that, the illumination falls off very rapidly, if you look
at the side walls, they are probably better lit than the wall with the lamp
on. There was some discussion a while back about this and IIRC, it was
pointed out that this is a somewhat realistic behavior, if you look at the
ceiling of a room with a ceiling light, it will seem less lit than walls.
Someone else probably has more info on this than I.
-tgq
"marabou" <not### [at] available yet> wrote in message
news:3be6ad6d@news.povray.org...
>
> hello,
>
> as probed different lamps i get confused as i tried this:
> a lamp consists of a quarter of a sphere and has a flat cylinder on it
> which emitts the light and hangs on a wall (see pic).
> at first i tried to make this object and give to light_source the
parameter
> "look_as", second i build this object with a light_source in it.
> both times the results are not satifactionally (see pics).
> does someone know what i did not see?
>
> first call:
> light_source {
> < 0,0,0 >
> color White
> looks_like { hohllampe (off)}
> translate < towhereyouwant >
> }
>
> second call:
> object { hohllampe(on)
> translate < towhereyouwant >
> }
>
> //code for
> //------------------------------hohllampe
> //glow = on -> self glowing
> //glow = whatyouwant -> not self glowing
>
> #macro hohllampe (glow)
>
> union{
> difference{
> //main body
> sphere {
> <0,0,0>,1
> scale <0.15,0.15,0.15>
> }
> //two boxes cut the sphere
> box {
> <-0.5,0,-0.5>,<0.5,1,0.5>
> }
> box {
> <-0.5,-0.5,0>,<0.5,0.5,1>
> }
> pigment {color White}
> //finish {ambient 0}
> }//difference main body
> //light source
> cylinder{
> <0,0,0>,<0,1,0>,1
> scale <0.15,0.01,0.15>
> pigment { color White}
> no_shadow
> finish{ ambient 0.25}
> }
> #if (glow=on)
> light_source {
> <0.07,0.005,-0.07>
> color White
> adaptive 1
> }
> #end//if
> }//union
> #end//macro
> //------------------------------hohllampe
Post a reply to this message
|
![](/i/fill.gif) |