-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Hey, I'm not really sure this belongs in this library but I don't have a much better way to communicate with you. I found a model https://poly.google.com/view/eydI4__jXpi that does not contain normal vectors for one of the material groups. This makes the model render all black when computing the diffuse color since it's multiplied by the dot product of the face normal and the light direction.
This can be computed by calculating the normal of every face that a vertex is a part of and taking the average of these as the vertex normal. I added code to ObjUtils.convertToRenderable that does this but it's slow (about 21.5 seconds on a Pixel phone), even then I clearly did something wrong because the color isn't quite right (I'm still getting some black spots). Here's the commit to my branch where I added the code to inject normals: GoMeta@aefde24
Do you know if there's a better way to make sure that all the faces/vertices have the appropriate normals?

