Problem with generating normalMaps

Hi all,

Im trying to create a little Java program that will generate a normal map from any given texture and I have made some headway - It just seems like there is something missing as my textures arent as "pronounced" as the dot3 ones i have seen of the same texture

Here is what I do (and please correct me where I'm wrong):

  1. Take the original image and use a Sobel edge detection algorithm on both X and Y axis.
  2. Make the X-axis the red pixel value of the new image and the Y-axis the green.
  3. Calculate the Z-axis through the x and y values through: 0.5 * Squareroot(1 - x^2 - y^2) + 0.5
  4. Make the final picture

    My algorithm successfully finds any edges and cracks in a texture but it doesnt make it “deep” / “pronounced” enough… here is where i got the calculation informations:

    (since i cant find any place that properly describes how to make this without shaders)

    In case im not describing it right this is what im trying to make:

    Hope someone can help  :slight_smile:

map the color for the x,y and z

red (0-255) auf X (-1.0 - 1.0)

green (0-255) auf Y (-1.0 - 1.0)

blue (0-255) auf Z (0.0 - 1.0)

Thanks BlackBlue - I will give it a shot!  :slight_smile: