POV-Ray : Newsgroups : povray.binaries.images : Wooden Furniture : Re: Wooden Furniture Server Time
10 Aug 2024 01:26:11 EDT (-0400)
  Re: Wooden Furniture  
From: Stephen
Date: 21 Dec 2004 02:30:10
Message: <41c7d102$1@news.povray.org>
Thanks for the update.

I tried something new which I thought I'd share. Typically I move lights
around until it "looks right", but now that they're farther away than I had
been placing them, it's a bit harder to guess how far they should be moved
to make a significant difference in terms of the vector of the light and the
vector of the camera.

So..... Let's find out where the lights actually are and make them visible
for testing:

1) define the light's position
#declare LightSource0 = <   0,    0,    0 >;        // assume this is the
center of your scene or an important element:
#declare LightSource1 = < 300,  200, -300 >;
#declare LightSource2 = <-300,  100, -300 >;
#declare LightSource3 = <   0 ,  70, -300 >;

2) define the lights at that position
light_source { LightSource1  color rgb <1.0,1.0,1.0>   }
light_source { LightSource2  color rgb <1.0,1.0,1.0>   }
light_source { LightSource3  color rgb <1.0,1.0,1.0>   }

3) build a cylinder from the "origin" towards the lightsource, but not all
the way to the light because it then blocks the light
Perhaps there's other ways to do this, but this works.
cylinder { VWith_Len(vnormalize(LightSource1), 120), LightSource0, 1.0
pigment {Red} }
cylinder { VWith_Len(vnormalize(LightSource2), 40), LightSource0, 1.0
pigment {Green} }
cylinder { VWith_Len(vnormalize(LightSource3), 40), LightSource0, 1.0
pigment {Blue} }

Now that I know where the light is pointing from, I can see why I have
shadows in certain places.  Works for me.

-- 

Stephen
and
Kathie
(S+K)

news:41c525eb@news.povray.org...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mike Thorn wrote:
>
> | First of all, a default light source has no falloff. The light rays
> will
> | be equally bright whether they're 100 units away or 10,000 units. The
> | only difference is how many rays hit the object (since a default light
> | source emits light in all directions, placing the light source very
> far
> | away spreads the rays out more, thereby making an object *appear*
> | darker). In reality, it's just receiving fewer beams.
> |
> There appears to be a small misunderstanding on how light sources
> work here. For regular light sources (ie not area lights), there is
> exactly one ray of light for each point of your object no matter what
> the distance to the light source. If you don't use anything special
> like falloff or semi-transparent objects, that light ray will have
> the exact intensity specified in the light source definition. As a
> result, the object will have about the same brightness no matter how
> far the light source is situated. However the brightness is affected
> by the angle between the light ray and the surface: it is maximal if
> the ray hits the surface straight on and diminishes to zero when the
> ray is nearly parallel to the surface. This is why placing the light
> source farther away makes for more uniform illumination: the farther
> away, the closer to parallel the rays.
>
> Incidentally, your description ("rays spread out more") is more or
> less what happens in real life and the reason why real light sources
> get dimmer with distance.
>
> | There are ways to make the light sources behave realistically. POV-Ray
> | supports light falloff and fading, which, when set properly (an area I
> | can't advise on, unfortunately) can produce quite realistic
> results. If
> | you want to look these up, look for the 'falloff' and 'fade_distance'
> | keywords in the Help file.
> |
> To get realistic results, you should use "fade_power 2" and set the
> fade_distance to the size of your light bulb, then give a *very* high
> value for light intensity (you do know that intensity is not
> constrained to the 0-1 range, don't you? In fact you can even create
> negative light sources wich allows for some interresting special
> effects...). 'falloff' has nothing to do with it and has meaning only
> with spotlights and cylindrical lights: it defines how much light you
> get as you get further from the center of the beam.
>
> BTW, if you intend to use cylindrical lights, read the doc
> carefully, they probably don't do what you think. To get the right
> effect, you'll have to look at the 'parallel' keyword :p
>
> Jerome
>
> - --
> ******************************
> *      Jerome M. Berger      *
> * mailto:jbe### [at] ifrancecom *
> *  http://jeberger.free.fr/  *
> ******************************
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
>
> iD8DBQFBxSXpqIYJdJhyixIRAtD6AJ9/Pr7e2Fq16s0OIHA9exblcJ9NHgCeKBO0
> AYq6+ef9Ev9ahbfnsBNmEBQ=
> =DYOL
> -----END PGP SIGNATURE-----


Post a reply to this message

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