POV-Ray : Newsgroups : povray.binaries.images : New Slime-POV feature: function camera Server Time
16 Nov 2024 22:22:32 EST (-0500)
  New Slime-POV feature: function camera (Message 1 to 9 of 9)  
From: Slime
Subject: New Slime-POV feature: function camera
Date: 10 Nov 2002 13:04:56
Message: <3dce9fc8@news.povray.org>
This is a feature I've wanted for a while now. You can create your own
camera using 6 functions: the first three specifying the location (x,y,z) of
the camera, and the second three specifying the direction the camera should
look in (or, optionally, a look_at point). All the functions are in terms of
u and v.

I used it to create an effect that I remember someone asking about not too
long ago, where the camera looks in all directions creating an image that
can be wrapped around a cube. The first attached image is that picture
created with the function camera. The second image is the first image
UV-mapped on a  cube, from the inside. (This is essentially a different way
of doing environment mapping.)

Of course, this is just one of tons of possible uses. More example images to
come, later.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message


Attachments:
Download 'functioncamera.jpg' (16 KB) Download 'functioncameraresult.jpg' (22 KB)

Preview of image 'functioncamera.jpg'
functioncamera.jpg

Preview of image 'functioncameraresult.jpg'
functioncameraresult.jpg


 

From: Christoph Hormann
Subject: Re: New Slime-POV feature: function camera
Date: 10 Nov 2002 13:49:19
Message: <3DCEAA2F.6E2E8B13@gmx.de>
Slime wrote:
> 
> This is a feature I've wanted for a while now. You can create your own
> camera using 6 functions: the first three specifying the location (x,y,z) of
> the camera, and the second three specifying the direction the camera should
> look in (or, optionally, a look_at point). All the functions are in terms of
> u and v.

Sounds very interesting although creating three separate functions for
specifying a vector is quite complicated and ugly for the user.  As
discussed in the function warp thread i think using vector functions -
although those can only be created using the average pigment trick or
Chris Huff's G patch right now - are probably a better solution.

Another possible use would be the 'multiple views in one image' scene. 
Therefore the possibility to specify the other camera parameters with
functions too would also be useful.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 02 Nov. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Slime
Subject: Re: New Slime-POV feature: function camera
Date: 10 Nov 2002 14:39:02
Message: <3dceb5d6$1@news.povray.org>
> Sounds very interesting although creating three separate functions for
> specifying a vector is quite complicated and ugly for the user.  As
> discussed in the function warp thread i think using vector functions -
> although those can only be created using the average pigment trick or
> Chris Huff's G patch right now - are probably a better solution.

I dunno. I think pigments would be harder to work with. If POV-Ray supported
vector functions, I'd definitely use them, but right now this seems like the
best way to do it. I like the idea of integrating it with Chris' G patch,
but that will have to wait until his patch is finished.

> Another possible use would be the 'multiple views in one image' scene.

Yup. Stereoscopic images, for instance.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Christoph Hormann
Subject: Re: New Slime-POV feature: function camera
Date: 10 Nov 2002 14:50:05
Message: <3DCEB86B.F66219A3@gmx.de>
Slime wrote:
> 
> > Sounds very interesting although creating three separate functions for
> > specifying a vector is quite complicated and ugly for the user.  As
> > discussed in the function warp thread i think using vector functions -
> > although those can only be created using the average pigment trick or
> > Chris Huff's G patch right now - are probably a better solution.
> 
> I dunno. I think pigments would be harder to work with. If POV-Ray supported
> vector functions, I'd definitely use them, but right now this seems like the
> best way to do it.

I'm not sure if you understand it correctly.  POV-Ray does support vector
functions in form of transform, spline and pigment functions.  Just for
defining a vector functions through formulas you need to use a pigment
function with an average pigment.  This can be simplified with macros of
course.

So by using vector functions in your patch syntax you don't loose
anything, you just gain additional options.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 02 Nov. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Christopher James Huff
Subject: Re: New Slime-POV feature: function camera
Date: 10 Nov 2002 15:02:08
Message: <chrishuff-8CCD53.15015110112002@netplex.aussie.org>
In article <3dceb5d6$1@news.povray.org>, "Slime" <slm### [at] slimelandcom> 
wrote:

