[x3d-public] Here's something worth tracking down Roy: Normal accompanying PointSet

Michalis Kamburelis michalis.kambi at gmail.com
Thu Oct 26 12:52:12 PDT 2017


2017-10-26 21:18 GMT+02:00 vmarchetti at kshell.com <vmarchetti at kshell.com>:
> "Normal" might be too exacting a term to apply to this important idea.
> What we really want to do is to have some way of attaching a direction to at least some of the points in a point cloud.
>

To attach arbitrary per-vertex data to your model, you could use
descendants of X3DVertexAttributeNode . In particular,
FloatVertexAttribute with numComponents = 3 is exactly for providing
3D vector data (like directions) that is per-vertex. These nodes are
part of the "Shaders" component, and their main purpose is to provide
per-vertex information to the vertex shaders... but they simply exist
in the X3D scene graph, you can use them for any purpose. (And if
you're going to apply some non-standard graphic effects on your
PointSet, then you probably want to have this data passed to the
vertex shader anyway.)

See http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/shaders.html#FloatVertexAttribute
.

PointSet, as well as all other Coordinate-based nodes, has a field
"attrib" where you can place FloatVertexAttribute, see
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/rendering.html#PointSet
.

Regards,
Michalis



More information about the x3d-public mailing list