Saturday, October 18, 2008

Thinking about programming

I am going to have a normal pace of life and a normal work life coming up soon. Thus I have started thinking about what the next phase of my project is.

The project is to build an environment to allow the creation of the most beautiful digital art imaginable through the use of animation, 3d, and 2d composition. The gist is to build an environment where it is easy to build scenes, animations, create really interesting effects and perhaps presentations.

This is a real-tme environment, so it will not be built for offline processing. This means that the results are fit to be used as screen savers, in games, or whatever. But it will not be able to do pixar level computer graphics.

It is to be simple enough that anyone (any digital artist familiar with photoshop) can use it but allow extreme customization and sophisticated manipulations of the scene, animations, and anything else both from the user and programmatically.

This is not a content creation tool. I am not building photoshop nor Maya but I am looking for a composition environment much closer to After Effects or a game engine.

This is also going to be a mental device to help me really figure out what the next stage of graphics is going to look like from an authoring environment point of view.

Something interesting I look forward to is building a computer with both a larrabee style compute card and a high end NVIDIA card and building a rendering environment that will be able to efficiently and interestingly use both GPUs together. Perhaps I program most of the rendering to go on the NVIDIA GPU and just use the larrabee component for extremely sophisticated blending effects.

I believe that user creation of effects, mainly fullscreen effects but hopefully also new animation methods is extremely important. You can do such amazingly cool things when you can program multi pass shader based effects that I believe having it being easy to add new ones is really the best thing you could do.

I think having powerful compositional abilities on several levels as well as extreme application extensibility is key. I want it to be able to combine several 3d assets together into a model, and I believe it is important to be able to compose multiple models together into a new, more sophisticated model. I think animations should be equally composable, although the rules for composition animations are quite complex (like transitioning from a walk to a run in a 3d animated character). Collections of animations,

Composition and extension as well as application programability are key to the success of the system. You need to be able ot compose effects, compose models. You need to be able to combine and compose animations. Given a time context and an animation graph, I believe you should be able to embed one animation graph in another as well as run with suitable transitions from one tme context to another.

Combining and composing pieces of content are key to success. The user should easily be able to create "symbols", or name their specfic compositions and should also be able to compose and group symbols.

In any case, that is the overall vision. First, I need to get some simple opengl and application datastructures working. I am not going to use c++ for the entire application, but I want the view to be in c++. This gives me easy access to a lot of application libraries and also to gtk, or anything else I want to check out.

Then there will be some interface into a higher level language. I was thinking LISP for a long tme but I think I will use Haskell instead. LISP is a very, very beautiful language and perhaps the best dynamically typed language ever invented. It represents the epicenter of programming language beauty due to is extremely programmable compiler and extremely regular syntax.

Haskell, however, represents something else. It is what people are actively researching. A lot of the most interesting research papers and written in Haskell and I believe that currently, it represents the forefront of the absolute best idea a lot of smart people have about what a programming language should be.

In short, I think that LISP is amazing and beautiful in its simplicity. I believe that Haskell represents the immediate future of a very interesting view of programming is the best language to learn moving forward if you really want to get down to the bottom of this whole language thing.

I have over the course of 2 years researched different aspects of the project. I first research xml and xml-schema very heavily because I thought I wanted the application to be built around a schema graph based on actual XML schema (with some natural extensions). I believe now, however, that the core of the system needs to be built around a custom schema graph with a custom data graph representing instantiations of objects in the schema graph.

It is interesting because a schema represents a graph generator. The data graph represents one possible instantiated graph. I believe that building the core of the data model around this design will allow for the level of extensibility I require for a good 3d data model.

If I separate the process of getting values from the graph then I can put, in essence, put caching layers or animating and processing graph layers in between the data graph and a client of the data graph (like a depiction a 3d scene).

Implementing this graph idea in c++ is relatively simple and straight forward. Implementing it in F# was pretty easy once I had a clear vision of what the schema graph, datagraph, and whole schema graph database system should look like. Now I want to implement this in Haskell and see what comes out of it.

I also need to design a protocol for keeping two data graph databases in synchronization. I would like the haskell code to be able to make arbitrary changes in the data graph and the scema graph and have the c++ implementation mirror those changes and vice versa.

This will involve a system for recording the changes being made to the database and for transferring this information down to binary and back. It will need to be a binary standard that I can implement simply in both c++ and in haskell. If I change a light property from red to blue I want to be able to send these changes and have the mirrored graph also have a light that is blue.

I will use this to communicate the windowing datastructure changes from language X to c++ and back again. Note that this will involve events as well as data updates, as a mouse click is an event and will not be represented in the graph.

In any case, I know what the data model and looks like and I know various other pieces. The next step is to research my previous work on transferring a schema and objects over a wire I did using c++ and lisp. I will probable start working on the same project again as I have such a clear vision of what it needs to be. Licada is active again.

No comments: