JavaFX 3D : TriangleMesh specification questions
August Lammersdorf, InteractiveMesh
sdn at interactivemesh.com
Thu Apr 4 02:57:05 PDT 2013
Chien, thanks for your note.
Am I correct that your proposed smoothing group semantic change from
unique integer (0 - 31) to a '32 bit bit-set' implies that the range of
smoothing group IDs will increase up to 2**32 - 1 (4,294,967,295)? If
so, I consider this amount more than sufficient from a practical point
of view. But, you are not considering to replace 'int
faceSmoothingGroups' with 'BitSet faceSmoothingGroups' in
Nevertheless, I advocate to reserve the ID '0' for all flat shaded
Will there be a performance gain while a TriangelMesh instance is
created internally if not adjacent smooth sub-meshes are collected in
one smoothing group? Or does the generation of normals perform better if
each smooth sub-mesh is assigned to a unique ID?
One last thought: Wouldn't all these considerations be dispensable if
normals were supported?
Am Dienstag, den 02.04.2013, 11:49 +0200 schrieb Chien Yang
<chien.yang at oracle.com>:
> Hi August,
> I want to give you a heads up. We plan to make this change to
> the face smoothing group specification. Will this change works better
> for you or do you have any concern we should consider?
> - Chien
> On 2/22/2013 6:39 AM, August Lammersdorf, InteractiveMesh wrote:
>> Thanks Chien!
>> - So, a single texCoord (0,0) referenced by all vertices would be
>> sufficient if no texture is specified in the PhongMaterial !?
>> - Flat shading, triangles with all three edges creased, is just an
>> existing 3D rendering feature. Helpful to visualize face structures or
>> a red backlight glass ;-), etc..
>> - Wavefront's OBJ files (.obj) provide a smoothing group statement
>> (s 1, s 2, ..) to collect subsequent faces into the specified group.
>> The statement 's 0' or 's off' turns off smoothing and all following
>> faces must be rendered in the flat manner. If no number is reserved
>> for flat faces, assigning an exclusive number to each flat face should
>> produce the same result in JavaFX 3D.
>> - Even if a 3D file format supports smoothing groups, e.g. 3DS and
>> OBJ (Collada, VRML2, and X3D don't), its use isn't mandatory.
>> Alternatively normals or a crease angle might be delivered. Will
>> JavaFX 3D provide a smoothing group generator utility, as normals are
>> not implemented yet? Otherwise importer/loader have to include such a
>> Am Freitag, den 22.02.2013, 00:16 +0100 schrieb Chien Yang
>> <chien.yang at oracle.com>:
>>> Hi August,
>>> Please see my reply inline.
>>> On 2/21/2013 1:41 AM, August Lammersdorf, InteractiveMesh wrote:
>>>> While converting 3D model importer following questions occurred :
>>>> - Are texCoords and texCoord indices required even if no texture
>>>> is applied because NUM_COMPONENTS_PER_FACE is final and has a value
>>>> of 6 (3 point indices and 3 texCoord indices per face)?
>>> Yes, you will need to for JavaFX 8 since there is only one vertex
>>> format. We have plan to add more in future releases.
>>>> - Are normals or other vertex attributes planned?
>>>> - Is flat shading supported? Does a corresponding smoothing group
>>>> number exist for the faceSmoothingGroups array (like '0' in *.obj
>>> Flat shading isn't in our plan but we may consider it if you have
>>> good 3D use case. Can you elaborate your question on smoothing
>>>> - Must smoothing group numbers be consecutive and positive?
>>> No, we didn't specify much about its restriction. It may be good to
>>> keep this within a small positive range. We may have to tighten
>>> as we work out some of the details.
>>> - Chien
>>>> Thanks, August
More information about the openjfx-dev