> I dunno. I think pigments would be harder to work with. If POV-Ray supported
> vector functions, I'd definitely use them, but right now this seems like the
> best way to do it. I like the idea of integrating it with Chris' G patch,
> but that will have to wait until his patch is finished.

Not really. If you get it working with vector functions, it will work 
just by adding the G patch. In the meantime, though awkward, vector 
functions such as pigment functions would work.

Another thing that should be easy to add would be a vector function that 
uses 3 functions directly. A bit hackish and not a good substitute for 
real vector functions, but easy to do and would make things more 
consistent than having to write code for handling 3 float functions 
every time.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: New Slime-POV feature: function camera
Date: 10 Nov 2002 15:05:25
Message: <chrishuff-52F51A.15050910112002@netplex.aussie.org>
In article <3DCEAA2F.6E2E8B13@gmx.de>,
 Christoph Hormann <chr### [at] gmxde> wrote:

> Another possible use would be the 'multiple views in one image' scene. 
> Therefore the possibility to specify the other camera parameters with
> functions too would also be useful.

Some kind of "multicamera" where you specify a camera for different 
regions of the image...just rectangular tiles would be too limited 
though, maybe control it with a pattern? Heh...a camera_map. Weird idea, 
maybe not very useful, but you could do things like insect vision with 
it.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Slime
Subject: Re: New Slime-POV feature: function camera
Date: 10 Nov 2002 20:44:50
Message: <3dcf0b92$1@news.povray.org>
Well, pigment functions don't really return vectors, they return colors.
Same thing, I know, but with a different number of dimensions.

So I assume you're proposing some sort of syntax like:

#declare myvectorfunction = vfunction {
function{...}
function{...}
function{...}
}

#declare myothervectorfunction = vfunction(a,b,c,d){myvectorfunction(a,b) +
myvectorfunction(c,d)}

sorta like that? That would be quite difficult to implement, I'd think...

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Christopher James Huff
Subject: Re: New Slime-POV feature: function camera
Date: 10 Nov 2002 22:21:26
Message: <chrishuff-9B93B7.22210810112002@netplex.aussie.org>
In article <3dcf0b92$1@news.povray.org>, "Slime" <slm### [at] slimelandcom> 
wrote:

> Well, pigment functions don't really return vectors, they return colors.
> Same thing, I know, but with a different number of dimensions.

I don't think the POV parser cares. You can use a color vector anywhere 
you can use an ordinary 3D vector.


> So I assume you're proposing some sort of syntax like:
> 
> #declare myvectorfunction = vfunction {
> function{...}
> function{...}
> function{...}
> }
> #declare myothervectorfunction = vfunction(a,b,c,d){myvectorfunction(a,b) +
> myvectorfunction(c,d)}

The first one, not the second one. I'd actually probably try for 
something more like:
#declare myvectorfunction =
function {
    {...},
    {...},
    {...}
}

The second one would require implementing vector math in the POV VM.


> sorta like that? That would be quite difficult to implement, I'd think...

I don't see why. I'll take a closer look at this some day, but I think 
it would be pretty easy.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Rohan Bernett
Subject: Re: New Slime-POV feature: function camera
Date: 19 Nov 2002 19:40:37
Message: <web.3ddad892525c5852b2769afa0@news.povray.org>
>I used it to create an effect that I remember someone asking about not too
>long ago, where the camera looks in all directions creating an image that
>can be wrapped around a cube.

That was me asking about that. The wrapping seems to work best if the source
image has a fairly high resolution. Using Ken Silverman's Kube viewer,
which I think runs at 640*480 by default, 512*512 pixels for the rendered
views seems to look best (there probably wouldn't be much point in using
anything higher). Well, from what I've tried hi-res inputs look best.
Low-res inputs don't give a very good picture - they end up with the pixels
from the source becoming visible, and making the cube noticeable. I'll post
my images in here IF the admins ever get around to adding attatchments
capability to the web interface.

My cubeview images so far are a landscape, and a group of simple objects,
and 2 sky tests.

Rohan _e_ii


Post a reply to this message

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