0 registered members (),
1,209
guests, and 0
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: [FREE] Normalmap Generator
[Re: mk_1]
#313084
02/27/10 16:59
02/27/10 16:59
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
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.
3333333333
|
|
|
Re: [FREE] Normalmap Generator
[Re: Quad]
#313167
02/27/10 23:52
02/27/10 23:52
|
Joined: Oct 2004
Posts: 900 Lgh
rojart
User
|
User
Joined: Oct 2004
Posts: 900
Lgh
|
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);
}
}
|
|
|
Re: [FREE] Normalmap Generator
[Re: Slin]
#313178
02/28/10 02:18
02/28/10 02:18
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
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.
3333333333
|
|
|
Re: [FREE] Normalmap Generator
[Re: TheShooter]
#357448
02/07/11 09:48
02/07/11 09:48
|
Joined: Dec 2000
Posts: 4,608
mk_1
OP
Expert
|
OP
Expert
Joined: Dec 2000
Posts: 4,608
|
|
|
|
|