Trouble getting normals into THREE.BufferGeometry()

I think he’s saying, at the end of the day you cant really go wrong with the triangle soup :slight_smile:

At worst, you have to represent every vertex individually, make life easier by doing so.

In your case, you can keep:

Since you’re storing it for convenience, but, you have to expand those two as,

vec expanded = [normals[0],normals[0],normals[0], normals[1], normals[1], normals[1]]

Also for the vertices:

[v[0].v[1].v[2].v[1].v[3].v[3]]

So yeah, that’s what I’m trying to say, that the only way is “triangle soup” :smile: And that’s what THREE.OBJLoader() does.

1 Like

It gets involved otherwise. This probably works the best for everyone. Although, if you do need the structure… youre out of luck, probably have to parse the obj yourself.

not really the only way, for the vertex that has , say 3 different faces using it and thus 3 different face normals, you could duplicate it and have each face index to point to different vertex copy. assuming all of the vertices are like that, of course, makes the index useless, but if some of adjacent faces share the same face normal, an index could still save you some space

1 Like

@makc3d Whatever way we choose, if we need correct shading, based on normals, we come to a non-indexed buffer geometry.
The author wants an index for normals the same way like for vertices, at least I got it like that.