Let there be shadow!

Shadows in Unity is something that in most cases is a given through the use of surface shaders, but sometimes you don’t want to use a surface shader for whatever reason and create your own vertex/fragment shader. The biggest advantage is that everything is in your hands now, but this is also one of the drawbacks because you now have to handle a lot of stuff that Unity conveniently handled for you in a surface shader. Among such things are support for multiple lights and shadows.

Luckily, Unity provides you the means to get this working! The catch? Documentation on this is lacking or even non-existent. I was in the same position as most people and somewhat clueless on how to get shadows in my vertex/fragment shader, I did my fair share of googling and found some clues that didn’t quit do the trick, but gave me a good impression on where to search. I also went through a compiled surface shader to see if I could figure out how they did it. All of the research combined and some trying out finally gave me the results I needed: Shadows! And now I will share it with whoever is interested.

Before I begin, I want to make note that as mentioned earlier, Unity solves a lot of cases for you when you are using surface shaders, among such things are the inner workings when you are using deferred or forward rendering. With your own vertex/fragment shaders, you will need to take that into account yourself for some cases. Truth is, I only needed to get this to work with forward rendering and only briefly tested how this works with deferred rendering and although I did not

By |April 16th, 2014|Categories: Game Development, Programming, Unity||7 Comments

5 years of game development education – year 1 continued

As I am busy with my graduation, I found my mind wandering off lately thinking about the past and the choices I have made. From the moment I decided I wanted to follow a game development course until right now, where I am doing my graduation at a small company called Digital Dreams to get my bachelor degree from a game development course.

With these posts I want to give people an insight on how things went for me from start to finish and my opinion on the different aspects I encountered during this journey.

Do keep in mind that the games industry is an ever evolving industry where new strategies, technology and principles get introduced or evolved and so does this game development course. The course as it is today, is not the same in every way as it was when I started.

Let’s get programming!

In the previous post, I have been talking about all the non programming related courses we were given during our first year. While not entirely programming related, most served a good purpose that could improve your thinking process and influence your programming skills. In this continued part of year one, I will dive into the programming part and something directly related to programming: Math!

When you start IGAD, the ideal situation is that you already know how to program in some language. Reality is different though, due to Dutch law (or so it was at that time), a part of the students have to be randomly selected and the chances are that those people do not know how to program, or something else more common, there weren’t any language restrictions to the intake assignment, so people might have used something

By |April 12th, 2014|Categories: Game Development, General, IGAD, Programming||0 Comments

5 years of game development education – Year 1

As I am busy with my graduation, I found my mind wandering off lately thinking about the past and the choices I have made. From the moment I decided I wanted to follow a game development course until right now, where I am doing my graduation at a small company called Digital Dreams to get my bachelor degree from a game development course.

With these posts I want to give people an insight on how things went for me from start to finish and my opinion on the different aspects I encountered during this journey.

Do keep in mind that the games industry is an ever evolving industry where new strategies, technology and principles get introduced or evolved and so does this game development course. The course as it is today, is not the same in every way as it was when I started.

It was my first year.

It was all about to start and I was very excited, I was going to start learning how to make games so what’s not to be excited about?! At this point I was pretty confident because well.. I helped making a 3D engine (even though I had a hard time) and I worked through the summer to get my skill up some more. I do have to note that this was 5 years ago and some details are a bit vague, but I’m sure most of it will come back as I write!

As I mentioned in the previous post, IGAD was split up in 2 variations when I decided to enroll, programming and visual arts. I don’t think I have to explain what that means. They were also busy setting up a different variation that is now known as

By |March 5th, 2014|Categories: Game Development, General, IGAD||2 Comments

5 years of game development education – Introduction

As I am busy with my graduation, I found my mind wandering off lately thinking about the past and the choices I have made. From the moment I decided I wanted to follow a game development course until right now, where I am doing my graduation at a small company called Digital Dreams to get my bachelor degree from a game development course.

With these posts I want to give people an insight on how things went for me from start to finish and my opinion on the different aspects I encountered during this journey.

Do keep in mind that the games industry is an ever evolving industry where new strategies, technology and principles get introduced or evolved and so does this game development course. The course as it is today, is not the same in every way as it was when I started.

It all started a little more than 7 years ago…

Like most developers, I played plenty of games before and up to that point and always had a certain fascination about them: How does it work, how did they make this and so on. During that period (and before that really), I was busy getting my degree in ICT and I had to make a choice: Will I stop here and find a job or go on for  a bachelor degree? With that fascination about games still in the back of my head, I decided to search for something related to games. During my 4 years of getting that ICT degree, I had to do some programming and even though I did like it, I wasn’t very good at it. So with that in mind, I didn’t really think I would stand a chance

By |February 24th, 2014|Categories: Game Development, General, IGAD, Programming||1 Comment

Specialization Project: Progress!

