POV-Ray : Newsgroups : povray.animations : camera motion Server Time
23 Nov 2024 11:53:51 EST (-0500)
  camera motion (Message 1 to 2 of 2)  
From: kike
Subject: camera motion
Date: 29 May 2008 05:55:01
Message: <web.483e7ca0eaa1b6dfbe7bfb550@news.povray.org>
Hi:

All of us know how complex is to move the camera in a soft way in POV... well,
it is complex for me!!!, jajaja

Well, I have seen that some people uses splines to move the camera in a soft and
continous trayectory. But for me it will be interesting to have a program that
allowes you to draw the 3D trajectory by hand and then to write it down into
numbers (coordinates). Probably, to write function pieces would be much better,
but an enough large set of coordinates would be ok aswell.

I suppose I could do something like this by programming in Fortran, but that is
my daily job so I would like to avoid that choice...

Somebody knows about something like this (obviously not Maya or 3Ds, jejeje).

Thanks in advance and go on working

-----------------------------------------
www.enriquesahagun.es


Post a reply to this message

From: Chris B
Subject: Re: camera motion
Date: 29 May 2008 07:19:02
Message: <483e9126$1@news.povray.org>
"kike" <dry### [at] hotmailcom> wrote in message 
news:web.483e7ca0eaa1b6dfbe7bfb550@news.povray.org...
>
> Hi:
>
> All of us know how complex is to move the camera in a soft way in POV... 
> well,
> it is complex for me!!!, jajaja
>
> Well, I have seen that some people uses splines to move the camera in a 
> soft and
> continous trayectory. But for me it will be interesting to have a program 
> that
> allowes you to draw the 3D trajectory by hand and then to write it down 
> into
> numbers (coordinates). Probably, to write function pieces would be much 
> better,
> but an enough large set of coordinates would be ok aswell.
>
> I suppose I could do something like this by programming in Fortran, but 
> that is
> my daily job so I would like to avoid that choice...
>
> Somebody knows about something like this (obviously not Maya or 3Ds, 
> jejeje).
>

Hi. Not sure if this is the sort of thing you're after, one approach I've 
investigated (for other purposes) is to use Inkscape to draw a path.

Inkscape saves 2D vector graphics as SVG files by default, but has an option 
to save as a POV-Ray prism object which gives you the 2D coordinates of a 
bezier spline. Bezier splines have 4 points per line segment with points 1 
and 4 being the points on the curve and points 2 and 3 being control points.

Although the POV-Ray spline function doesn't support bezier splines, 
Inkscape writes the coordinates in sets of 4 per line that are all aligned 
properly and, for a continuous curve, point 4 on one line equals point 1 on 
the next line, so you can easily extract all of the points on the curve by 
simply taking the first vector from each line.

Sounds a bit complicated, but I think you should be able to generate an 
orthographic plan from POV-Ray, load it as a bitmap into Inkscape. Scale 
appropriately, then draw a 2D path on the plan that you can save as a 
POV-Ray prism object. Just pick up all of the points defined for the curve 
by selecting the first vector from each line using columnar select in a text 
editor.  You can then 'edit in' a third coordinate (easy if you want a 
constant height) and a value setting to build the points into a spline 
definition and, hey presto, you've got a path for the camera to follow.

Note. By not using the control points, the shape of the curved segments 
between the points won't be exactly the same as in Inkscape, but if you use 
enough points for the path in Inkscape, then the resulting spline should 
closely follow the line. This is easy to do in Inkscape because there's a 
little icon that lets you insert new nodes between all selected nodes, so 
you can create a nice smooth path using a small number of points and their 
control points, then add a bunch of intermediary nodes before saving as a 
prism.

Note 2. I haven't tried out exactly this approach as my objective was 
different to yours, but I regularly use prism objects generated using 
Inkscape and have experimented with using points for different spline types, 
so I'm pretty sure this will work. If this approach interests you I'd be 
happy to do a couple more experiments to test it out.

Regards,
Chris B.


Post a reply to this message

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