Update: My input arrays for indices and vertices (which are hard coded) are shorter than what each object is storing at run-time. . . . console.log(MeshArray[i]) and they all have extra elements.
I am creating procedurally generated object. The objects used indices and vertices. I am getting an extra triangle drawn from the models origin. Does anyone have any idea how to get rid of this extra triangle, and tell me whats going on & why this is happening?
I’m really confused, and dont know what is going on. I would LOVE help with this one.
Here is what it looks like, ignore the material. I circled the extra vertex.
cant give the data. it does it to any object. give me like 100 vertices and the indices and ill post it. none of the y coordinates are at 0 for those higher up objects, yet there is a triangle being drawn with a vertex that y=0.0.
I just think threejs is broken. atleast buffergeometry is broken.
Im helping the community by letting someone know that THREE.BufferGeometry() is broken… I know openGL, and all you have to do is create and bind your buffers, store the ID’s, give it the arrays, and give it the offsets. I know all WebGL does is call those openGL functions.
Statements similar to yours, that something is broken in Three.js, come time to time. Usually it’s because that someone doesn’t know how the things work, or applies wrong maths, or it’s just a typo in code.
Are you sure that the data in your buffers is correct?
As you parse an obj-file, make you sure that you split a face, for example, of 4 vertices into 2 faces of 3 vertices? OBJ format allows such faces and OBJLoader solves this thing with a very simple triangulation.
triangulated, indexed, no duplicates, no quads, no ngons, no polygons. I know the obj format and pulled these manually and pasted them into a hardcoded array. no import. There exists no vertex (0, 0, 0) in the model. The models are perfectly fine except for these extra triangles.
man, there are 100s of examples of three.js working perfectly fine that you can check online, and then there is 1 example of it being broken that you cant show us? just admit that you have a bug somewhere, @Kamjam21xx