You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a small paragraph or page somewhere in the wiki explaining what is and how to use the NormalType param in PBRLighting and in Lighting (introduced by #2140 ) .
This is a poorly written draft, if anyone can pick it up, clean, improve an publish it, i think it might be pretty useful for newcomers:
Normal Types
there are two conventions for normal maps:
OpenGL-Type also known as OpenGL-Style or Y+
DirectX-Type also known as DirectX-Style or Y-
they differ in the sign of the green channel.
JME supports both using the param NormalType that can be set to either -1 for directx or 1 for opengl.
By default jme materials use -1 (directx).
When to set the NormalType
you should set the normal type everytime you create a new instance of the material PBRLighting or Lighting in jme.
Asset loaders such as GLTF Loader already set the normal type as part of the import process, so you should ensure that you are providing or otherwise setting the correct normal type to the tool used to create the models.
Eg. in the case of GLTF in blender, it is required to provide OpenGL type normal maps.
Is my normal map DirectX or OpenGL?
There is no easy way to determine that, other than sometimes the name of the texture itself that might contain some clues on its type, eg. Material0_NormalMapY+.png has Y+ in the name, so it is likely an opengl type normal map.
If the name doesn't give any clue, the next step is to research the tool used to generate the normal map or if the normal map is downloaded as part of a library, any useful text attached to the release.
The text was updated successfully, but these errors were encountered:
We need a small paragraph or page somewhere in the wiki explaining what is and how to use the NormalType param in PBRLighting and in Lighting (introduced by #2140 ) .
This is a poorly written draft, if anyone can pick it up, clean, improve an publish it, i think it might be pretty useful for newcomers:
Normal Types
there are two conventions for normal maps:
they differ in the sign of the green channel.
JME supports both using the param NormalType that can be set to either -1 for directx or 1 for opengl.
By default jme materials use -1 (directx).
When to set the NormalType
you should set the normal type everytime you create a new instance of the material PBRLighting or Lighting in jme.
Asset loaders such as GLTF Loader already set the normal type as part of the import process, so you should ensure that you are providing or otherwise setting the correct normal type to the tool used to create the models.
Eg. in the case of GLTF in blender, it is required to provide OpenGL type normal maps.
Is my normal map DirectX or OpenGL?
There is no easy way to determine that, other than sometimes the name of the texture itself that might contain some clues on its type, eg. Material0_NormalMapY+.png has Y+ in the name, so it is likely an opengl type normal map.
If the name doesn't give any clue, the next step is to research the tool used to generate the normal map or if the normal map is downloaded as part of a library, any useful text attached to the release.
The text was updated successfully, but these errors were encountered: