May 2, 2015

C++ & OpenGl Minecraft project, clouds and normal maps.

Hey again!

I´ve been working this week on the minecraft project and I did some progress:



I worked on:

  • Normal map.
  • Specular map.
  • Particle system for the clouds.
  • General improvements.



The normal maping thing was one of the hardest things I´ve ever worked on ...
I spent more than one week to have it working!

Here I show you a few lines kinda important if you want to make something like this:

You must work in camera/view space so first you should put your camera vector/view into view space:

EyeDir = vec3(u_view * vec4(position,1.0));


You will need too to send the tangent+normal to the shader , both are important if you are working on this stuff in a 3D space.
Then with this two you can calculate the bitangent:

vec3 b = cross(n, t);


Those things for me were the most hard to make work, hope it helps.

See you.