JavaFX 3D : TriangleMesh specification questions
August Lammersdorf, InteractiveMesh
sdn at interactivemesh.com
Tue Apr 23 05:23:58 PDT 2013
Chien, thanks for the description.
So, your approach follows the Autodesk(TM) 3ds Max(TM) multiple
smoothing group feature
http://docs.autodesk.com/3DSMAX/15/ENU/3ds-Max-Help/index.html?url=files/GUID-1DB2E3C2-CE68-4AF7-899E-01B90F7EB320.htm,topicNumber=d30e25679
.
AFAIK only the proprietary binary 3ds file format supports multiple
smoothing groups per face (chunk 0x4150 includes an unsigned 32-bit
integer).
Following line should assign the smoothing groups 1, 15, and 32 to the
i-th face:
faceSmoothingGroups[i] = (1 << 0) | (1 << 14) | (1 << 31);
Correct?
I assume that the smoothing group '0' can be assigned only as the sole
group and that not more than three groups can be assigned.
Currently I'm extending my importer smoothing group assignment
procedure from one to multiple groups per face. The question is, what
caused the existence of more than one smoothing group and how to detect
this by analyzing the read points and normals? One cause is if a mesh of
smoothly adjacent triangles encloses creased edges as shown in the wing
video sample (RT-29236). Any other ideas?
Is the feature RT-29012 (vertex normals for meshes) still planned for a
later release than JFX 8?
August
Am Samstag, den 20.04.2013, 15:53 +0200 schrieb Chien Yang
<chien.yang at oracle.com>:
> Hi August,
>
>The following description should be even better:
>
>/**
> * Sets the face smoothing group for each face in this {@code
> TriangleMesh}
> * Smoothing affects how a mesh is rendered but it does not effect its
> * geometry. The face smoothing group value is used to control the
> smoothing
> * between adjacent faces.
> *
> * The face smoothing group is represented by an array of bits and up
> to 32
> * unique groups is possible. The face smoothing group value can range
> from
> * zero to all 32 groups. A face is said to belong to a group is by
> having
> * the associated bit set. A value of 0 implies no smoothing group or
> hard
> * edges. A face can have no or more smoothing groups. Smoothing is
> applied
> * when adjacent pair of faces shared a smoothing group. Otherwise the
> faces
> * are rendered with a hard edge between them.
> *
> * A null faceSmoothingGroups implies all faces in this mesh have a
> * smoothing group value of 1.
> *
> * Note: If faceSmoothingGroups is not null,
> faceSmoothingGroups.length must
> * be equal to faces.length/NUM_COMPONENTS_PER_FACE.
> */
>
> Thanks,
> - Chien
More information about the openjfx-dev
mailing list