Skinned mesh support and animations

In the past few weeks I’ve been working on improving Crimild’s scene importing mechanisms with two goals in mind: provide support for more file formats and implement skeletal animation (hopefully, in the right way this time). Since I dropped support for COLLADA some time ago (yes, I did that), the only official importer was the one for OBJ, a great model format for sharing assets, but with a lot of constraints and no animation support.
Enters Assimp, an open source model importer library with support for a wide number of standard file formats like 3DS, FBX, Blender, COLLADA, etc. Assimp turned out to be extremely simple to use and integrate into Crimild. The hardest part was to understand how its animation structures can be transformed into something that Crimild can process. Except for some noticeable artifacts, progress so far looks good:
In the center of the new additions there’s the new Import module, including the SceneImporter class implementing the conversion from Assimp internal format to Crimild’s one. I preferred to keep it as an independent module (much as scripting or physics) in order to maintain the core classes free of external dependencies. That has been one of the best decision I made early in the project and it has paid off really well. In addition, new components has been added to the core module in order to work with skeletal animation, updating bones and applying them to the rendered vertices.
At the moment, animation support is still in the experimental phase, but expect to hear more in the not-so-distant future.

Crimild v4.1.0

A new year. A new version.

In the past few months I’ve been working hard on a small iOS game called “Le Voyage”. If you haven’t heard about it, you can check it out on its official website and download it for free. No ads guarantee.

“Le Voyage” has been a great opportunity to improve Crimild’s iOS support, particularly regarding rendering and simulation. Enhanced image effects, performance tweaks, a more robust scene builder, more tools for debugging and handling platform specifics, and a lot of bug fixing. Go to GitHub to get the full release notes.

Here’s the trailer for “Le Voyage”, where you can see the latest version in action. Enjoy!

(More) Text Rendering Improvements

I took a short vacation last week and I spent some time reading about different topics. I came across a book titled OpenGL Insights which included a very educating chapter written by Stephan Gustavson about text rendering using signed distance fields. In his paper, Stephan proposes a different approach for computing the distance map:

The new antialiased Euclidean distance transform is a straightforward extension of traditional Euclidean distance transform algorithms, and for the purpose of 2D shape rendering, it is a much better fit than previous methods. It takes as its input an antialiased, area-sampled image of a shape, it computes the distance to the closest point on the underlying edge of the shape, and it allows fractional distances with arbitrary precision, limited only by the antialiasing accuracy of the input image

He also provided an implementation for the book using a 16-bit depth value for the depth map, which is a much accurate format than the one I use in my current implementation (8-bits). In addition, his fragment shader interpolates the distance value for every pixel and its neighbors, producing much better end results.

I’m currently in the process of enhancing my implementation based on Stephan’s approach. To be honest, I still don’t understand much of the algorithm, but so far the results are very promising:

Improved text rendering using antialiased Euclidean distance transform

Improved text rendering using antialiased Euclidean distance transform