Sunday, October 31, 2010

A blueprint for the editor...

... or better said, more doodling during moments of downtime!


Just a quick post to make the results from another brief brainstorm session available for digital eternity. The image below provides a better overview of the individual widgets that the editor (now that I think of it, perhaps 'composer' is a more descriptive naming) must have. I added a priority to each of the widgets, as a small reminder to myself. Without these reminders I want to limit myself from "going off on coding tangents", working on fun stuff instead of what really needs to be done. It may not seem that way, but my ultimate goal is not to create this editor, but to use it to create realtime 3d environment- so that is what I really would want to be working on!



In the few spare hours that I have had available in the past week, I have been working on, and mostly finished, the following widgets:

  • 1- The main window, with toolbar, menu and status bar
  • 1- The 3d preview widget
  • 1- The information widget
  • 1- The logging widget
  • 2- The parameter list widget

I am really pleased with how fast this got finished. Qt is a very feature complete and easy to understand environment, with plenty of examples available on the internet to jumpstart your development! Developing these features for the previous version of this tool (with a GUI made using C# and WinForms) took me quite a bit longer- mostly because I had to code all the widgets from scratch since no decent open-source examples were available. And also, trying to get the docking of widgets to work really drove me bonkers at the time. Previously this took a few weeks or months to develop, this time it took me a few hours (this includes the ability to graphically skin the widgets, if necessary).

For all the other widgets, I have created empty placeholders:

  • 3- Timeline editor, which can be collapsed to show only a time bar
  • 3- Node editor
  • 4- Curve editor
  • 4- Color curve editor
  • 5- Material, compositor, shader script editor
  • 5- Node script editor

The timeline and node editor are the 'meat' of this program. Particularly the node editor requires some changes to be made to the existing engine code. The curve and colorcurve editor allow parameters to be animated. The material and shader script editor can be used for real-time editing- so that any changes become instantly visible in the 3d preview (I have found a very nicely done open-source CG and GLSL shader editor, which will be incorporated in this editor when the time comes). The node script editor is the 'icing on the cake'- it will allow programmers to add new effects (in a C++ like language) without the usual compilation cycle. When an effect is working properly, the node script can then be compiled into a plugin that is dynamically loaded at runtime. However, this feature will most likely not make it into the first release of this editor.

Later this week I will post some screenshots from the previous version of this editor (the one made in C# and WinForms), for comparison's sake. That version had all widgets, except for the color curve editor and the node script editor (since it used only timeline based compositing).

Thursday, October 21, 2010

First brainstorm...

... and first post!


I've been thinking about creating a general virtual environment creator/editor for quite some time now. Since about 2003 I've been working on various incarnations of these ideas: at first on Windows using Visual Studio 6, MFC and DirectX, then using .NET and managed DirectX, followed by a mixture of .NET for the GUI and C++/Ogre3d for the rendering engine. The last version "kind of works", but I do not like the resulting workflow (in another post I will iterate what works and what does not work). Recently I have been watching presentations and seminars from sceners (mainly Smash/FLT, Navis/ASD) about their workflow, and ofcourse I have been trying out demo editors from other demogroups (e.g. Moppi, Stravaganza, Spontz, Farbrausch, Conspiracy). I decided to start a blog to help me sort out some ideas that I have been juggling around in my brain: I want to restart my coding efforts one last time; but doing it properly this time. Meaning: platform independent, using mature open-source components as much as possible, plugin based, and with a node-and-timeline-based compositing GUI. Below are my first sketches of such a tool:


On this page you can see the initial ideas I had for the editor. The most important doodles on this page are the three views that the GUI presents: node view, timeline view, and tree view. A fourth view, the spline view, was omitted here but will be implemented/ported.

The second page shows two conceptual layouts of the tool: the one on the left shows a spline editor, timeline compositing view, timeline controller (play/pause/loop etc), a 3d preview panel, a parameter editor panel, and an information panel. The right conceptual layout shows where the node compositing view would fit in.

The last page shows a rough overview of the classes that must be implemented in C++. Some of these classes (Item, Parameter, ParameterManager, and so on) already exist and are more or less usable (minor refactoring and optimization needed). Basically the current C++ engine component implements timeline based compositing using modules, which have parameters + parametergroups, that can be animated using splines. Compositions can be saved and loaded into a binary format (this will be extended with an option to export and import XML for debugging purpose). So the engine component 'only' needs to be extended with the 'node based compositing' part, which is what this page is all about.

In the following days I will post some ramblings about the current tool and it's GUI, and the GUI framework that I intend to use (Qt) and some ideas on that. Over the next few weeks I will slowly start the porting process- even though I already have a development environment setup on my Shiny New Macbook Pro and did some compilation tests for the graphics rendering component used (Ogre3d), due to my daytime occupation of being a grad student, in the past few weeks I've not had any spare time to waste. Gone are the days where I could do a graduate study with less than 10 hrs of effort... Sometimes I do miss my >60hrs coding stints ;-)