Posts

Showing posts from April, 2021

Transition Macros

As part of my animation work I have a set of macros which simplify moving objects from one location to another, or in some other way allow me to transition an object from one state to another. Linear Changes There are going to be times when you want to fade a scene to black or from black, or fade between two scenes. You will want things to be at a starting state up until the motion or change begins, and for it to be at a certain place when the motion ends, and for it to stay there, and for the movement in between those times to occur at a steady rate. When that is the case, a macro like the following will come in handy: #macro Transition(tNow, tStart, pStart, tEnd, pEnd) #if (tNow <= tStart) (pStart) #elseif(tNow >= tEnd) (pEnd) #else (pStart + (pEnd - pStart) * (tNow - tStart) / (tEnd - tStart)) #end #end Call this macro with the parameters set to the following values: tNow : Set this to the current time of the animation (or the time for which you

Star Field Generator

A lot of POV-Ray users are fans of science fiction, and for this reason will want to create scenes set in space, or if not a fan of science fiction will want an appropraite background for scenes set at night. Whatever the reason, a method for adding a starry backdrop to a scene is a useful addition to your POV-Ray library. A lot of the attempts that have been released make use of a POV-Ray texture, usually a marble pattern that is mostly black with with just enough white (or other light colors) to create the appearance of stars against a black background. This works because it uses the pattern as essentially a random number generator, with a high threshold for turning a pixel on. This can work but for animation work it has several drawbacks: A pattern that generates a scattering of stars at one resolution will have different results at another resolution, most likely fewer stars at lower resolutions, and bands of white matching the underlying pattern used to simulate the effect at

Using ffmpeg

ffmpeg is a utility that can manipulate audio and video files in a large number of ways. For animators, its primary use is to take still images and generate a video file from them. There are some GUI video encoders that are a GUI front end bundled with ffmpeg, but ffmpeg is a command-line utility. I'll describe the command line options that I use when making my animations. As I've said in earlier posts, I am not yet working with sound in my animations, and so I haven't explored the options required for including sound in a video file. The command line I use a .BAT file to run ffmpeg, to avoid having to type out the same command line over and over. Here is the command line that I use for creating the final animation from all of the sets of generated frame files: "C:\Program Files\ffmpeg\bin\ffmpeg" -f concat -safe 0 -i framelist.txt -r 24 -y -c:v libx264 -pix_fmt yuv420p final.mp4 Here is what each term does, in order of its appearance in the command line: &

My Main Scene File

For every animation project I have just one .POV file, and this file will reference all of the other files needed for the animation. I generally name the file main.pov ; each animation project has its own folder, so there's little potential for confusion. The file basically does four things. Read and interpret the render settings POV-Ray exposes several of the rendering parameters to the scene description language (SDL). I used them to set up the camera and other scene-level aspects of the render: Shot : POV-Ray allows the user to pass variables from the command line to the SDL. I use this to specify which shot is being rendered. There's no fall-back code so that things will fail noisily if I forget to set them in the .INI file. Test : I also pass a simple 0 or 1 to indicate whether I an running a test render or a final render. If for some reason I've left this out of the .INI file then I supply a default: #ifndef(Test) #declare Test = 1; #end Time : If th

Scene File Organization

As an amateur animator you will be doing most if not all of the modeling, and essentially all of the scene development, animation, and animation tests for your work. As you're starting out your animation will be on the low end of the ambition scale, you won't have too many POV-Ray scripts, and because you know where everything is you'll be tempted to keep everything in one folder. I'm going to modify this tendency with a few small advisos so that you can establish good habits that will avoid trouble in the future, when your animations get more ambitious. Initial Installation When you first install POV-Ray and run POV-Ray it will create a folder named POV-Ray in your Documents folder, and within that folder it will create a sub-folder named after the installed version of POV-Ray (this will be v3.7 as of this writing). Inside this folder you will find all of the other data files that POV-Ray installs for your convenience. This folder in turn has the following sub-fo

Tools for Amateur Animators

The Persistence of Vision Ray-tracer (POV-Ray) POV-Ray is a freeware 3d renderer that has been around since the late 90's. I first started working with it back in 1997, and produced my first animation in 1998 for the April-July round of the Internet Ray Tracing Competition. At the time I was living paycheck-to-paycheck and so I barely had enough money for the computer I was using, which meant no money for commerical modeling and animation tools, and because POV-Ray is free to download and use this was a god-send. For most users the chief weakness of POV-Ray is that it does not come with a modeler; it is strictly a rendering package that uses script files to describe the scene content. The scene description language is capable of describing any scenery that the user could want, but for many objects of interest a hand-edited scripting language is simply not practical. There have been efforts to create modeling applications for POV-Ray, but for the most part they don't have all

Yet another amateur animator's blog.

Welcome to yet another blog. Figments of Innovation is where I will be publishing the things I've been doing as an amateur animator. A lot of my animation work was done for the Internet Ray-Tracing Contest, which was hosted by the developers of the Persistence of Vision ray-tracer (also known as POV-Ray), but the IRTC died on the vine back in 2006, and since then other hobbies have been taking up my spare time (namely video games and playing with my grandson), so my animation output has been greatly lacking. In this blog I'll be posting articles about making animations in POV-Ray, to include modeling tips, encoding videos, and what-not.