VertexBuffer normals without indices?

Hi,

using a VertexBuffer with raw points, setting the stride to 3. This is the rawest approach.

How could it be possible in BJS to calculate the normals from here? I don’t want to send indices alongside the vertices data. In 3JS you can computeVertexNormals() from buffergeometry. and you have computeNormals() but in vertexData class, which expects indices to be filled…

Still learning BJS, I may have missed something important along the way.

Thanks

So a unindexed mesh? (positions, but no indices)

Support for unindexed meshes is generally limited to “display only” and a couple functions here and there people implemented over time, they’re really only good when a mesh is very simple / small number of positions.

That being said, you could copy the “computeNormals()” function from the source on github and alter it to work with unindexed meshes.

I’m not sure if the team would be interested in a PR?
They should be back by monday :slight_smile:

Thanks!

I finally decided to create an array with increasing number as an indice buffer.
Does the job :slight_smile:

1 Like