I've been searching the internet for some time to find a simple normalmap generator and mostly found commercial stuff like CrazyBump or bloated programs that do a lot more than is needed for me. Another possibility is a free Photoshop or Fimp plugin. As I don't own Photoshop and am not much of a friend of Gimp I decided to write a generator myself.
Actually it's a rip from a bigger editor I'm working on so don't expect too much.
Thanks for the nice NM generator
What I've noticed and imo should be changed, maybe:
-The whole window size is a bit to small.
-Preview can't be moved, like move around.
-Only bmp and jpg format can be saved.
But anyway very good tool for user that have not experiences with paint tools.
...can any of you point me to an algorithm or explanation of normalmap generation? (from single 2D image)
Not the best solution for your question, but a small tip how to change a 2d image to normal map with lite-c:
///////////////////////////////
//#include <acknex.h>
#include <default.c>
#include <mtlFX.c>
///////////////////////////////
#define PRAGMA_PATH "%EXE_DIR%\templates\models";
function main()
{
video_window(NULL,NULL,2,NULL);
video_set(640,480,32,2);
level_load("");
vec_set(camera.x,vector(-200,0,60));
vec_set(camera.pan,vector(0,-15,0));
ENTITY* ent = ent_create ("dumper1.mdl", NULL, NULL); // don't forget to duplicate skin1 in MED, like Edit->Manage Skins->Duplicate Skin
ent_setskin(ent, bmap_to_normals(ent_getskin(ent, 2), 20.0), 2);
ent.material = mtl_specBump ;
while(1){
ent.pan += 3 * time_step;
wait(1);
}
}