#Reduce duplicated vertex from buffer array

8 messages · Page 1 of 1 (latest)

spark kite
#

this is my buuny.obj looks in blender and the vertex length is 1355.

when I load to three js the vertex length goes 23769
I know its because of face generation of three js but I want to get original vertex array length 1355.
Is there any way or functions to get remove duplicated vertex?

surreal rune
#

Do you just need the number? (i.e., how many 'true' vertices are in the shape?) Or do you need to be able to list them in some fashion?

#

Though I guess the effort is about the same either way. I guess it'd be better to ask, what do you need the original vertices / vertex count for?

spark kite
#

Now I'm trying to make exponential map from geometry. So I made an wasm files to make that.
But the input geometry vertex array have to be not duplicated i think.

surreal rune
#

What do you mean by an exponential map? The only thing I'm familiar with by that name has no relation to 3d graphics.

spark kite
#

http://www.unknownroad.com/publications/ExpMapSIGGRAPH06.pdf
this is exponential map I am trying to make an decal geometry not using projection way.

So I found the matlab function to make these and I'm trying to run this on my three js app 🙂

Any way even if i don't have original vertex array is it possible to make new float32 buffer array of vertex?

surreal rune
#

Ahh! It is actually a variant on the one I know, then. That makes sense! It should be; the simplest way to do it is probably to merge any vertices that have positions sufficiently close to identical (technically they should be truly identical but I don't necessarily trust Blender's export. 😛 ) You'll want to maintain the triangle information, though, in terms of the 'merged' vertices, and then probably use that to build some more geometric structure than just vertex/triangle lists — for instance, you'll want to be able to get all of the vertices adjacent to a given vertex, in either clockwise or counterclockwise order, relatively efficiently.

surreal rune
#

You might want to look into data structures for computational geometry, since there's going to be a lot of that in this.