Archives for: 2011


Permalink 09:47:58 pm, Categories: general  

The Chronicles Of Suburban Insanity

'Guano covered demons from hell!' Exclaimed the preacher, 'I'll be a gypsy whore wobbling O-legged through the doors of this church after a long night out in town If I'd ever let you enter this holy place dressed like that!' I wasn't trying to make a fashion statement, this banana coloured thong was the only piece of clothing still in my possession after Thick Tony raided my place...I figured I'd try my luck anyways 'Sanctuary?' I requested humbly. This just seemed to enrage the man of the cloth even more.... Why was Tony at my place? I haven't pissed him off for at least 3 years, not since I won against him in a match of poker and he carved the now clearly visible 'IOY' in my chest. What changed? Taylor was at my place last month...sweet Taylor involved with Tony's affairs, the thought sends a chill up my spine. Maybe if I had been nicer to her, I could have kept her out of trouble. I dodge a collection plate, the preacher hasn't given hope on kicking me out of his church. I need a lead or at least some clothes, it's already dark outside maybe I'll take my chances on the street. I need a contact, someone that wouldn't run away horrified seeing me like this, Crazy John comes to mind, John has seen it all, the outskirts of Vegas, donkey shows in Mexico, midget wrestling in Texas, midgets wrestling donkeys and every fan art forum on the internet. If there was a person on this globe that could see me like this and consider it the most normal event in his life, it would be John, but would he have reinstalled his passenger seat already? I could use a ride. Empty drive way, shit he's not home! My eye catches a shimmer of the porch light in a piece of glass near the fence, I walk towards it and pick it up, a remnant of a glass jar covered in blood. What happened here? There's something in the weeds as well, a face plate of a Cisco router... Olathe, a crime hub? I chuckle and toss the face plate and bloody piece of glass on the ground. Maybe he's at the warehouse with Brant? I start jogging in its general direction. Have you ever seen a grown man jog in a yellow thong, if you haven't, don't try to mentally picture it, it's not a pretty sight! But I digress, why was Tony after me? Or what and why was it at my place? It doesn't even matter anymore, I'm tired and cold, I just want someone to hold and fall asleep with. Preferably not in this outfit.


Permalink 09:50:53 pm, Categories: general  

I ran out of roads to walk down and sailed the seven seas, more than men but less than a man, my ashes blowing in the wind and my words turning to whispers on the lips of the ones that once knew me.

Permalink 09:47:14 pm, Categories: general  


Masks is what we wear, the truth is behind it, not out there. Made from cardboard, plastic or papier-mache, we think it hides all our cares away. Sometimes we switch masks, but we never take it off, afraid forever, to love.


Permalink 03:56:00 pm, Categories: glsl  

Non-separable shader system

As mentioned in the previous post, the main problem was that Cg allows to specify vertex/fragment shaders independently whilst GLSL does not. In fact as I explained last time, GLSL shaders require a linking process that binds the vertex and the fragment shader together. The linking process makes a GL object called a "program" which represent an entire pipeline itself. Shader parameters and other stuff are acting on this object. The shader plugin system of Crystal Space wasn't much designed this way, however layers on top of the plugin system are considering a shader as a pair of vertex and fragment shader, which simplified the work.

Basically, Crystal Space wraps vertex and fragment shaders (csShaderProgram, which implements iShaderProgram) into a single csXMLShaderTech class that is used for rendering. The shaders are specified in the corresponding XML shader file. The basic idea was "iShaderProgram should represent an entire pipeline (so a set of shaders) instead of a single shader". To ensure backward compatibility, this was achieved by adding a simple wrapper class, csXMLShaderWrapper, that holds a vertex and a fragment shader from the old Cg or ASM plugins.

The new GLSL plugin doesn't need to use this wrapper since the shader object provided already contains an entire pipeline, ready to use. A new XML syntax has been setup for shaders that don't need wrapping. You were currently specifing shaders like this:

<vp plugin="glcg">
<![CDATA[ /* code... */ ]]>
<fp plugin="glcg">
<![CDATA[ /* code... */ ]]>

As you can see, plugins are specified independently; a GLSL plugin could hardly fit this design. The following syntax has been defined for the new plugin:

<shader plugin="glsl">
<![CDATA[ /* code ... */ ]]>
<![CDATA[ /* code ... */ ]]>

The "unification" is made more explicit and the code is lighter.


Permalink 02:38:54 am, Categories: glsl  

GSoC project presentation

Welcome to my GSoC 2011 blog! Here you'll be able to follow the progression of my project for Crystal Space.

This is my first time participating to the Google Summer of Code, and I'm glad I've been accepted into the project I was most interested in. My project will consist of, basically, add support for OpenGL GLSL shaders into Crystal Space, which currently provide support for OpenGL ARB and nVidia Cg shaders. Ideally I'd also like to add support for the famous geometry and tessellation shaders, which would allow Crystal Space to implement new generation and cool rendering techniques based on them. The project will be implemented as a Crystal Space plugin.

