[x3d-public] Allowing Normal node to accompany PointSet, then achieving well-defined rendering

Michalis Kamburelis michalis.kambi at gmail.com
Thu Dec 12 11:05:18 PST 2019


czw., 12 gru 2019 o 19:16 Don Brutzman <brutzman at nps.edu> napisał(a):
>
> On 12/5/2019 7:01 AM, Andreas Plesch wrote:
> > Hi Michalis,
> >
> > thanks for thinking this through.
>
> yes
>
> > To me, then, there are really two options concerning normal maps for Pointset:
> >
> > (A) allow normal maps for Pointsets, and introduce a MFVec3f Tangent
> > and probably Bitangent nodes, similar to the existing Normal node.
> > Similar to the Normal node, values would be automatically computed for
> > continuous surfaces using the MIKKTspace method when not provided.
> > (B) If introducing Tangent nodes is not feasible at this point, do not
> > allow normal maps for Pointsets and rely exclusively on the Normal
> > node to provide normals, per vertex.
>
> hmmm, aren't tangents unambiguously computable from surface geometry and Normal vectors?  Knowing the surrounding mesh geometry constrains the more-general case of a point.
>
> If they are computable (tangent, bitangent, whatever) and accurately renderable only when another property or two is specified, then such properties might be included in PointProperties (i.e. tangent=true/false).

The tangent and bitangent are not computable at all for PointSet.
PointSet is missing the necessary connectivity information (that
allows to compute tangents on polygons, like IndexedFaceSet).

Also, "tangent" informations is a list of 3D vectors. It's an
additional list of 3D vectors (in addition to all existing stuff, like
coordinates and normals). So it would not look like
"tangent=true/false".

About polygons: While the tangent/bitangent can be computed for
polygons, like IndexedFaceSet.... but it's not perfect.

There are multiple ways to do this computation, that yield similar but
not exactly the same results. If you want to the X3D browser to render
normalmaps in exactly the same way as it was authored (e.g. Blender
baking normalmaps), then the authoring tool should provide explicit
tangent information.

A nice screenshot what happens if the calculation of tangents
"mismatches" between the renderer and authoring tool is on
https://gamedev.stackexchange.com/questions/146855/how-do-you-compute-the-tangent-space-vectors-with-normals-given-in-the-mesh
(the screenshot is in the answer,
https://gamedev.stackexchange.com/a/147030 ).

That's why, if we consider adding "tangent" to X3D, it makes sense to
add it to all geometry nodes that already include "normal" field. This
would be consistent. It would also be consistent with glTF.

Regards,
Michalis



More information about the x3d-public mailing list