Go Back   AC3D Forums > Resources > AC3D Tutorials and How-To's
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 24th February 2005, 05:47 PM   #1
PerFnurt
Member
Expert member
 
Join Date: Aug 2003
Location: Eslöv, Sweden
Posts: 93
Default Poor man's animation

Here's an example of how one can do rudimentary animations, like moving objects about etc. using only AC3D and POVRay.
Alas, I have no knowledge of suitable (=easy to use and cheap) tools that'd be better for this kind'o stuff. Please let me know if you know any.


The idea is to get coordinates from AC3D to move objects about in the animation (in this example just the camera).

Example:
Create a disk and remove it's center vertex. Twiddle its vertexes about.
Something like this (the object in the middle is just an ugly sword):


Save the file and open it in a texteditor (1).
Copy the coordinates.
Code:
OBJECT poly
name "disk"
loc -2.8753 9.9027 2.00898
crease 45.000000
numvert 64
9.31985 0 -1.04631-----+
9.16563 0 -1.45228     |
8.91025 0 -1.85038     |
  .                    |
  .                    |--- Copy
  .                    |
9.31985 0 -0.226486    |
9.37142 0 -0.636399----+
Paste the text into a new file and
replace space with comma.
Replace start of line with "<" (no quotes) and end of line with ">," (no quotes). Easily done if the editor supports regular expressions (^ is start of line, $ is end of line)

Define an array in POVRay and paste the coord to it (and remove the last comma).

Code:
#local cameraPositions =  array[64]
{
<9.31985,0,-1.04631>,
<9.16563,0,-1.45228>,
<8.91025,0,-1.85038>,
  .
  .
  .
<9.31985,0,-0.226486>,
<9.37142,0,-0.636399>

}
Now it's easy let an object move along the path of the coordinates

Code:
#local cameraPosIndex = clock; // clock = [0.0 .. 63.0]

camera 
{
	location cameraPositions[cameraPosIndex] 
	up < 0.000000, 1.000000, 0.000000>
	look_at < 0,0,0 >
}
Of course you can use other things than a disk: lines, revolved vertices and whatnot, but you get the idea.

I do have a feeling this is a VerySilly(tm) approach, but I thought I'd share it anyway as it works for me.

(1) This is because AC3D, as far as I can tell, won't spit out the coords when it generates the .pov since there's no surface.
__________________
/Per

www.perfnurt.se
PerFnurt is offline   Reply With Quote
Old 30th March 2005, 03:44 AM   #2
PerFnurt
Member
Expert member
 
Join Date: Aug 2003
Location: Eslöv, Sweden
Posts: 93
Default PfPOV

If you use the PfPOV plug-in ( http://www.perfnurt.se/pfpov.asp ) you don't have to get the coords from the .ac file and do all the find-replace crazyness.

PfPOV will generate an array for objects that is nothing but a bunch of vertices.
__________________
/Per

www.perfnurt.se
PerFnurt is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 05:34 PM.


AC3D Forum
(C) Inivis Limited 2020