Page MenuHome

X3D export: creaseAngle must be in radians, not degrees
Closed, ArchivedPublicPATCH

Description

In X3D, the "creaseAngle" field should be expressed in radians.

- See specification on http://www.web3d.org/x3d/specifications/ISO-IEC-19775-1.2-X3D-AbstractSpecification/Part01/components/rendering.html#CommonGeometryFields . Although it's not explicitly said there "creaseAngle is in radians", but it's hinted by "for example creaseAngle = 0.5 radians..." .
- All X3D browsers handle it in radians, at least view3dscene, FreeWRL, InstantReality.
- And angles in X3D are always in radians, never degrees.

Currently, Blender X3D exporter sets creaseAngle to mesh.auto_smooth_angle, and mesh.auto_smooth_angle is in degrees (like the UI control).

This trivial patch fixes it, by wrapping (two) occurences of mesh.auto_smooth_angle inside math.radians() call.

Event Timeline

Hi Michalis,
mesh.auto_smooth_angle is now radians so this patch is not needed anymore.
Thanks all the same.

Campbell Barton (campbellbarton) changed the task status from Unknown Status to Unknown Status.Jun 11 2011, 3:15 PM