Page 1 of 2

Height2Normal(v. 2.1) - convert height maps to normal maps

Posted: Sun Apr 03, 2011 9:19 am
by ent1ty
Hi!
This is a tool I developed primarily for my needs, but there's no reason why I can't share it with you. I hope you'll find it useful.

I think the name explains it all, but take a look at this screen to see how does the interface look like

Image


So, here is how you use it:
1. Load a height map;
1.1. If you want, you can also load a diffuse map to get a better idea of how will the normal map look like. If not, the height map will be used as a diffuse map.
2. Play with the amplitude value to get the desired effect.
3. Choose a file name for the normal map. IF YOU DON'T CHANGE IT, IT WILL OVERWRITE YOUR ORIGINAL HEIGHT MAP(this is on purpose)
4. Hit the Save Normal Map button.


Changelog for 1.1
- The application is now forced to save the original height value into the alpha channel(this is kind of fundamental for parallax mapping). Up until now, the height value was only saved if the height map file was 32 bit on disc.

Changelog for 2.0
- Pre-compiled linux binary included!
- Compiled with Irrlicht 1.8
- Reworked the GUI
- Now using a custom subdivided cube mesh for the visualization, 8 interpolated normals of the irrlicht default one just weren't good enough
- You can now use mouse dragging to rotate the cube(this is still a bit glitchy but works mostly fine)
- Added VSync
- Cool new message boxes on normal map save success/fail!
- General optimizations(textures that are not needed anymore are removed automatically)

Changelog for 2.1
- Fixed a Linux crash
- Improved mouse input on Linux, but it's still not as good as on Windows

Download (pre-compiled windows and linux binary plus source with a CB gcc project and a linux makefile)


Released under zlib licence.
Have fun!

hmm

Posted: Sun Apr 03, 2011 4:54 pm
by netpipe
thanks for the new tool but it does seem to have a bug in linux where it locks up my mouse clicks even outside the window and none of the gui stuff works.

Posted: Sun Apr 03, 2011 6:18 pm
by ent1ty
That's odd... sounds like an irrlicht issue to me. Did you run it using wine or did you recompile it for linux?

Posted: Mon Apr 04, 2011 4:17 pm
by randomMesh
Runs fine here. Ubuntu 10.10, compiled on my own, Irrlicht is latest SVN trunk.

Thanks for this great tool!

Posted: Mon Apr 04, 2011 5:02 pm
by ent1ty
Quite frankly, i have suspected this for some time.

tecan, you might like to spend some money on engineering next Christmas.

randomMesh: thanks for info :)

Posted: Tue Apr 05, 2011 1:03 am
by netpipe
turns out it was running too fast, once i put dev->sleep(10,0); in there it runs just fine.

Posted: Tue Apr 05, 2011 1:00 pm
by ent1ty
Maybe vsync would do better... is that a justification for a new(bugfix) version?

Posted: Sat May 14, 2011 12:59 pm
by ent1ty
There is a new version in the first post, together with the changelog.

Re: Height2Normal(v. 1.1) - convert height maps to normal ma

Posted: Mon Mar 25, 2013 8:48 pm
by devsh
any chance of a heightmap preprocessor for relaxed cone stepping??? (GPU Gems 3 article)

Re: Height2Normal(v. 1.1) - convert height maps to normal ma

Posted: Fri Apr 05, 2013 3:41 pm
by ent1ty
Hah! Sorry, I didn't notice your reply until now, but that's what you get for not being on irc :P

Well frankly, i'm not very sure how one would go about doing that, what i did here is just call irrlicht to create the normal map and put a few shiny buttons with a cube on a window :)

Re: Height2Normal(v. 2.0) - convert height maps to normal ma

Posted: Sun Jun 09, 2013 7:50 am
by ent1ty
Released a new version! Now also includes a precompiled linux binary, all info including a changelog in the first post. :)

If you hit any bugs with the linux version, please let me know. I was compiling it on a virtual machine without 3D acceleration so it's more or less "untested".

Re: Height2Normal(v. 2.0) - convert height maps to normal ma

Posted: Sun Jun 09, 2013 8:45 am
by serengeor
Crashes when changing amplitude after loading diffuse texture.

Re: Height2Normal(v. 2.1) - convert height maps to normal ma

Posted: Sun Jun 09, 2013 1:53 pm
by ent1ty
Should be fixed now. However, for some reason, mouse input works differently under Linux. I attempted to solve this with a define, but it's still slightly jittery.

Re: Height2Normal(v. 2.1) - convert height maps to normal ma

Posted: Sat Sep 21, 2013 12:38 pm
by devsh
entity.. wanna do a merger under zlib or mozilla license???

I've done my own height to normal map code... and I believe it to be mathematically superior to anything I have seen so far that is open source

Now I have finished the maths to solve for heightmaps given only normal maps

interested???

Re: Height2Normal(v. 2.1) - convert height maps to normal ma

Posted: Sat Sep 21, 2013 7:50 pm
by ent1ty
sure, got any nice pics?