I am currently trying to properly load texture as a normal map from blender.
I need an algorithm that converts gray-scale image to a normal map.
Could someone point me to such ? I was trying to find it for the whole day but with no scuccess
The texture editor in jMP can do that, heres the filter that does it:
that is pretty awesome
Thanks. You saved me a lot of time
I can use it but I’ll need to copy the code since this is in entirely different project.
I’ll put the code in texture helper.
Could you only tell me what is the purpose of the ‘a’ parameter in the filter method?
I guess it is some kind of strength factor, is it not?
I guess so, “strength” is the only parameter in the UI.
the implementation of normal map is in place. And it seems it works fine
The only thing I am worried about is how to determine if the texture I get is a normalmap.
Blender can use predefined normalmap texture taht is provided by the user as an image.
But generated textures can be used also and they are not explicitly converted to normal-maps.
Do you have any suggestions how to distinguish generated textures from the loaded ones??
We could use some kind of flag, user data or interface.
But every one of these changes would require code changes.
Maybe a proper TextureKey set inside each generated texture would be a good idea?
How do you think ??