Just Another Boring Animator ...

Washington 13.Nov.1997

The World Of Three Dimensions
Just Another Boring Animator (JABA)


Varol Okan









The Persistance Of Vision Ray Tracer (POV RAY) has a lot of very usefull tools, to develop modells and visualize computer rendered scenes. There are so many Free- and Shareware programs out there, that it is hard to determine, which one is the best, for which purpose. And here am I, planning to programm just another Modeller, So why ?

The answer is simple. The better the tools are, the more complex they are, and the more they tend to be ‘just’ Shareware. To have all neccesary tools, one need to generate a scene, or even worse a animation, one has to travel to the whole WWW space. Thus giving a lot of possible solutions, and a lot of software, to look for.
I know it, cause I was there.

At the end of some days of Internet search, one has a couple of megabytes full of Modeller, Scene-Editors and Animation tools (see Links). And some of them are very specific to just a part of the 3-D world. But mostely one need to do something else, something very neat, something very special. And the best Tool can be quite frustrating, if the solution is complicate to handle, if at all.
Another possible solution would be, to just download another tool every one time. Hmmm, why learn about all those tools, if one could have them all together in a big paket ???

And besides the Animation tools out there are not as good as they could be. There are a lot of very good ideas in every single Modeller, Scene Editor, or Animator. To bring out just the best of it (in my opinion of course) one has to use them, and pick out the best of the ideas, which are practicable and clear to understand. The Screen should help to understand the tasks one can do, instaed of irritating. And Everything should be truly interactive. So, to view it this way, the WEB landscape is in dire needs for a simple to use, easy to understand and learn, fast POV RAY tool, to generate not only Object, Scenes and Textures, but also Animation.

This is the effort, to give all of this to the world outside for free, for good and for further developement. So, the Source Code will always be available.

One last thing, I am pretty busy right now with other things, so it could happen, that the first versions of the first tools which later on are building the application wount be released before christmas 98.
But then of course, good things will take a while to develop, and I do what I can ... So stay tuned ...

Varol Okan

The beginning ...

To generate an animation, one need to have :

  1. Ideas
  2. Patience
  3. A fast Computer
  4. The right Software
The right Software in my case is POV-RAY, a text based ray tracer. Although there are other useful and free tracing software out there, POV-RAY is the starting point for later developement towards BMRT, Polyray etc.

To generate animations by hand, one would have to calculate a lot of values, must be sure about every little part in the scene and write a lot of code, to display the animation, step by step.
An animation can be as simple as a bouncing sphere on a checkered floor, or as complicated as some hundered UFOs in front of a Computergenerated mountain, with trees, and a see, dipped into a light white fog, during a red-orange sunrise.

If we take a closer look however, every animation, how complex it might be, consits of OBJECTS, put together to a SCENE and a path of action, each simple vertex or texture can pass for the ANIMATION.
The whole bundle is already split into three different parts. And one should follow these parts to generate the animation.

Now that we have clarified the parts neccesary, we should think about some features, needed, and some possible extensions not neccesarily needed.

Project description :

The Object Editor ...
The Object Editor is probably one of the hardest parts and has to be done first. He comprises all of the tools, to generate, model and display the objects, and has the need for the biggest Library.
An Object can be a simple sphere or a detailed face. Ojects are also a high-field, fog, Blobs or CSG-object. It should be possible, to define all possible parameters for any object, within this Editor. The Object Editor itself can be splitted into three different parts as well.
The Object Generator, the Object Modeller and the Surface Modeller

However each generation step should be completely transparent to the user and extendable through other tools (i.e. it should be possible to start other applications from within this Modeller and work there with the data, or receive the data from them). The program has to parse through the input file, and extract the Object information from it, convert this information to the shader (OpenGL, Direct3D etc.) language, to display them at the proper window and generate a hirarchy structure, to display them in the right order. Because of the huge variety of the tracer (POV-RAY, Renderman, Polyray, etc.) language this will be the hardest part. The implementation of the complete language features.

To Be Continued ...

The Object Modeller ...
If you have already the Object Editor, the Object Modeller is just a minor problem to do. This tool is responsible for :
‘Bones’ are closely related to the Animation part. Two types of ‘Bones’ are available. The first one is a ‘Hard Bone’ which can be pretty much compared with a stick, stuck in a piece of Ice. If you rotate the stick, the whole block of Ice will move along. It’s both ends can be connected to other Vertices, bones or a special defined Vertex in the 3D space. The different angles of freedom for any each side of any bone can be defined, plus a ‘Physical’ description of its behaviour at that point (e.g. if the end is fixed, or if it follows Physical rules, like a faling forearm, who pulls the upper arm with it). There is also a ‘Soft Bone’, with whome it is possible, to flex, bend the Object, pretty much like a Hyperpatch does it, but has also all features of a ‘Hard Bone’. It is used, to build muscles for example. If you stretch, or compress a Object, the Volume keeps the same, Like the Ball, bouncing to the earth, and get compressed in one way, but stretched in the other.
Also closely related to the Animation part is the Physical description of specific Vertices of an Object, or of the whole object. For example the bouncing ball. Not only the Ball follows the rules of gravity, but also the different Vertices while hitting the floor obey some deformation rules.

To Be Continued ...

