checking normal maps

I think there is way too much red in the normal map below, but I don’t have any utility to visualize the heightmap from which it came and decide for certain. What utilities can I use for this?

Anyway, do you agree that there is too much red? x, y, z of the heightmap are all within the interval [0, 1]. The column of the heightmap maps to x, the row to z.

That is, I need a utility that can reconstruct a surface from the heightmap and optionally calculate the normal map from it.

Damn, yeah, there was too much red, as I calced x wrongly (from the row) and z from the column instead of the reverse :slight_smile: If you flop the heightmap and normal map, you get the correct situation.

Sorry for bothering you. Normal maps make the scenes so beautiful, I couldn’t help but ask and my eye is not that sharp.


Melody: (no more developed)


Also the program that you usually use to model (Maya, Blender, Max, Xsi) probably have a normal map visualized.

The slope of your height map (so the quantity of red) depend on the scale you give to your conversion program.

Thanks, I need to say though, that I did not create the normal map with a modeling program, but with my C++ utility. Also, the map is from a parametric surface. Maybe a modeling program script would be a better choice.

About the scale, yeah, the scale transforms the normals.

Still, how to reconstruct a surface from a heightmap, is there an easy utility to do that? Of course, there are ways to do it in every modeling program, but I don’t even know the basics of them.

Still, how to reconstruct a surface from a heightmap, is there an easy utility to do that?

By “surface”, do you mean how to generate a list of XYZ positions that represent the heightfield?

Well, for a heightfield, the value of the “color” at a position represents the displacement from a neutral height. Let’s say zero; that’s always a useful base height.

You know the X and Y position for a given height; it’s just the X and Y position in the texture for that value. Obviously, you will want to apply a transform to the X and Y values to put it into a reasonable world space. The same goes for the Z values, which are the “colors” in the heightmap. Pick a reasonable scale to apply to them, and you have a Z coordinate.

Thanks, I construct the heightmap by sampling a parametric surface, so I can (kind-of, in reality a reconstruction filter would be necessary and not all frequencies would be restored) reconstruct too, but, I was hoping there was some utility, say for viewing terrains, that does that for me. Otherwise, I’d have to write this utility myself and I don’t see any point in this, unless, perhaps, the denizens of these forums would like to see a utility like that :slight_smile: