I use ThreeJS r68.
I always used THREE.Geometry
for my project and it just works fine.
Now I want to change from THREE.Geometry
to THREE.BufferGeometry
because I read that this is the better choice.
But I couldn't get SmoothShading to work with my THREE.BufferGeometry
.
I load my Object into a BufferGeometry and call bufferGeometry.computerVertexNormals
. And then my result is FlatShading.
I read in the computeVertexNormals()
method that BufferGeometry calculates differently if I use an "index" attribute. I tried to create an "Indexed" BufferGeometry but that just made everything worse. I don't know if I just created that right. I just added the indices like I would add them to the faces in a normal Geometry. The BufferGeometry.fromGeometry()
method does not create an indexed BufferGeometry so I don't know where to look.
Do I need an indexed BufferGeometry for SmoothShading?
UPDATE
[... some time later....]
I think I could create a indexed THREE.BufferGeometry
now. It's more like Geometry. And smooth shading looks fine with an indexed BufferGeometry. So now i have SmoothShading but a invalid uv-map. But why is the uv-map different in an indexed BufferGeometry to compared to not indexed BufferGeometry? BufferGeometry is really not easily loaded.