Page 1 of 1
Normal map editor
Posted: Sat May 07, 2005 9:07 pm
by Kai-Peter
I'm looking for a tool for editing normal maps. I know a lot of tools can export them if you give them a heightmap. But I want to edit the little normals themselves and not use a heightmap. My immediate need is to create a proper solar panel where the crystalline structure has a tendency the reflect specular light in radically different directions (ie. sharp borders with uniform normal areas). But I can see how such a tool would be practical for some other nifty effects.
Any pointers appreciated!

Posted: Sat May 07, 2005 9:37 pm
by P
Are you looking for a tool where you can edit each pixel of the normal map by moving the corresponding vector ?
You can probably open the normal map texture into Gimp/Photoshop and enter the nomal value by giving the R G B value for each pixel, but you probably know that. ( and it ll be "easy" only for normal map in tangent space )
I think i see what you are trying to do, but unfortunatly never heard about one of these tools.
Posted: Sun May 08, 2005 1:19 am
by TheGilb
The best thing you can do is create a high level mesh, then simplify it, then using something like nVidia's Melody create the normal map. Creating / editing normal maps by hand is NOT recommended!!!
Posted: Sun May 08, 2005 9:22 am
by Kai-Peter
Thanks for the suggestions. Yes, I'm talking about a tangent space normal map, my bad with the omission.
I think I'm going for the manual route by rendering a big round bump into a single map and picking colors from it to use for manual painting. The problem with mucking around with RGB is that you need to normalize the values. There is no end of grief if you feed non-normalized values to a shader program expecting unit vectors ..
The problem with doing a mesh first is that most normal mappers assume the mesh is continuous. Ie. adjecent polygons connet to each other. In my specific case the surface is actually flat, the normals are a property of the crystalline structure. An 3D approximation would have a lot of disjoint surfaces floating in space, which is a case not expected by most tools. The borders need to be sharp, where a tool would smooth them out (you need to sample a few height points to create a normal).
A specialized tool would be great, but it's pretty easy to see why none exists. These patches probably need to be created algorithmically anyway, through some scripting interface or such.
Posted: Sun May 08, 2005 11:38 am
by :wumpus:
What about some plain ol' math, and then exporting that as a raw image? I know you can get very nice chrystalline structures with fairly simple fractal algorithms.
(better than doing it by hand, probably)
I'm not even sure normal mapping is the best way to go to create a surface like the one you describe though; normal mapping especially looks good for smooth surfaces. Maybe a custom shader of some kind would be even better?
Posted: Sun May 08, 2005 3:49 pm
by P
Oh i didn t thought about the need of unit vectors... I see how it is te pain oging with the manual method now
When i read you i was thinking you were going to use a "normal map format" ( rgb colors determine the vector ) but rendering the effect using a special shader you ll write.
Posted: Sun May 08, 2005 9:08 pm
by Kai-Peter
The shader will be custom, but one of the texture feeds needs to be the crystalline structure. One property of the structure is the direction that acts like a normal for patches of crystal. It would be possible to encode this parameter it in some other format, but if the tools for normal maps are hard to come by, the tools for other formats would be nonexistent ..
@:wumpus:, I'm still for the manual approach, fractals are cool and they can be a great support to an artist, but many times that final tweaking in Photoshop is required to get them to be A+. Photoshop has a nice crystalline filter and I could just use that one combined with color replace to create the final structure.
@P, I'm actually using tangent space normal maps encoded using RGB, just like you said. They are then fed into the custom shader to produce the final result.
heightmap
Posted: Mon May 09, 2005 3:23 am
by innovati
why not use a bump/heightmap instead - you can manually edit thast one, and if in the future you want to use the texture with a setup that includes Parallax or difference mapping, you don't have to re-do it!
Posted: Mon May 09, 2005 10:30 am
by Kai-Peter
Thanks Innovati. The problem with the crystalline structure is that it's not a gemometric property but an optical one. The crystals are completely flat, they just happen to reflect specular light in a way that's easy to approximate with a normal map. Also, there isn't a bump map that would be able to represent this optical behaviour. A 3D geometry approximation would have disjoint floating surfaces (read: polygon soup). Normal map creation from bump maps rely on neighbouring height values to find out the normal. Doing this would blur the sharp transitions present in the original and we might run into issues with the limits on the height field values (a large piece of crystall with a normal almost in line with the surface).