The main design difference between Cg (and ARB) and GLSL shaders is that Cg allows you to bind the vertex and fragment shaders independently while GLSL requires them to be linked (and thus non-separable) into a "program" before being used. Fortunately, Crystal Space's architecture doesn't use much of the "separable" functionnality provided by Cg, facilitating therefore the setup of a "unified" design, much like GLSL's. This will involve a new syntax in the XML shader files used by Crystal Space in order to make explicit the use of the "unified" model.

I hope that by the end of the summer I could provide a nice tessellation demo, but for now I have to focus on the core of the new GLSL plugin and its integration into the engine.

Have a nice summer! :)


Permalink 20:42:38, Categories: Assets  


This post will talk about the different ways to import assets into Crystal Space, and will present the recent improvements that have been made about that.

Guided tour of the import of assets into CS

CS had until now several different solutions to import the models and scene objects from the many different 3D design tools and file formats.

Blender has always been until now the editor with the best support for CS. The blender2crystal project is a huge piece of software, with many advanced functionalities such as import and export of CS files, CS previsualization window directly embedded into Blender, animation tree edition, etc. Unfortunately, the blender2crystal project is no more active and has been overtaken by the Python 2.6 and Blender 2.5x series, it is blocked to the Blender 2.49b with Python 2.5 version and may hibernate there forever.

Currently, the solution to export data from Blender 2.5x into CS is to use the B2.5CS exporter from Peragro Tempus. It does not yet have support for animeshes, but it is planned to become the official exporter for CS and should therefore be improved in the future.

3D Studio Max had also some rather good support with either the exporter script from the PlaneShift team or the exporter plugin added recently by Mike. And for other 3D design tools and model file formats, CS had several solutions with either dedicated importers and/or exporters for COLLADA, Maya, Cal3D, md2, BSP.

And there there was... the Assimp plugin

So this was the situation until recently, but a big part of this has now been obsoleted by a new addition made recently to CS, namely the new plugin for the Open Asset Import Library (A.K.A. Assimp).

As suggested by its name, Assimp is an open source library providing a generic interface to load 3D models and scenes from a huge list of different file formats. It can import the meshes, the material properties, the skeletal animations, the lights, cameras and complete scenes. The support for vertex and morph animations is planned but not yet implemented. The support for meshes and material properties is rather excellent for all the listed file formats, while the quality of the import of the animations may vary depending of the format.

The Assimp plugin that has been implemented in CS uses the new guidelines for the preprocess and tool plugins. This basically means that the plugin is integrated completely transparently into the CS loader system: you simply drop any asset file of one of the format supported, and it is loaded magically in CS, without any further need to manipulate or export/import previously the file.

An example has been added in CS with the Seymour COLLADA animated test model. It is composed of one data file and one texture file that have been packed in a ZIP file in 'CS/data/', and the following image is the result of the command:

  • 'viewmesh -R=data/ Seymour.dae'

The Seymour COLLADA animated test model in viewmesh

The Seymour COLLADA animated test model in viewmesh, loaded transparently into CS thanks to the new Assimp plugin. The model, its materials and animations are loaded without any previous manipulation, and the data files are accessed through the virtual file system of CS, allowing for example to pack them in a ZIP archive.

Technically speaking, this plugin simply implements the iBinaryLoaderPlugin and iModelLoader interfaces of CS, as any other CS-specific loader plugin. Therefore, when the iLoader is used to load a file, the Assimp plugin will be selected if it supports the file format. It will then analyze the file, and import the objects as genmeshes, animeshes or whole scenes depending on the loader interface used and the options that have been set.

Another interesting feature of the loading system of CS is that the definition of an object can be split in several files. It is therefore possible to have your model in its base format and being kept updated by your artist team, while still being able to already use this model in your application and extending its definition with CS concepts such as physics or more advanced management of the animations. These concepts will simply be defined in a separate CS XML file and will add their data ontop of the one loaded by the Assimp plugin.

Morph targets

A problem that has been mentioned about the Assimp library is that it does not yet support the import of vertex and morph animations. To overcome this, some tools have been added to CS in order to load and merge an animesh with its morph targets defined in several different files. Again, this functionality has been made using the new guidelines for the preprocess and tool plugins, meaning that you can activate this process transparently through the iLoader interface. An example of that has been added, using the default model from the FaceGen software. Here is the result of the command:

  • 'viewmesh data/jane/jane.cslib'

Jane, the default test model from the FaceGen software in viewmesh

Jane, the default test model from the FaceGen software in viewmesh. The model is loaded transparently into CS and its morphs targets that were split in several files are merged automatically in a single animesh. Again, the virtual file system of CS is used, so there is no need to unpack at first the files from their ZIP file.

