Results 1 to 6 of 6

Thread: checking normal maps

  1. #1
    Senior Member Frequent Contributor
    Join Date
    Oct 2009
    Posts
    592

    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.

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Oct 2009
    Posts
    592

    Re: checking normal maps

    Damn, yeah, there was too much red, as I calced x wrongly (from the row) and z from the column instead of the reverse 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.

  3. #3
    Senior Member Regular Contributor Rosario Leonardi's Avatar
    Join Date
    Aug 2008
    Location
    Italy
    Posts
    356

    Re: checking normal maps

    Gimp: http://developer.valvesoftware.com/w...on_in_The_GIMP

    Melody: http://developer.nvidia.com/object/melody_home.html (no more developed)

    Xnormal: http://www.xnormal.net/1.aspx

    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.
    ~ ~ I tell you, realtime 3D is made of blood, sweat and screams! ~ ~

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Oct 2009
    Posts
    592

    Re: checking normal maps

    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.

  5. #5
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,677

    Re: checking normal maps

    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.

  6. #6
    Senior Member Frequent Contributor
    Join Date
    Oct 2009
    Posts
    592

    Re: checking normal maps

    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

Similar Threads

  1. normal maps
    By heinz85 in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-25-2012, 11:00 AM
  2. VBO and Normal Maps
    By Mctittles in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 04-23-2011, 09:42 AM
  3. Normal Maps
    By toneburst in forum OpenGL: GLSL
    Replies: 4
    Last Post: 03-31-2008, 11:00 AM
  4. Normal maps
    By Twixn in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 05-25-2004, 11:47 PM
  5. Normal Maps
    By pedrovr in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 02-20-2003, 07:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean