Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sponza model has smooth normals in the wrong places #50

Open
3 tasks
HugoPeters1024 opened this issue May 21, 2023 · 1 comment
Open
3 tasks

Sponza model has smooth normals in the wrong places #50

HugoPeters1024 opened this issue May 21, 2023 · 1 comment

Comments

@HugoPeters1024
Copy link

HugoPeters1024 commented May 21, 2023

This is what the normal map looks like when using dynamically calculated triangle normals (i.e. flat shaded). (Unfortunately this is in sRGB and tone mapped so the colors are a bit off):

image

However when interpolating the vertex models that are read from the file we can see that the drapes are smooth shaded (which is great), but so is the top of the pillar (see the blue and yellow diagonal stripes:

image

Another way of seeing this is by only showing normals that have their y component above some threshold (I believe it's ~0.98 here):

image

I hope it's clear that those normals are not how there are supposed to be. The side effect can be observed in this render for my pathtracer where a black spot occurs because ray samples that do not satisfy dot(outDir, surfaceNormal) > 0 are discarded:

image

The solution is to not share the vertex normals in some geometries. My only experience with tools like blender is using it as a file converter by importing and exporting as is so I was not able to fix it myself. Although I'm very motivated to help out in anyway possible.

Do note that this isssue occurs in multiple places, so far the complete list I've found is:

  • The top of the pillars on the first floor
  • The arches holding up the roof on the ground floor
  • The base of the plant pots
@DRx3D
Copy link
Contributor

DRx3D commented Nov 14, 2023

Transferring issue to Sample Assets so it can be dealt with there.

@DRx3D DRx3D transferred this issue from KhronosGroup/glTF-Sample-Models Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants