Normal map editor

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Kai-Peter
Greenskin
Posts: 133
Joined: Tue Oct 15, 2002 10:14 am
Location: Helsinki, Finland
x 1
Contact:

Normal map editor

Post 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! :)
Kai Backman, programmer (Blog)
ShortHike - Space Station Game
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post 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.
User avatar
TheGilb
Halfling
Posts: 71
Joined: Sun Oct 06, 2002 11:19 pm
Location: UK
Contact:

Post 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!!!
Kai-Peter
Greenskin
Posts: 133
Joined: Tue Oct 15, 2002 10:14 am
Location: Helsinki, Finland
x 1
Contact:

Post 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.
Kai Backman, programmer (Blog)
ShortHike - Space Station Game
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post 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?
P
OGRE Expert User
OGRE Expert User
Posts: 421
Joined: Fri Jan 07, 2005 9:49 pm
Location: UK
x 2
Contact:

Post 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

:shock:

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.
Kai-Peter
Greenskin
Posts: 133
Joined: Tue Oct 15, 2002 10:14 am
Location: Helsinki, Finland
x 1
Contact:

Post 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.
Kai Backman, programmer (Blog)
ShortHike - Space Station Game
innovati
Kobold
Posts: 35
Joined: Mon Feb 07, 2005 6:01 pm
Location: Ontario Canada
Contact:

heightmap

Post 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!
Kai-Peter
Greenskin
Posts: 133
Joined: Tue Oct 15, 2002 10:14 am
Location: Helsinki, Finland
x 1
Contact:

Post 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).
Kai Backman, programmer (Blog)
ShortHike - Space Station Game
Post Reply