0

How do you replace geometry normal with normal map completely? I am provided normal map and geometry from my work. I am not allowed to change these files. The goal is to just use normal map normal instead of geometry normal. However, I can't find a way to achieve this since every way I tried was geometry normal dominating and the triangles are all obvious. The only time I was able to achieve using normal map to replace geometry normal and render smooth surface was through custom shaders. Is there any other way to use built-in shader but with normal map only?

            <mesh geometry={geometry}>
              <meshStandardMaterial
                attach="material"
                normalMap={normalMap}
                map={texture}
              />
            </mesh>
None None
  • 27
  • 1
  • 7
  • The closest thing I can recall is this: https://threejs.org/examples/#webgl_materials_normalmap_object_space . See in the source code what happens to "normal" attribute. – prisoner849 Jun 01 '23 at 05:47
  • It turned out it is the .obj file issue when I use OBJLOADER. I loaded the file as a string and manually create a geometry to fixed this issue. – None None Jun 02 '23 at 06:24

1 Answers1

0

It turned out it is the .obj file issue when I use OBJLOADER. I loaded the file as a string and manually create a geometry to fixed this issue.

None None
  • 27
  • 1
  • 7