It’s been a while since I posted an update about the progress of my specialization project. Last time I added depth of field, but more has been added in the meanwhile!

I added a particle system that handles the floating of some small debris, it’s just floating around, rotating randomly, doing it’s thing. It’s just one texture for now made by me to test it, but it will get some variation later on.

I also, or rather redid the lightshafts, the previous implementation looked nice, but due to the fact that nothing from above (not counting the occasional fish perhaps) is blocking the light source, leaving a very overexposed scene without many shafts. So instead, I did them manually. They’re simple planes with alpha. They still need to be tweaked a lot to make a nice and convincing effect, but it’s starting to look like something!

The latest thing I added are flocking (or shoaling/schooling if you want to be precise) groups of fish. The basic behavior is implemented, but they need a lot of tweaking to becoming more convincing (not to mention implementing animation for them, which will be in soon). They’re not really bound, so they still occasionally move through the ground or above the water.

Next to the above changes, I also made a distinction between upper and lower water surface, so the depth fall off (Depth of Field) is only active when you’re below the water surface and the particles stay below the water surface. Also the models have had an update!

Here’s the result so far:

By |April 26th, 2013|Categories: Game Development, General, Programming, Specialization||Comments Off

Specialization project: Depth of Field

Today I added Depth of Field to the framework.

As with the other effects, it still needs some tweaking here and there, but I think that it already gives a nice effect as it is.

By |April 10th, 2013|Categories: IGAD, Programming, Specialization||Comments Off

Specialization project: Godrays

One step further to get to the final product. I made an implementation of God rays, or light shafts. A form of volumetric light. Implementation is done as a post process effect.

First attempt resulted in the following:

It still needs some tweaking, and the light is a overexposed, also due to the fact that there is nothing really blocking the light source and it’s a small scene. For a first attempt however, it’s looking alright in my book!

By |March 21st, 2013|Categories: Programming, Specialization||Comments Off

Specialization project: Caustics

So for my specialization I decided to do something with special effects; more specifically: Underwater rendering. Underwater rendering gives me an opportunity to make different effects that makes a nice scene when combined! The first effect I did were caustics. It’s not a real-time approach, but rather a projected texture that is animated. The result is still pretty convincing:

When and if time allows it, I will also create a real-time version based on an upper surface.

By |March 10th, 2013|Categories: Specialization||1 Comment

Some useful information and interesting links

It has been a while since I last made a post in here and the main reason why is rather simple: I have been very busy! College stuff calls and with the setting up of Grinding Minds, I had my focus elsewhere! But that doesn’t mean I will never post here anymore and now that I have some time on my hands, I decided to create a new post and hope to add some more in the coming weeks about various topics!

So, what is this going to be about? You might already guess what it is about with the obvious title. Over the years as a developer, you will encounter sites that has some useful information to you, but you had to go through the underbelly of Google, countless links from other sites and forums to get there! Luckily you can bookmark sites and all is good. This is pretty much the same for me and I feel like sharing them with you. I will explain what it contains and why it is useful and with that some information. So let’s get to it!

GoogleGuide

Googleguide? Seriously? You want to give us some nice links and you give us a guide on how to use Google? Yes! I think this is needed for some people! When scouring through different forums I like to roam through beginners topics and see if I can help people out. A lot of the questions I see there however are such common question that a simple search in Google will give answers to. Hell! Sometimes even literally copying the question will give decent results! This is actually not exclusive to beginner topics, also various other, more advanced,

By |July 11th, 2012|Categories: Game Development, Gaming, General, Programming||Comments Off

Let’s talk physics: Elastic Collision

It has been some time since I last made a post. I have been a bit busy with college and some personal projects, but I have some time now to talk about the last subject of what I wanted to share about physics: Elastic collision.

Just like previously, let’s take a look at what Wikipedia has to say about Elastic Collision:

An elastic collision is an encounter between two bodies in which the total kinetic energy of the two bodies after the encounter is equal to their total kinetic energy before the encounter. Elastic collisions occur only if there is no net conversion of kinetic energy into other forms.

During the collision of small objects, kinetic energy is first converted to potential energy associated with a repulsive force between the particles (when the particles move against this force, i.e. the angle between the force and the relative velocity is obtuse), then this potential energy is converted back to kinetic energy (when the particles move with this force, i.e. the angle between the force and the relative velocity is acute).

To fully understand this, you must understand what kinetic energy is. I’ll let you follow the link in the Wikipedia quote if you want a broad explanation on the matter, but for the most basic explanation, you can think of it that every moving object has energy due to its motion. This energy can be transferred to another object on impact and that is exactly what we are going to do here.

To calculate the new motion of an object after collision, we will need to know at least the mass and the current velocity. Let’s initialize some spheres for our simulation:

for(int i = 0;

By |March 29th, 2012|Categories: Physics, Programming||Comments Off