Initial Informations

Informations, Help and general talk around the Normal and Displacement Map Generator Tool.
Post Reply
User avatar
Dragonlord
Forum Administrator
Posts: 609
Joined: Fri Jul 30, 2004 4:30 pm
Location: Switzerland
Contact:

Initial Informations

Post by Dragonlord » Sun May 15, 2005 6:22 pm

i'll post here a short information about the new tool for the game engine, the normal map and displacement map generator.

what is this tool for? one way to make games look better is buy bumping up polygon count of the models. this though quickly hugs the resources of your pc and tends to become very slow especially with many models on the screen. a solution to this problem has been the introduction of normal maps. those are additional textures containing informations of the surface normal of a model face on a per-pixel basis. instead of the real face normal it is fetched from the normal map resulting in fine grained control over how the model is lit. generating those normal maps from hand in GIMP or other apps is a rather tedious thing unless you simply want to create detail normal maps. there are two kinds of normal maps, the geometry normal map and the detail normal map. the former is very difficult to do in a graphic application whereas the later is rather easy to do. geometry normal maps are best generated by using a high resolution model of your true game model and then using a tool in some form deriving a normal map from this high resolution map for your low polygon mesh. one known tool is ORB for doing this but it is windows only and i never got it to work. thus this is where this tool kicks in. it helps generating such geometry normal maps from a high resolution model. in addition the tool can also generate a height map storing just the altitude variation from the high resolution model to the low polygon one.

the tool itself is a gui driven tool based on Gtk+ and thus portable to windows and oder systems having Gtk+ support. at first you need to use the Blender3D Python Script coming with the tool to export your model (composing of a low polygon mesh and a high resolution mesh using subdivision) from Blender3D into a *.dim file usable by the generator tool. then you can load the model into the tool, adjusting the subdivision level (to get a tradeoff between quality and processing speed suiting your needs), the texture size and then hit the generate menu entry to get your maps calculated. you can then save the maps into TGA files to use them further.

here are a couple of screenshots from the generator. it is still work in progress and has a couple of bugs which have to be eliminated but in general it does work.
right side: the same cube with additional detail and sub-division on 4x.
*** removed ***

left side: normal map generated by the tool
right side: displacement map (or simply height map) generated.
Image Image

once the tool is finished it will be available on the homepage for download.
Last edited by Dragonlord on Wed May 18, 2005 5:02 pm, edited 1 time in total.
Image
Oh to be a dragon, of silkworm size or immense...

User avatar
Dragonlord
Forum Administrator
Posts: 609
Joined: Fri Jul 30, 2004 4:30 pm
Location: Switzerland
Contact:

Post by Dragonlord » Tue May 17, 2005 11:23 pm

normal map generation is now fixed an fully works with the test-setup. displacement map generation seems to work too although it looks a bit weird to me. for some reason though i can not test the normal maps in blender as it has a nasty habit... for more about this problem see the topic at elsyiun (topic). this is though a blender related problem and will not hinder the release. i just need now to finish some minor things like generating only one texture alone instead of all, a progress bar for this lengthy operation and the import and merging of a detail normal map.
Image
Oh to be a dragon, of silkworm size or immense...

User avatar
Dragonlord
Forum Administrator
Posts: 609
Joined: Fri Jul 30, 2004 4:30 pm
Location: Switzerland
Contact:

Post by Dragonlord » Wed May 18, 2005 5:03 pm

approaching release. only a couple of small things to add and then it's ready for release. here an example of the new preview in action so you can check out your work of the spot.
*** removed ***
Last edited by Dragonlord on Fri May 20, 2005 5:10 pm, edited 1 time in total.
Image
Oh to be a dragon, of silkworm size or immense...

User avatar
Dragonlord
Forum Administrator
Posts: 609
Joined: Fri Jul 30, 2004 4:30 pm
Location: Switzerland
Contact:

Post by Dragonlord » Fri May 20, 2005 2:37 pm

fixed a couple of things and added normal-smoothing and load support for diffuse maps. still some bugs around but i think this one is soon ready for beeing wrapped up. i'll try to get a SourceForge profile for this tool to facilita retrieval of it.
Image
Oh to be a dragon, of silkworm size or immense...

User avatar
Dragonlord
Forum Administrator
Posts: 609
Joined: Fri Jul 30, 2004 4:30 pm
Location: Switzerland
Contact:

Post by Dragonlord » Fri May 20, 2005 5:10 pm

added now detail map support. you can now load additional normal maps to refine your generated one until it looks perfect.

Image

small guide from left to right, top to bottom:
1) load *.dim file containing low-res and hi-res mesh
2) select subdivision level (3x) and use 'Generate Texture Maps' to get the geometry normal map
3) hit 'Apply Detail Normal Map' with a strength of 35% to load and merge a detail normal map onto the geometry normal map
4) load a diffuse map to preview your work in realtime (rotate cube, move light source). if it pleases hit 'Save Normal Map' to store your new masterpiece into a TGA file
Image
Oh to be a dragon, of silkworm size or immense...

User avatar
Khan
Intermediate
Posts: 69
Joined: Fri Sep 17, 2004 9:31 am
Location: src/packages/collections/

Post by Khan » Fri May 20, 2005 11:34 pm

Boah, that's tight 8)
How's Fox doing?
....................................................................
Time: 0.090000 seconds

OK
(68 tests)

User avatar
Dragonlord
Forum Administrator
Posts: 609
Joined: Fri Jul 30, 2004 4:30 pm
Location: Switzerland
Contact:

Post by Dragonlord » Sat May 21, 2005 12:09 am

planed is to change this tool and the mapeditor to use FOX instead of Gtk+. i think i'll start the port somewhere this weekend. it should not be that much of a problem as there is nothing really connected to the gui.

i've also filed now a request to add this sub-project to sourceforge. i hope i get accepted ^_^
Image
Oh to be a dragon, of silkworm size or immense...

Post Reply