-
Notifications
You must be signed in to change notification settings - Fork 208
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
Default opengl shader misrepresents polymeshes with no N prim var #110
Milestone
Comments
Sample torus used to demonstrate problem (save as .obj file):
|
So what we'd be wanting here is to add face-normals so it is shaded in a faceted manner? |
faceted per face normals sounds fine. |
The problem here is actually in IECoreGL in Cortex, so we'll need to deal with it there. |
johnhaddon
added a commit
to johnhaddon/cortex
that referenced
this issue
Nov 25, 2013
This is achieved by computing a Uniform "N" in the ToGLMeshConverter. Because up till now the GL MeshPrimitive didn't support Uniform data, the "N" is immediately converted to FaceVarying also in the ToGLMeshConverter. This new conversion makes the conversions taking place inside the IECoreGL::MeshPrimitive totally redundant unless someone is using the MeshPrimitive class directly without a converter. Note that the MeshPrimitive actually doesn't have enough information to support Uniform data directly because it doesn't have the faces prior to triangulation. For this reason, I think there's a very good case for ditching the internal conversions in MeshPrimitive, and making the MeshPrimitive constructor need only the number of triangles, and not the vertex ids (which are used purely for conversion). Fixes ImageEngine#118 and GafferHQ/gaffer#110.
Closing this, as the root cause has been fixed in ImageEngine/cortex#118. |
lucienfostier
referenced
this issue
in lucienfostier/gaffer
Apr 4, 2017
lucienfostier
referenced
this issue
in lucienfostier/gaffer
Apr 7, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If an object of type:MeshPrimitive and interpolation:linear has no 'N' primvar (normals data) the default 3d Viewer shader doesn't function correctly.
Meshes set to interpolation:catmullClark don't suffer from this problem.
The text was updated successfully, but these errors were encountered: