Fix #5512 Give icosahedron normals & texcoords#5650
Fix #5512 Give icosahedron normals & texcoords#5650hamoid wants to merge 1 commit intoopenframeworks:masterfrom hamoid:master
Conversation
In the previous version, icosphere() could be used to produce icosahedrons with normals and texture coordinates, while icosahedron() would produce just the faces with missing normals and texture coordinates. The dependency between icosphere and icosahedron has been reversed, and icosahedron() now provides normals and texture coordinates.
|
Nice work. Confirmed working on master w/ macOS. |
|
that looks good but i think the normals should be flat for an icosahedron and smooth for an icosphere. perhaps there should be a common private function for icosphere and icosahedron for the geometry and then each would add the correct normals. otherwise the faces look strange when seen with lighting |
|
Would it make sense to add a flatNormals() method to ofMesh, which would duplicate vertices to get the expected non-smooth icosahedron? Such method could be used with other primitives like cylinder or any random mesh. |
|
yeah that would make sense |
|
I implemented a method to set flat shading at #5651 |
|
perfect, once that's merged i think this should be setting flat normals for the icoshaedron by default |
|
I agree. I'll wait for the merge and set it flat by default. |
|
Just merged the other PR, if you want to add the flat by default for icoshaedron i'll merge this too |
|
I'll close this PR. I created a new one with normals and default flat shading for the icosahedron |
In the previous version, icosphere() could be used to produce
icosahedrons with normals and texture coordinates, while
icosahedron() would produce just the faces with missing normals
and texture coordinates.
The dependency between icosphere and icosahedron has been
reversed, and icosahedron() now provides normals and texture
coordinates.