|
![](/i/fill.gif) |
To add to Kens help:
You can also put this together with a #switch. It just gets more lengthy
script-wise but once made saves time. Making a comment line showing a
listing of what's-what for each switchable view helps too.
//BEGIN
#declare CLL = 1; //use one of the numbered sets from below.
#declare Loc1 = <0,1,-10>;
#declare Loc2 = <1,1,-10>;
#declare Loc3 = <0,1,-15>;
#declare Loc4 = <1,1,-18>;
#declare Loc5 = <1,1,-17>;
#declare Look1 = <0,1,1>;
#declare Look2 = <1,1,1>;
#declare Look3 = <0,1,5>;
#declare Look4 = <1,1,9>;
#declare Look5 = <1,1,5>;
camera{
location
#switch (CLL) //your switchable parameter
#case (1)
Loc1
#break
#case (2)
Loc2
#break
#case (3)
Loc3
#break
#case (4)
Loc4
#break
#case (5)
Loc5
#break
#end
look_at
#switch (CLL)
#case (1)
Look1
#break
#case (2)
Look2
#break
#case (3)
Look3
#break
#case (4)
Look4
#break
#case (5)
Look5
#break
#end
}
//END
Ken wrote:
>
> Mike Metheny wrote:
> >
> > When working through a scene, I usually want to zoom in on various parts of
> > my scene. Right now I have various camera declarations commented out using
> > /* */, and switch between them as needed. How do I declare various camera
> > positions/lookats in one easy declaration so i can just change camera_1 to
> > camera_2 or whatever to switch? I hope I'm making myself clear.
> >
> > Thanks guys!
> >
> > Mike Metheny
>
> You can do it like this --
>
> #declare Loc1 = <0,1,-10>;
> #declare Loc2 = <1,1,-10>;
> #declare Loc3 = <0,1,-15>;
> #declare Loc4 = <1,1,-18>;
> #declare Loc5 = <1,1,-17>;
>
> #declare Look1 = <0,1,1>;
> #declare Look2 = <1,1,1>;
> #declare Look3 = <0,1,5>;
> #declare Look4 = <1,1,9>;
> #declare Look5 = <1,1,5>;
>
> camera{location Loc1 look_at Look1}
>
> This way once you have adjusted the numbers in the vectors
> in the #declared statments you need change only two numbers,
> for Loc and Look, and you have a new view.
>
> --
> Ken Tyler
>
> tyl### [at] pacbell net
--
omniVERSE: beyond the universe
http://members.aol.com/inversez/POVring.htm
=Bob
Post a reply to this message
Attachments:
Download 'us-ascii' (1 KB)
|
![](/i/fill.gif) |