POV-Ray : Newsgroups : povray.animations : for spotlight Server Time
28 Jul 2024 14:33:16 EDT (-0400)
  for spotlight (Message 1 to 6 of 6)  
From: rsibbald
Subject: for spotlight
Date: 19 Jun 2000 10:39:10
Message: <394E31EB.4B86946@julian.uwo.ca>
perhaps I should clarify....

   I would like to have a line similar to the following...

#declare light_source = camera_location + <0,1,0>

  yet, I can't seem to manage.  Any ideas???


Post a reply to this message

From: Jerry
Subject: Re: for spotlight
Date: 19 Jun 2000 12:08:05
Message: <jerry-BDE7FD.09080319062000@news.povray.org>
In article <394### [at] julianuwoca>, rsibbald 
<rsi### [at] julianuwoca> wrote:

>perhaps I should clarify....
>
>   I would like to have a line similar to the following...
>
>#declare light_source = camera_location + <0,1,0>
>
>  yet, I can't seem to manage.  Any ideas???
>

What problems are you having? The above should work, as long as you 
always want your light source to be 'on a pole' 1 unit higher than your 
camera's location.

#declare camera_location = <0,0,-5>

#declare light_location = camera_location + <0,1,0>


should result in a 'light_location' of <0,1,-5>.

Jerry


Post a reply to this message

From: rsibbald
Subject: Re: for spotlight
Date: 19 Jun 2000 14:01:51
Message: <394E616E.E5B5F19B@julian.uwo.ca>
> The problem arises when I attempt an animation in which

the camera is moving and I want a spotlight to follow the same path
without having to write the lights path seperately.
The message I get when trying  what's below is...
  "cannot assign uninitialized identifier"

ANY IDEAS?


>
>
> What problems are you having? The above should work, as long as you
> always want your light source to be 'on a pole' 1 unit higher than your
> camera's location.
>
> #declare camera_location = <0,0,-5>
>
> #declare light_location = camera_location + <0,1,0>
>
> should result in a 'light_location' of <0,1,-5>.
>
> Jerry


Post a reply to this message

From: C J 
Subject: Re: for spotlight
Date: 19 Jun 2000 14:37:20
Message: <394e6860$1@news.povray.org>
Try this,

#declare ex=0
#declare why=0
#declare zee=-10

light_source {
                    <ex,why,zee>
                    White
                    rotate why*360*clock
}
camera {
                    location <ex,why*1,zee>
                    look_at 0
                    rotate why*360*clock
}


I hope that helps
C.J. - POV User
www.crosswinds.net/~povstudy


rsibbald <rsi### [at] julianuwoca> wrote in message
news:394### [at] julianuwoca...
> perhaps I should clarify....
>
>    I would like to have a line similar to the following...
>
> #declare light_source = camera_location + <0,1,0>
>
>   yet, I can't seem to manage.  Any ideas???
>


Post a reply to this message

From: Peter Popov
Subject: Re: for spotlight
Date: 19 Jun 2000 16:57:22
Message: <jvpsks8s41caj35du87ladriv6jc65q9il@4ax.com>
On Mon, 19 Jun 2000 14:07:42 -0400, rsibbald <rsi### [at] julianuwoca>
wrote:

>> The problem arises when I attempt an animation in which
>>the camera is moving and I want a spotlight to follow the same path
>>without having to write the lights path seperately.
>>The message I get when trying  what's below is...
>>  "cannot assign uninitialized identifier"
>
>>ANY IDEAS?

The identifier 'camera_location' is uninitialized. There's nothing
wrong with this as you have probably not initialized it :) Try
something like this:

#declare camera_location = (some_stuff_that_returns_a_vector);
#declare light_location = camera_location + <0,5,-10>;

camera
{
  location camera_location
  look_at camera_location + <0,-1,5>
}

light_source
{
  light_location color White
  spotlight
  radius 15 falloff 45 tightness 75
}

You get the idea. If it's not clear, don't hesitate to ask.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usanet
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Pabs
Subject: Re: for spotlight
Date: 19 Jun 2000 22:06:52
Message: <394ED1EA.15191119@nospam.hotmail.com>
rsibbald wrote:

> perhaps I should clarify....
>
>    I would like to have a line similar to the following...
>
> #declare light_source = camera_location + <0,1,0>
>
>   yet, I can't seem to manage.  Any ideas???

Look at the docs for spotlights - you will find the point_at keyword
which can be used as follows

#declare camloc = <1,1,1>;//cam position in any one frame
#declare spotloc = camloc+y*3;//make the spot location be 3 pov units
above the camera location
#declare look = <0,0,0>;//cam lookat position in any one frame
camera{
    location camloc
    look_at look //look at this point
    ...
}
light_source {
    spotloc
    spotlight
    point_at camloc //point at the camera
//    point_at look //point the spotlight at this point (where the
camera is looking)
    rgb 1
}

Hope I was of some/any help

Pabs


Post a reply to this message

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