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

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

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

Post 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!
Last edited by ent1ty on Fri Mar 28, 2014 12:40 pm, edited 5 times in total.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
netpipe
Posts: 669
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

hmm

Post 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.
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post 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?
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Post by randomMesh »

Runs fine here. Ubuntu 10.10, compiled on my own, Irrlicht is latest SVN trunk.

Thanks for this great tool!
"Whoops..."
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post 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 :)
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
netpipe
Posts: 669
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

Post by netpipe »

turns out it was running too fast, once i put dev->sleep(10,0); in there it runs just fine.
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

Maybe vsync would do better... is that a justification for a new(bugfix) version?
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

There is a new version in the first post, together with the changelog.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

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

Post by devsh »

any chance of a heightmap preprocessor for relaxed cone stepping??? (GPU Gems 3 article)
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

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

Post 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 :)
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

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

Post 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".
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

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

Post by serengeor »

Crashes when changing amplitude after loading diffuse texture.
Working on game: Marrbles (Currently stopped).
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

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

Post 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.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

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

Post 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???
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

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

Post by ent1ty »

sure, got any nice pics?
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
Post Reply