CgFX adoption

September 1st, 2010

I had HLSL before, using the DirectX FX framework, but then I must support OpenGL also, so Cg is the way, and CgFX is almost the same as DirectX Effect files. So bottom line, the engine uses Cg shaders :) from now on.

Editor: Groups and other features

August 26th, 2010

Added the Groups editing dialog, you can group entities, show/hide group, open/close group, etc.

Added new features of the Base class where you can user-format property values when they are shown as text in the editor property grid control, and when the values are changed, you can format the value before its sent to the actual class member.

Camera settings and fly around speed are saved per level.

The game play button is working and you can jump into game play mode in a second, directly in the editor’s viewport.

Small shader system refactor, now there is no DirectX FX shader files dependency, you can write your shader code in any supported shader language (HLSL,Cg,GLSL), as .vsh(vertex shader), .gsh (geometry shader), .psh (pixel shader).
The shader techniques and passes were moved as XML in the shader’s definition file, so its cross-platform, for any kind of shading language.
The shader system will be open for ubershader with shader permutations, dynamic branching or shader graph nodes (fragments), the current one is a generic Blinn shader with diffuse/normal/specular/alpha maps, fresnel term and other stuff , but probably all types of shader systems will be implemented.

Editor: New dialogs and features

August 10th, 2010

Added the layers edit dialog, where you can create layers, hide them, lock them, assign current entity selection to the layers, export/import to xml (for use in other levels), and so on.

Added the Align and distribute dialog, so you can align the current selected objects and distribute them evenly, using the bounding boxes of the objects, also will add to distribute selected entities in a circle.

Working on skeletal meshes to have all the features in place.

Working on the terrain integration into the editor.

Made shortcuts for switching between operation modes for move/rotate/scale gizmo, and also there is a composite gizmo with all transformation modes at once like in the image:

Composite transform gizmo

Composite transform gizmo

Overall this is the current state/looks of the editor:

NytroStudio

NytroStudio

Flowgraph editor UI

July 4th, 2010

Using the C# and GDI+ is a real pleasure to make custom controls and such. The flowgraph editor tool from inside NytroStudio started to shape up, I am testing the looks and functionality and will start connecting this UI to the flowgraph C++ engine code. I took inspiration from UnrealEd and CryEngine and other several editors, resistance is futile ! :)

Here is a glimpse of what’s to come:

Flowgraph editor (click to see it bigger)

Flowgraph editor (click to see it bigger)

Editor API

June 9th, 2010

I made the decision to have a thin Editor API in C++, only one big abstract interface, which will be translated by SWIG into many languages, so I can make editor GUI in any OS/IDE/API/SDK, (MFC, C# Winforms/WPF/Silverlight), and this header file interface uses only simple types, no dependencies, it exposes only needed methods for the editor GUI in C#, the GUI doesnt know about engine classes, its only a mere client for the Editor.DLL which contains the implementation of the thin layer Editor API. These scheme seems to work for now pretty nice.

Techdemo: Testing various stuff

May 17th, 2010

I am testing and wrapping up the terrain system, instancing of the trees, grass and detail objects, after that there must come the editor integration of the terrain, soon new infos.

The usual sneak peek from the techdemo:

El Water Tower

El Water Tower

Engine code style changes

May 1st, 2010

After some thoughts I have started to refactor some naming conventions in the engine, better “unicity” among enums, constans and defines, also made a GeometryBuffer more simpler to use, and other various speed and optimizations changes, related to loops, storage, code architecture, all looking good so far, the editor is now even more simple to use, it has only toolbars and docking panels, most of the important operations are one-click away. More screenshots soon.

Editor progress

March 30th, 2010

Editor is going good and looking great, C# GUI development is pretty nice, implemented a color picker with alpha support for the property grid, made the settings and game setups dialog, select entities from a list, and other small things.

Here is a sneak peak:

NytroStudio alpha

NytroStudio alpha

Techdemo: Vegetation progress: Instancing on vegetation layers

March 7th, 2010

The vegetation system comes along quite nicely, there can be defined several layers of vegetation objects, for example trees, grass and rocks, no limit whatsoever. Each vegetation layer has 3 levels of detail for its objects, 3D model, 3D impostor and 2D billboard/impostor, the radius around camera and other many parameters are tweakable, so you can make engine profiles for low/medium/high machines, depending on power. The vegetation objects can swing in the wind, in the future the trees or other vegetation objects will be breakable, the problem is a little bit more complex, because it must switch off the instanced object and create a new dynamic/broken one in the scene, but its doable.

Here is a small tease of the terrain and vegetation (the assets are ugly though, no time for that now, only tech)

Vegetation objects

Vegetation objects

Vegetation 2

Vegetation 2

Vegetation 3

Vegetation 3

Techdemo: Vegetation rendering

February 23rd, 2010

I have opted for a database of terrain objects, generated positions/colors/scale for each instance from a distribution map and several tweakable parameters, outputs to some instance data file which can be loaded or later on streamed and instances being updated around the camera, when needed. The problem is to find the right instances around the camera radius from lets say 1 million objects (trees, grass patches,rocks,detail objects), of course you cannot search through all them, computing distances for each one, so I figured out that a quad tree will help it, assigning instance index lists to leaves, wrote a generic quad-tree class, which can take user specified callbacks to subdivide and query for data, so you can use it in any quad-tree-worthy feature you might have.