Closed thisismygatekeeper closed 2 years ago
Often morph targets (also: "shape keys" or "blend shapes") change not just the positions of vertices, but the normal vectors associated with them. That's probably what you're seeing here – as the morph target weight increases, the lighting begins to look as if the sides are facing up. For complex morph targets that can be a good thing, but as you mention it's confusing when the shape is just a cube.
If you don't want that to happen, when exporting from Blender you can change export settings to (a) skip shape key normals, or (b) skip vertex normals entirely. I'd probably choose (b) for models with a low-poly look.
Thanks for your reply @donmccurdy. Turning off normals works!
To reproduce, I use blender to generate a very simple cube, assign it a base color and a blend shape that shrinks the cube in one dimension. After these, I save the cube as a gltf file. Then, in gltf viewer, dragging on the blend shape will change the “color” of the cube.
This seems odd. I’m pretty new to this space. Is this a bug or a feature?
I’m attaching the blender python script, the generated gltf file as well as a video clip for the color changing effect.
gltf file: https://www.dropbox.com/s/b1qjvy3btu38hut/1.glb?dl=0
video clip:
https://user-images.githubusercontent.com/96497730/151229950-651f6020-5349-4524-8c0d-d18ad35f20f3.mp4