24th February 2005, 05:47 PM | #1 |
Member
Expert member
Join Date: Aug 2003
Location: Eslöv, Sweden
Posts: 93
|
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----+ 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> } 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 > } 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. |
30th March 2005, 03:44 AM | #2 |
Member
Expert member
Join Date: Aug 2003
Location: Eslöv, Sweden
Posts: 93
|
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. |
|
|