Lastly to be mentioned, there is the new exporter plugin for the PnP TerrainCreator editor, that has also been added recently by Mike. This last plugin should be presented more closely in an incoming post on the new 'csisland' demo.


Permalink 15:37:33, Categories: Animation  

Procedural animation

Sorry, but that will be a rather long post. Hopefully I will post more regularly in the future...

Most of the work that was made until now was about procedural animation, at first with the physical simulation thanks to the Bullet physics library, then with skeletal animation with improvements to the new animesh. All this work will be available in the incoming 2.0 release of Crystal Space.

The Bullet's physical plugin

The Bullet plugin of CS was only partially implemented and suffered of several bugs and problems. The plugin has now be completely overhauled and almost all the features of the initial iDynamicSystem interface have been implemented. As a result, the Bullet plugin is now fully useable, and is clearly preferable compared to the ODE plugin, simply because it works much better and has much more features. The 'phystut' application demonstrates how to use most of these functionalities.

In addition to that, several new features have been added. Most noticeable are:

  • Kinematic objects for objects acting on the physical simulation but controlled by the user. You can attach a mesh to it in order to have it updated automatically when the mesh is moved.
  • Soft bodies to simulate deformable objects such as flags, clothes, ropes, etc. A new animation controller (CS::Animation::iSoftBodyAnimationControl) and some utilities (CS::Physics::Bullet::SoftBodyHelper) have been written in order to create easily a soft body from a genmesh and to animate the genmesh depending on the results of the simulation. The controller is also able to maintain correct anchoring of the soft bodies when they are attached to an animesh which has a deformable topology (see below).
  • Terrain colliders integrated with the terrain2 mesh. They are able to load and unload automatically the terrain cell's colliders on demand.
  • Debug plugin to display information on the colliders and the objects of a physical scene. This plugin works with both the ODE and the Bullet plugins.
  • Physical hit beams and grab joints.

The main functionalities missing are the setup of the information of the collisions and the filtering of these collisions.

The 'phystut' tutorial application on physics simulation

The 'phystut' tutorial application on physics simulation. In this scene there are boxes, spheres, capsules, cylinders, convex and concave meshes, joints, motors, ragdolls, ropes, clothes and soft bodies.

The animated mesh system

The animesh (namely the class CS::Mesh::iAnimatedMesh) which was introduced during the YoFrankie project has been improved a lot. Many already existing features have been improved and fixed, such as the sockets, the blending of the animations, the import with blender2crystal, the Finite State Machine animation node, the computation of the bitangents, the display of the animeshes in viewmesh, etc.
Both the skeletal and the morphing animations have also been optimized and run now decently (although all computations are still made only in software).

Many new features have also been implemented, most of them are visible in the 'avatartest' application:

  • A new high detail test model has been made specifically for Crystal Space: Krystal. This model has been made thanks to the great help of a friend nicknamed Korbak. It is made in Blender and is based on the Gothic Woman model by Tiziana. At first, a Blender script was written in order to import motion captured animations into this model, but a much better solution has been implemented after that (see below).
  • Definition of the "bodymesh" (class CS::Animation::iBodySkeleton), holding the geometric and physical description of the skeleton of an animesh. Bone chains can also be defined to represent sub-parts of the skeleton (to be used e.g. by Ragdoll or Inverse Kinematic nodes).
  • New "Ragdoll" animation node. This node can manage automatically the physical model of the animesh, and put parts or whole of the skeleton in a dynamic or kinematic state. The dynamic state allows to have some parts of the skeleton animated by the physical simulation, e.g. to animate props or dying avatars. The kinematic state is useful to have the animesh interact with the physical scene, and to attach some soft bodies to it.
  • New "Lookat" animation node. This node can control a bone of the skeleton in order to make it look at a given target. It is useful to bring life into an avatar and making it more responsive to what happens in the scene. The animation node handles automatically the transitions when the target gets in and out of visibility, so there's no need to manage the transitions at a higher level (but the exact behaviour is configurable).
  • New "Speed" animation node. It takes as input a set of animations of the mesh moving at different speed (e.g. idle, walking, running), and blends them together to achieve any custom speed in between.
  • New "Inverse Kinematics" animation nodes. Such nodes allow to control the position of an end effector placed on a sub-chain of the skeleton. It is useful to control the precise position of some bones of the skeleton such as the hands or the feet. There are two different implementations of this node, one is a quaternion version of the Cyclic Coordinate Descent algorithm, the other uses the physical simulation in order to achieve the effect.
  • New "Retarget" animation node. This node can retarget an animation from one skeleton to another. It is useful for example to re-use animations or to input motion captured data into your animesh. The two skeletons must have a similar topology and limb proportions, otherwise the results won't look good. To overcome this, the behavior of the retargeting can be tweaked, but a more advanced solution would be needed in the future.
  • New "Debug" animation node. It currently simply allows to display the state of the skeleton.
  • All animations and nodes can be loaded from the CS's XML scene description file format. A facility has also been setup to manage easily the splitting of the definition of the objects in several different resource files.

