Results 1 to 9 of 9
  1. #1
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,235

    Convert Heightmaps to Normal Maps with blender

    Just select your image from the red box, and set the resolution in the blue box:
    normalconv.png
    Then use typical F12 to render and F3 to save the image.

    Works only with square textures.

    Blend file:
    heighttonormal.blend
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



  2. #2
    Member Nick Manchul's Avatar
    Join Date
    Apr 2016
    Location
    Ukraine
    Posts
    395
    Hey.
    I apologize, but looking at your example I saw some shortcomings:
    - the normal map is obtained with transparency - for the normal map it's a little not correct
    - when converting a picture from a soft heightmap to a normalmap, the map is obtained with sharp edges
    - and generally the color palette (normal map) is not very high-quality
    Here's an example of a fairly professional conversion solution - using GIMP and the plug-in "normalmap":
    Here is an example of textures, drawn in the GIMP:

    texture01.png
    The last texture (the fourth) is made in your example, the normal level in the GIMP can certainly be done more.
    As you can see, there is a big difference, and no square restrictions .


    Here are the sources of GIMP:
    heightmaps_to_normalmap01.xcf.zip
    Here is the source file blend:
    heightmaps_to_normalmap_TEST.blend

    In the GIMP file in the layers (name) there is a description.

    Thank you for attention.

    p.s. of course, this files is a free extended help on BGE and GIMP
    Last edited by Nick Manchul; 04-Apr-18 at 03:55.
    my main Thread | my Youtube channel | my Cloud



  3. #3
    whats the benefit of using normal maps over bump maps if the data is the same?
    System "IVAN" (rev 2.0) - Win7 64bit - Blender 2.74:
    Intel i7-3770 4.10 Ghz | EVGA GTX 970 | GSkill Ares 16GB 1600 Mhz | ASUS P8Z77-V LK
    Where my Code Lives - https://github.com/DaedalusMDW



  4. #4
    Member Nick Manchul's Avatar
    Join Date
    Apr 2016
    Location
    Ukraine
    Posts
    395
    Originally Posted by Daedalus_MDW View Post
    whats the benefit of using normal maps over bump maps if the data is the same?
    - Well, if you pass the question of conversion - the main theme of the Thread ... the data is not the same.
    Even for example, for a height map, you need more resolution, and like the calculation algorithm is heavier for it (I heard it somewhere, I do not know whether it's a myth or not). If the use of normal maps would not be relevant, they would have outlived their. Also for GLSL filter from Goran (parallax) two textures are used - a heights map and a nomials map. The first gives the parallax effect (qualitatively), the second - the bump effect.That is - it all happens at the level of the hardware.
    Like so...
    Last edited by Nick Manchul; 04-Apr-18 at 04:40.
    my main Thread | my Youtube channel | my Cloud



  5. #5
    Originally Posted by Nick Manchul View Post
    - Well, if you pass the question of conversion - the main theme of the Thread ... the data is not the same.
    Even for example, for a height map, you need more resolution, and like the calculation algorithm is heavier for it (I heard it somewhere, I do not know whether it's a myth or not). If the use of normal maps would not be relevant, they would have outlived their. Also for GLSL filter from Goran (parallax) two textures are used - a heights map and a nomials map. The first gives the parallax effect (qualitatively), the second - the bump effect.That is - it all happens at the level of the hardware.
    Like so...
    when i say "data" i mean relative. bumpmap is an offset of the Z, but normal maps can offset X,Y, and Z. if a baked normal map offsets only Z, is it better? or do you just save a texture and share the bump map?
    System "IVAN" (rev 2.0) - Win7 64bit - Blender 2.74:
    Intel i7-3770 4.10 Ghz | EVGA GTX 970 | GSkill Ares 16GB 1600 Mhz | ASUS P8Z77-V LK
    Where my Code Lives - https://github.com/DaedalusMDW



  6. #6
    Member Nick Manchul's Avatar
    Join Date
    Apr 2016
    Location
    Ukraine
    Posts
    395
    Originally Posted by Daedalus_MDW View Post
    when i say "data" i mean relative. bumpmap is an offset of the Z, but normal maps can offset X,Y, and Z. if a baked normal map offsets only Z, is it better?
    - better or not, I do not know." I know that in all modern games there is a normal map - it means that there is a sense in it. In addition to a normal map, there is often a height map.

    or do you just save a texture and share the bump map?
    - I did not share anything. In this topic I saw flaws and showed the experience of creating normal maps - like a professional method. Although it is better to bake a normalmap from a physical texture (model) object.
    Last edited by Nick Manchul; 04-Apr-18 at 06:25.
    my main Thread | my Youtube channel | my Cloud



  7. #7
    Originally Posted by Daedalus_MDW View Post
    when i say "data" i mean relative. bumpmap is an offset of the Z, but normal maps can offset X,Y, and Z. if a baked normal map offsets only Z, is it better? or do you just save a texture and share the bump map?
    Bump offsets location / height per map pixel, normal offsets rotation of a surface per map pixel to modulate the intensity of reflected light.



  8. #8



  9. #9
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,235
    Why does it bake alpha? So that you can do parralax mapping without an extra texture sample (and it ensures all data from the original image is retained). In a PNG image, the color data in the transparent areas is also saved, so there is no reason not to use all four color channels.

    Why are normals better than heightmaps? What are these mythical normals anyway? They are the direction that the face, uh, faces. And the direction often has more impact on lighting than the position. So a heightmap is often converted into a normal map on the GPU every frame. To do this, the heightmap is sampled three times and the values compared. Inside a normal map it reads the values from a single pixel. Because sampling textures is one of the more expensive operations on the GPU, reducing the number of samples can make a huge difference - particularly on integrated GPU's.
    Last edited by sdfgeoff; 06-Apr-18 at 14:52.
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •