Blog Archives

WIP: PointLight Shafts – Video Update

Read the rest of this entry

Wip: PointLight Shafts

Work in progress Point Light Shafts –

Read the rest of this entry

Volumetric Lighting : SunShafts

One of the very popular volumetric lighting effect is SunShafts or volumetric sun shadows or god rays.

An example from real world (image taken from Wikimedia) –


Here’s a screenshot from a video game – Crysis. It was the first game (for me) in which I saw SunShafts –


Read the rest of this entry

WIP: Spherical Harmonics

Working on a spherical harmonics maths code base to be used in lighting in my engine in near future.

It’s been quite a while since I worked on my engine ( or any other hardcore stuff for that matter ). I thought working on some maths stuff would be a nice way to resume engine development.

Some screenshots of spherical harmonics visualizations generated from my code base –


Update – Uploaded wrong screenshots by mistake before so updated the screenshots.


WIP: HDR Rendering – Gaussian Filter using Compute Shader

Gaussian Blur Filter is one of the most used effect in graphics programming. It helps to achieve many other effects like Bloom, DOF, etc.

I coded a version of it using pixel shaders in my naive pixel shader based HDR Renderer earlier. Even though it served the purpose it was very limited in terms of performance and hence quality since we can’t increase radius beyond some levels for real-time rendering.

Then I posted about first compute shader based implementation here which based on Frank Luna’s algorithm but even that was limiting in the fact that we can’t go beyond some blur radius (depends on GPU) for performance reasons.

Here’s a screenshot (800 x 600)-

chEngineCSGuassBlur_old_img1 (2)

Read the rest of this entry

Future Plans for JustAnotherGameEngine

I am done with this current version of the engine. I am thinking to go for next version (based on DirectX 11) from scratch but of course I will be using some of the code base from current version (resource loading, scene mgt, oct tree, etc) but still it will mostly be a completely new engine from ground up and new architecture supporting multi threading. Also I will start integrating some 3rd party libraries to make the engine ready as soon as possible for a current gen game. Fmod is already integrated. Next will be PhysX or Havok for physics and maybe some 3rd party library for importing 3d stuff from multiple file formats (fbx, collada, etc), maybe some network library, etc. I may/mayn’t replace these things later as I get time for these parts of the engine. But for now my main focus will be on graphics and rendering techniques.

JustAnotherGameEngine Features

Now there’s a Features page containing the information about the capabilities of Just Another Game Engine.

Also added some screenshots on the same page.

From Menu use JustAnotherGameEngine -> Features

JustAnotherGameEngine : Tech Demo

Finally the first tech demo/progress video of JustAnotherGameEngine is done. One thing I would like to mention again is I didn’t focus on graphics / rendering for this demo and will be the main focus of next demo.

Weekly Update

It’s kinda funny to call it Weekly update anymore considering last weekly update was approx two months back. But for lack of another title using Weekly Update only for now. (Also I will try to be regular now with weekly updates.)

It’s been long time since the last post and the reason being I took much more work then I can easily manage, was working on four projects all of them being big ones and related to games only.

One of them being the tech demo of Just Another Game Engine. So as I posted in december a lot of data and code related to it got lost during HDD crash. But I started the work on it again and most of the features and game scenes have been done. Only couple of game scenes and Video capturing / editing is remaining. I trying to push myself to complete  it by this weekend.

There are few things that I was working on before HDD crash that I didn’t include now –

  • Rigid Body physics for spherical / ellipsoid objects.
  • Basic kinematic physics for AABB/OABB.
  • MultiThreading

There are also some new things which I have now included in the demo now –

  • AI (Steering, Path Finding, Flocking, other movement AI behaviours like collision avoidance etc,Crowd Simulation)
  • IK for characters (I have worked on few IK demos as a freelancer long time ago so I thought it would be nice to have it in the demo)
  • Increased the overall quality of demo by re-imagining some demo scenes to make them better and hopefully little entertaining.

The barebones of the current version of the engine are like 18 months old or so and that time I didn’t have multi threading architecture in mind neither very well-educated regarding the multi threaded game engines etc. Still I did tried to hack in some multi threading and tried to make update and rendering loop kinda separate threads. Code was messy since it was hacky way of doing things. Also there are many limitations in the engine and also I want to change the whole architecture as I am not happy with it now.  That’s another reason for not including Graphics / Rendering in this demo, I have few fancy shaders and some more things in work but to fully include it in engine will require some work but don’t want to spend more time on this only to remove it and re implement later.

Regarding physics I made Rigid Body physics working for spherical and ellipsoidal objects again it mayn’t be proper way of doing things but code was clean enough. But results weren’t that impressive also I am planning to integrate some 3rd party physics engine (considering PhysX or maybe Havok) anyways so when I started again I thought it may not be worth it to spend so much time on something again only for one demo. Untill now I can used only my code in my engine and prevented myself to use any 3rd party library to learn as much as I can which is the primary purpose of this engine.

My focus now is also to get back to the Graphics again asap but at the same time don’t want the engine or games I am planning to make be limited because of that so Including 3rd party libraries for now.

I am planning to do a major revision of the engine and I may make it DirectX11 only engine but how I am going to proceed is not planned at this moment. But I will starting doing some changes in that direction after this demo. I will post an update on this later and also thinking to include details on how my current architecture is preventing me to do certain things,etc

So that’s it for now I will try to be regular now on these updates and First Tech Demo is coming very soon.

Animation system 3 – Automatic Lip Syncing

For Automatic Lip Syncing one has to extract the Phonemes from a recorded speech and map it to particular Visemes in real time or pre process it and store it in some way so application can use it later in real time.

Phonemes is the smallest unit sound of a word that we can hear. And Viseme is the smallest unit of speech that we can see or it is the shape that our mouth makes when making a particular phoneme.

Deaf people have learned to take great advantage of this concept when they do lip reading

So there are couple of techniques to analyze speech giving different results. One of them involves analyzing the amplitude of speech sound and that’s what I have used for this demo. Beauty of this technique is that it can be used on different languages without any extra work.

Here’s the Demo video of what I achieved with my system –

I also tried some songs instead of speech just to see how does my system responses (a fun exercise) –

So quality mayn’t as good as other techniques requiring Fourier Transforms to analyze speech data but for that can’t work alone. If we have to go for that quality we should also implement Face bones system (something like Factial Animation Coding System) and we also need very good artwork also made specific for our requirements. Well that’s something I am looking forward to do sometime in future but for now this system is good enough for what i needed for upcoming tech demo of my engine.

For people who are also interested in Lip Syncing must check these 2 articles –