Normal Map Generator for Blender3D

i though i gonna post this here too as perhaps some people might be interested in it. for use with Blender3D i create a Normal Map Generator to create normal maps for low resolution meshes like they are used in games. it composes of a python script exporting the meshes (hi res, low res) into a *.dim file that the normal map generator too can process. the tool itself is a c++ program running outside of blender.

if you want to try it out have a look at the Project Page containing informations, screenshots and downloads of sources and binaries of the initial 1.0 release.

feedback is welcome. happy trails.

Nice project, normal maps are utterly useless to 3d game rendering for me, but in terms of blender it helps a lot. Normal maps are better then bump maps and can be use for LOD rendering to reduce rendertime of massive sceens. I am a bit busy now to try it, but I am sure to try it when I have the chance.

Oh and thanks for open source, I am sure a Mac user will be happy for that as well.

Great resource, thank you. Maybe we can get a Mac release also? Some of us Blender artists are not used to compile…

Thank you in advance,
Gustavo Muñoz

Awesome, although I was under the impression that Blender did not yet render normal maps properly using anything other than planar mapping.

@mac users: i do unfortunatly not own a mac nor do i have access to one. otherwise i would provide a mac version. i could try getting a mac-emulator though and see if i manage to cross-hack this one in there. just donno if it would work in the end ^_^.

@all: placing the generated normal back into blender does not really work yet. this is though not the problem of the tool, more the problem that i still have no clue at how blender does use rgb-normal-maps. most probably it is object space normal-maps but that i have to try out first. if somebody knows how the ‘rgb’ colors are mapped to the ‘xyz’ values it would work. i’ll try to find out.

Odjin: very cool tool. I have been playing alot with normal maps and I have also written a python script but for ATI’s normal mapper tool. You can read about it here: http://neuralfuzz.com. I realy like your tools ability to be able to use a subsurfed high poly mesh, I went the easy route and require the high poly mesh to be converted from subsurf to mesh format.

I don’t use the generated normal maps in Blender but use them in the Ogre renderer.

Anyway, great work on the tool. I am going to make a post in the Ogre forum and the Ogre Wiki plus provide a link to your site. There are lots of people using blender to build meshes for use in Ogre and they will definately make use of your tool.

thx you like it and it works. :slight_smile:

little side note on usage in blender. i did some RTFM and found out why it doesn’t work in blender. the reason is that in the current release the RGB-normal map is implemented the wrong way. they used the Object-Space version (can be found in the Generate Texture Maps dialog from my tool) but they implemented it the wrong way which renders a correct normal-map unusable in blender.

thus if you want to use the normal map you have to use a game engine for the time beeing. or you wait for the next release where they hopefullt fix it (meaning, using Tangent-Space finally).

All right. I wanted to take a look at your program but, unfortunately, when I tried to get your app to play in windows all I got were errors. Error at execution of the binary is as follows:

The instruction at “0x00000000” referenced memory at “0x00000000”. The memory could not be “read”.
Aparently the dll’s do need to be present? However a search for fox.dll only turns up the source code, for which I assume one will need to have visual c or some such present to build. Any idea what the errors are about?

Also, after considerable searching I managed to locate the Python script in the source package denormgen-1.0.tar.bz2. So if you want to use the program you’ll also need to download the source.

looks like you managed to hit the wrong timing, which i’m sorry for. shortly after the release i noticed some troubles in the files released i corrected then. most probably you snagged the old version before the new files spread through the source-forge net. try downloading the windows binary again. the fix for the seg-fault is included as is the script which didn’t make it’s way into the initial upload.

according to the fox.dll it’s true that it’s only source. but that’s not a problem as the dll is compiled into the executable (hence 1.4MB in size).

i hope this solves the problem otherwise write back so i can try to sort out what goes wrong.

the three files to download all contain now the script file thus downloading the source is not needed.

Got it. Now I’ll just park that project on a cd and wait for blender’s support. :slight_smile: Thanks.

let’s call it like this… under certain circumstances you can use the normal-map already in blender. you have though to:

  • create a normal-map using the ‘Object-Space’ option
  • in blender the mapped object faces have to face upwards and should not drop below the floor (meaning, if you have a sphere only the upper half is allowed to be textured).

you can though rotate the object after this. the face-up is only required in the local object coordinate system. if you pay attention to those things you can already use it in this blender version. it’s just not very practical ^^;

added a security check to the script and added showing the Normals and Tangents in preview mode. also changed the tangent-calculation a bit as it didn’t do the job right. there’s still a problem left with ‘holes’ in certain meshes i have to investigate.

new version 1.1 can be found on the Project Page

How do I execute the normal generator in Windows? I’ve tried dragging files onto it, double clicking it, running it from the command prompt. It just opens and then closes… Any help would be appreciated!

sorry, i forgot to watch my topic ^^; .

to run it under windows simply double clicking it should work. have you downloaded the newest version?

Nope, doesn’t work… I’d really like to use this tool! :slight_smile: Here are my system specs if it helps:

Windows XP Pro
Service Pack 1

Pentium 4 2.5 GHz
2.0 GB Ram

Geforce FX 5900 Ultra
256 MB

Direct X 9

hm… i’ll cook up tomorrow a binary with special debugging infos which should give a better insight what went wrong.

*** solved ***

Release 1.2 of the DE Normal Map Generator has been done including the source distribution as well as two binary version for unix and windows.

Version 1.2 fixes errors during the generation process, adds some usefull options to control the process of generations and has a fix for NVidia based cards.

Links:

The python script geve me an error about no hires object, but I have selected the high and the lowpoly before export.

Anyone?[/b]

in the README is written that you have to switch on Sub-Division on the hi-res mesh even if you set the Sub-Division-Level to 0. most probably this is not the case here.