[x3d-public] Feedbacks related to x3d.py: creaseAngle support by Triangle nodes

Don Brutzman brutzman at nps.edu
Sun Jun 14 21:09:19 PDT 2020


Open question:  why isn't creaseAngle supported by the Triangle nodes?  Seems like an unintended omission. All feedback welcome, we will resolve this during next Friday's X3D Working Group meeting.

[1] X3D Architecture, Rendering component
     https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/rendering.html#IndexedTriangleSet

IndexedTriangleFanSet,
IndexedTriangleSet,
IndexedTriangleStripSet,
TriangleFanSet,
TriangleSet, and
TriangleStripSet.

[2] X3D Architecture, Rendering component, 11.2.3 Common geometry fields
     https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/rendering.html#CommonGeometryFields

"Certain geometry nodes have several fields that provide information about the rendering of the geometry. These fields specify the vertex ordering, if the shape is solid, if the shape contains convex faces, and at what angle a crease appears between faces, and are named ccw, solid, convex and creaseAngle, respectively."
[...]
"The creaseAngle field affects how default normals are generated. If the angle between the geometric normals of two adjacent faces is less than the crease angle, normals shall be calculated so that the faces are shaded smoothly across the edge; otherwise, normals shall be calculated so that a lighting discontinuity across the edge is produced. Crease angles shall be greater than or equal to 0.0 angle base units."
Entered as

[3] Mantis issue 1308: creaseAngle support by Triangle nodes
     https://www.web3d.org/member-only/mantis/view.php?id=1308

Thanks for the excellent feedback Thomas.  If accepted following group review, these fields go directly into X3DUOM and then subsequent x3d.py build.


On 6/12/2020 3:24 AM, Thomas Paviot wrote:
> 2. I noticed the IndexedTriangleSet does not have any creaseAngle field, whereas x3dom supports it.
> 
>  >>> x3d.IndexedFaceSet(creaseAngle=0.2)
> <x3d.IndexedFaceSet object at 0x000001EA5ED7A7B8>
>  >>> x3d.IndexedTriangleSet(creaseAngle=0.2)
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> TypeError: __init__() got an unexpected keyword argument 'creaseAngle'
> 
> It actually follows the standard specification (https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/rendering.html#IndexedTriangleSet), my question is then related to the standard itself: why do the IndexedTriangleSet (and some other geometries) does not define the creaseAngle field ?
> 
> Best Regards,
> 
> Thomas Paviot

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list