Yes, that was exactly what I was asking for. Thank you
But this not works for spheres with segmentation more than 1!
Identifying Flat Edged Surfaces | Babylon.js Playground (babylonjs.com)
@CodingCrusader That was my original question. With a shape that you provided. You can clearly see that there are 2 facets on each face of the hexagon. I need the ability to pick anywhere inside that 2 facet area, and have it highlight both facets. The sample that you provided seems like it is coloring above and below. Hereâs an example.
Lets say I select a point on the shape
and now it highlights the selected face
You need to convert your mesh to flat shaded mesh. I forgot to add that line in playground.
The colour gradient kind of effect is occurring because of shared vertices.
Thought you done it @Akshat_Agrawal but you didnât.
Isnât it insane how hard that is?
It seems the way to go is checking the normals but i did not try yet.
box.convertToFlatShadedMesh();
didnât work either. How did you convert the to flat shaded mesh?
It looks like you guys have it worked out, but Iâm going to chime in.
The hard part of this problem may be how to define the so-called faces.
From a practical point of view, if it means the face of the glb model derived from blender.
It looks like blender gives them a shared index when trigonometrizing them.
So, a simple search for faces with shared indexes would be sufficient for most cases.
So, I made a very simple implementation, which is less than 60 lines with the scene code.
box.convertToFlatShadedMesh() is working, see pg
Sorry to contradict you, but no, it doesnât work. in germany at least
âin germany at leastâ Is this a meme?
My English is not very good, dIs it true that this does not work in Germany?
What is a âmemeâ?
⌠no, the part with Germany was a joke. The fact is: convertToFlatShadedMesh is not working. I can select only the facets in the middle of the sphere.
meme and joke are probably close synonyms. I donât know, the translation software taught me.
The fact that the top surface is not selected may have something to do with its implementation, but not with convertToFlatShadedMesh.
He tells you to use convertToFlatShadedMesh() just to solve the problem of color overflow on the selected faces.
He may have skipped the non-quad faces.
I found a definition of âmemeâ in wikipedia. My attention was just to make you smile.
I implemented a âFace-Center-Highlighterâ and used your suggestions with comparing the normals
But I am still not sure if the results are ok for the sphere mesh that @CodingCrusader mentioned. Seems I do not detect the faces in the bottom part correctlyâŚ