Three.js: webgl_geometry_text.html needs to be revisited

Created on 26 Jul 2018  路  4Comments  路  Source: mrdoob/three.js

webgl_geometry_text.html needs to be modified to use TextBufferGeometry. That's easy.

But normals are "fixed" in this demo for some reason.

Normals should be correct to begin with... one would think.

Suggestion

Most helpful comment

Then I think the new flag should be placed in ExtrudeBufferGeometry. Same behavior without text:

https://jsfiddle.net/f2Lommf5/16399/

All 4 comments

The problem is that computeVertexNormals() is called:

https://github.com/mrdoob/three.js/blob/6d492ed3ae5878fa1c670e8a8d2d69f08d39add4/examples/webgl_geometry_text.html#L381

This is done to avoid the flat shaded sides like in this screenshot:

image

Um, since the current code in the example is a hack, I think it would be better to remove it and accept the flat shaded sides.

Thanks, @Mugen87. So the hack was to remove the faceted sides... I wonder if text geometry can be improved so that (for the sides only) neighboring vertex normals are "the same" if the face normals are "close". Maybe add an experimental smoothEdges flag or edgeSmoothness property.

It would be great if we could get rid of the faceted edges, without messing something else up.

Then I think the new flag should be placed in ExtrudeBufferGeometry. Same behavior without text:

https://jsfiddle.net/f2Lommf5/16399/

Was this page helpful?
0 / 5 - 0 ratings