[x3d-public] Feedbacks related to x3d.py: creaseAngle support by Triangle nodes
Michalis Kamburelis
michalis.kambi at gmail.com
Thu Jun 18 05:49:29 PDT 2020
Andreas Plesch <andreasplesch at gmail.com> wrote:
> 2. I would not deprecate TriangleFanSet or TriangleStripSet. They are
> possible in glTF, and my importer glTF -> X3D nodes utilizes them, see
> https://github.com/castle-engine/castle-engine/blob/master/src/x3d/x3dloadinternalgltf.pas#L1404
> .
>
>>
>> Essentially, any geometry primitive possible in normal graphic APIs
>> (like OpenGL[ES]) can be expressed in glTF, and can be indexed or not
>> indexed.
>>
>
> Ok. I guess OpenGL still has these primitives. But it is not clear if they
> internally provide any performance benefit for rendering although they
> might. x3dom does not translate the gltf geometries but introduces a new
> BufferGeometry x3d node which takes the gltf data (from accessors) more or
> less directly. Also I am not sure if these primitives are used much at all.
> Do castle engine games use these primitives ?
>
> Does the blender exporter generate fan sets or strip sets ?
>
Blender exporter only generates triangle sets (IndexedTriangleSet), not
triangle fans or strips, as far as I saw.
I have not yet seen any actual real-life 3D models using triangle fans or
strips. (In either X3D or glTF formats.) I guess for everyone,
IndexedFaceSet / IndexedTriangleSet are enough.
Long time ago I heard of "optimizer" tools that could convert indexed
triangle sets into triangle strips automatically (for efficiency). But I
don't know whether such tools still exist, and/or support glTF or X3D,
and/or whether their gain is actually worth the trouble.
In Castle Game Engine, we don't have BufferGeometry node (yet), we create
appropriate X3D nodes like IndexedTriangleSet and "unpack" the glTF
geometry. So we rely on these triangle strip / fan nodes. But, indeed I
have not yet encountered "actual" real-life examples of these primitives
being utilized. We just offer this option in CGE, as glTF allows this
option.
Still, glTF and OpenGL[ES] define these primitives. Vulkan, which is a
newer API, also has them (
https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/chap20.html#drawing-primitive-topologies
).
Soooo, summary, about deprecating triangle strips/fans...
1. On one hand, their "real-life" usage seems to be zero.
2. On the other hand, they are possible in glTF and graphics APIs like
OpenGL[ES] and Vulkan. And we want to be able to efficiently transfer
primitives to GPUs. It would be bad if one day, we have a real large 3D
model with "triangle strips", and our tools (instead of passing it to GPU
as triangle strip) instead "unpack" it to a triangle set.
3. But then, the above need could be satisfied by introducing
BufferGeometry. Making sure that BufferGeometry allows *any* primitive,
including triangle fan/strip to be defined.
I guess the issue "depends" on BufferGeometry. IMHO, once we introduce
BufferGeometry to the spec, then the X3D nodes IndexedTriangleFanSet /
IndexedTriangleStripSet can indeed be deprecated / removed. This seems like
a good candidate for X3D 4.1 work ? :)
Regards,
Michalis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200618/b4ebdf83/attachment.html>
More information about the x3d-public
mailing list