Krystal in 'avatartest'

The Krystal model in the 'avatartest' demo application. The animations are imported from motion captured data and retargeted into the skeleton of Krystal. The skirt is animated through soft bodies physical simulation and the hairs are made with the dedicated fur mesh. You can also control the position of the hands of Krystal through Inverse Kinematics. Finally, the model has a faked sub-surface scattering shader in order to improve the visual aspect of the skin of Krystal.

This is not the end of the list of new functionalities:

  • Decals can now be defined on animeshes, allowing an easy personalization of the meshes. The decals are updated automatically to match the deformations of the animesh.
  • Clothes (i.e. physical soft bodies) can be easily and precisely attached to an animesh. They will be animated by the physical simulation and their attachment point will also be updated depending on the deformations of the animesh.
  • I mentored Alexandru Voicu during its Google Summer of Code 2010 project on hair simulation and rendering. Thanks to his work, there is now a dedicated system to simulate hairs and fur. The motion of the hair strands are animated by the physical simulation, and the system has many properties to personalize the appearance of the hairs.
  • A facial animation demo has been written, showing how to define facial expressions and control the animation of the morph targets to achieve the desired effect. This system would however need to be generalized into a more advanced solution, hopefully really soon.
  • A motion capture facility has been written. The system is able to load animations from the BVH (Biovision Hierarchical data) file formats. A viewer (csmocapviewer) allows to visualize easily the content of the BVH file and the retargeting to a given animesh. The viewer is also shipped with a Point Light Display system, which has been designed to be used in psychology studies on the human perception of biological motion. It uses a Perlin noise to add points with random motion.
  • Animeshes have been integrated in the "Project Bias" made by SueastSide. It is a demo of a medieval First Person Shooter, accessible as a demonstrator in CS (the 'csbias' application).
  • The libnoise library has been integrated into CS (namespace CS::Noise). It is useful to generate coherent noise functions such as the Perlin noise, and can be used to generate and animate e.g. clouds or fire, but are also helpful for procedural animation of avatars (see the work on this by the master himself).

Future work

We will keep working on CS, CEL, and particularly the animeshes as part of the developments needed for the Immersive Virtual Environment. The main topics that are planned are:

  • Hardware skinning pipeline and Level Of Details. These are the main missing functionalities in the current animeshes, but should hopefully be managed by our incoming developer.
  • Custom animation channels, e.g. for morph or shader variable animation
  • Artificial Intelligence: inclusion in CEL and interaction with CEL's behavior trees and path finding systems
  • Assets management and edition tools
  • Animation events system
  • More advanced Finite State Machine animation node
  • Playing with libnoise's inclusion in CS and Ken Perlin's ideas on using noise to add details in the animations
  • Locomotion system and walking on uneven terrains
  • More advanced animation retargeting
  • Assets pipeline from the MakeHuman editor into the CS animeshes
  • More clothes, props, and personalization of the animeshes


Permalink 17:23:11, Categories: General, Immersive Virtual Environment  


I'm a research assistant at the Electrical engineering department of the Institute of Information and Communication Technologies, Electronics and Applied Mathematics at Université catholique de Louvain, Belgium.

We are setting up an Immersive Virtual Environment to be used by psychologists for experimentation and therapy, and we have chosen Crystal Space as the game engine that will simulate and render our environments.

We will therefore keep working and using Crystal Space, and particularly its animated mesh. One of the main task that we plan to work on in the next months is the implementation of the hardware skinning pipeline that is still missing.

I also started this blog in order to give more transparency to the public on what is going on in Crystal Space. I'll try to present here regularly the new features that are added by the CS team.


Permalink 02:16:48 pm, Categories: general  

A tale of two horses

You ever been running so hard, you forgot why? You look down behind you and all you see is an empty alley. You slow down taking big steps as you come to halt feeling like a moron, leaning over and supporting your body with your hands on your knees. Desperately trying to breathe...
You hear screeching tires, two cones of light drift around the corner, blinding you. Your vampire movie obsession makes you duck as you hiss at the high beams.

 << Current>>
Jan Feb Mar Apr
May Jun Jul Aug
Sep Oct Nov Dec

Blog All Title

This is the long description for the blog named 'Blog All'.

This blog (blog #1) is actually a very special blog! It automatically aggregates all posts from all other blogs. This allows you to easily track everything that is posted on this system. You can hide this blog from the public by unchecking 'Include in public blog list' in the blogs admin.



XML Feeds

What is this?

powered by