[FREE] Normalmap Generator

Posted By: mk_1

[FREE] Normalmap Generator - 02/23/10 09:50

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.



Normalmap Generator
Posted By: Slin

Re: [FREE] Normalmap Generator - 02/23/10 10:53

Do you combine the normalmaps of three different blurr stages? It would probably be nice to have a little more freedom, but I guess the results are already better than those, still too many people are working with. What about maybe some batch functionality? The results may arenīt perfect for each texture then, but I am lazy and have quite a few textures without normalmaps wink
Posted By: Pappenheimer

Re: [FREE] Normalmap Generator - 02/23/10 11:20

Wow! Very handy tool!
Posted By: mk_1

Re: [FREE] Normalmap Generator - 02/23/10 11:44

The map is scaled to 1/4 and 1/8 and rescaled again so it's actually bilinear filtering only. Batch functionality should be possible. Maybe I'll implement it but rotating the preview cube is more important right now.
Posted By: aztec

Re: [FREE] Normalmap Generator - 02/23/10 12:41

awesome work allways usefull wink
Posted By: Cowabanga

Re: [FREE] Normalmap Generator - 02/23/10 15:43

Extremely sweet, thanks! laugh
Posted By: Superku

Re: [FREE] Normalmap Generator - 02/27/10 15:36

That is great, thank you!

A little bug:
The "generate" process did not stop (the progress bar was complete) and the generate window did not disappear after I clicked the button to create the normal map a second time with a higher "big detail" value.
Posted By: Hummel

Re: [FREE] Normalmap Generator - 02/27/10 16:16

Do you use the CPU or the GPU?
I started dev such an editor using pp effects wich was indeed quite fast, but then I decided to wait for the engine feature wich allows you to modify a bitmap through a shader directly (instead of the rendering only) since using ppEffects is not so handy tongue

Nevertheless, great work! wink
Posted By: mikaldinho

Re: [FREE] Normalmap Generator - 02/27/10 16:50

thanks for the handy tool m8.
Posted By: mk_1

Re: [FREE] Normalmap Generator - 02/27/10 16:56

that's actually a nice idea, Hummel. I'll think about implementing this. Will post a new version than where you can move the cube and the light source
Posted By: Quad

Re: [FREE] Normalmap Generator - 02/27/10 16:59

sorry for side-tracking the topic but, can any of you point me to an algorithm or explanation of normalmap generation? (from single 2D image)

i searched for a while only thing i could find is generating normalmaps from highpoly meshes.
Posted By: Slin

Re: [FREE] Normalmap Generator - 02/27/10 17:47

I am probably wrong, but I think that one uses the brightness as heightmap, from which you can then calculate normals by taking always three pixels, calculating the direction of one to the other two and doing the cross product, which after dividing through the length gives you what you then just have to put into a texture, by multiplying with and adding 0.5.
Posted By: rojart

Re: [FREE] Normalmap Generator - 02/27/10 23:52

Originally Posted By: mk_1
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 laugh
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.

Originally Posted By: Quadraxas
...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:

Code:
///////////////////////////////
//#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);
	}
}


Posted By: Hummel

Re: [FREE] Normalmap Generator - 02/28/10 00:16

that is not an algorithm, that just shows how to use the cheap build-in normal function -.- slin already gave a correct answere
Posted By: Quad

Re: [FREE] Normalmap Generator - 02/28/10 02:18

Originally Posted By: Slin
I am probably wrong, but I think that one uses the brightness as heightmap, from which you can then calculate normals by taking always three pixels, calculating the direction of one to the other two and doing the cross product, which after dividing through the length gives you what you then just have to put into a texture, by multiplying with and adding 0.5.


it will take some time for me to fully comprehend that but i guess i got the main idea.
Posted By: TheShooter

Re: [FREE] Normalmap Generator - 02/07/11 03:54

Down? I can't load it.
Posted By: mk_1

Re: [FREE] Normalmap Generator - 02/07/11 09:48

Will fix it tomorrow
Posted By: Liamissimo

Re: [FREE] Normalmap Generator - 02/07/11 16:46

http://www.smart-page.net/smartnormal/fl10.htm

Very nice too! Online generator without downloading sth.
© 2024 lite-C Forums