The Surface Modeller ...
The Surface Modeller helps to define the properties of an object. Those properties can vary from object, to object. It comprises the transparency, the finish, the light reflection, refraction, the Bumpmap, the texture map and the color. For the texture and bumpmap part a special editor is used, to display, modify and apply the texture to the object. However, since POV-RAY is calculating the textures in 3D space, the result might differ from the just planar calculated and then applyed texture. Remember, that the preview window has to be a little bit faster then POV-RAY, otherwise one would’nt have the need of it at all.

The programming ...

When I run my first Ray tracer I was overwhelmed by the quality, the colors and the 'speed'. This was back in 1984 on a Comodore 64. The calculation of the 320*200 pixel sized kitchen took over one day. The quality was about what one can expect nowadays from a good shader library (like OpenGL) and the printout on my 9 dot B/W printer was a proud part of my room for the next couple of years.

While planing JABA, I thought it might be nice if I also give a few lines on how I did things. So I started to write this Programming guide. As of now I do not know how big this guide will become, or how detailed I will go into the subject, but as part of the whole, I think it should be worthwhile reading. This is why I put it into a book like form, with chapters.
Those chapters are sorted by the timeframes I developed the different parts of JABA. Every chapter itself will end up with a whole bunch of more or less useable code examples which will run on their own, as well as the developement of at least one major program part of JABA.

The small program fragments should help to understand the basic programing techique behind the application parts and can be used as low-level stand alone applications. The code that will later on get implemented into JABA will most probably look more or less different from those applications, to make it work together as a unit.

To start a project like this, one could start right in the middle with Vertices, transformation matrices, 3D graphics file format conversation etc. But the better way is actually, to split the project, to some well defined chunks of work. So, I start with the Texture Modeller, since it will give me some time, to learn more about what I’m going to do.

First of all I need to implement all 2D-Picture Formats neccesary.
As they are :

All but JPG and TIFF (yep, its possible to create JPG-Packed TIFF's) are lossless compresion formats. And JPG is adjustable in its ratio, so if one need to store more pictures/Scenes on a harddrive, one has to increase the ratio level. Also all pre-rendered Textures and explanational Pictures are stored as JPG.
I decided to not implement the GIF format, even if it is possible to generate smal animations with it since it compresses the pictures by decreasing the bandwidth of available colors to a maximum of 256 and due to the licence policys of Unisys (Read also this). I’m sure the formats above are enough. Also the TIFF - Format is extendable, which I will use, to generate short anims in JPeG compressed TIFF's. Plugins and MCI-Interface will be available then ...
There are also some Animation tool available, like in PSP 5.0, wich generate a GIF animation fairly easy from given pictures.

For the best picture quality, JPG is not always the best solution. It is the best solution for photos because it utilizes the weakness of our eyes. For the most pictures generated with ray-tracer and shader, a GIF like compression is better. This compression algorithm is based on reducing the colors used in a picture to 256 different colors. So pictures with sharp edges, few colors and high details, JPG artifacts can destroy the whole impression and be still bigger in size then pictures who were reduced to 256 colors and run length encoded.

For information about the different Graphics formats, look under :

http://www.dcs.ed.ac.uk/~mxr/gfx2D / 3D Grafix formats description.
http://wotsit.simsware.com2D / 3D Grafix formats descritpion.
http://www.smalleranimals.com/ImgDLL, DLL for all needed 2D file formats.
http://cg.cs.tu-berlin.de/~ki/3de_src_win.html3D Render engines.
http://www.microsoft.com/directx/resources/default.aspDirectX driver from Microsoft
http://reality.sgi.com/opengl/OpenGL driver for nearly all platforms from SGI (The better choice)
http://www.opengl.org/Everything about OpenGL
http://www.europa.com/~keithr/crossroads/Crossroads application for all needed 3D file formats.

The classes generated, to handle these formats converting them all to the internal used BMP format, and make the data available through the function BITMAP *GetBmp()

August 1998 : As of now I realize that I need to organize my whole project better. I have a lot of very good ideas on a lot of very widely spread papers. I need to develop a software first, to keep track of my ToDo-Database, as well of the Done DataBase. Also producing reports for a better view of the progress I had, and the time consumed ...
I need to implement for the main Beta Version a minimum of 2 different Formats of each Project part. I.e. BMP and PCX, OpenGL and PoV-Ray, FLI and AVI, AL and RenderMan animation. Also The usage of Plugin and their interface to the application.

The next steps are :

A short Listing : the best of the best ...
Midnight Modeller : A very flexible and easy to learn Modeller for the basic constructions
Moray : A Wire Frame Modeller for PovRay and PolyRay. (So far the best shareware user interface out there)
sPatch : A very good tool to generate surface Patches
Rhino : The GUI is excelent, the price too high ...
MARS : A Network transparent 3D Enviroment under GPL and construction.
Vue'd Esprit : A landscape generator / animator on a high quality level. With vegetation Plug in
Mind's Eye : A very under construction project for Linux ... But very promising ...
Blender : Powerful Freeware animator for Linux ...
AnimationLanguage : An animation script origins from RenderMan
Pov Magazin : Deutsches Povray magazin with a lot of course material (suitable for Help files).

Author: Varol Okan
Last Updated: August, 3'rd 1998