[x3d-public] Accessing glTF Internal Data

Michalis Kamburelis michalis.kambi at gmail.com
Tue Apr 5 16:50:40 PDT 2022


CGE/view3dscene sets the glTF transform node names like 'Node0',
'Node1' etc. for this reason.

Unless the node has some explicit name, then we happily use it. Making
sure it is unique -- adding suffixes like _2, _3 to make it unique.

That is why you saw "Avocado" and "Avocado_2" node names in "Using
IMPORT / EXPORT to selectively include parts of glTF file in X3D, and
multiply them as much as necessary" thread example :)

This way everything can be referenced (whether it has a name or not in
glTF), but also we use descriptive names if available. When they are
available, using the names is better IMHO -- as the order of nodes in
glTF is not directly controlled by a 3D artist that exports to glTF
from Blender/3dsMax etc. And various edits, adding and removing 3D
stuff, will shift the indexes of exported glTF nodes. So, for someone
using Blender/3dsMax etc., it's more reliable to set a name for object
(which is exported to Blender) and then using this name to load the
appropriate thing from glTF.

Regards,
Michalis


śr., 6 kwi 2022 o 01:26 GPU Group <gpugroup at gmail.com> napisał(a):
>
> Thanks for pointing that out Leonard. How about something like url='library.gltf#Node:0' , or .Node[0] ?
>
> On Tue, Apr 5, 2022 at 4:48 PM Leonard Daly <Leonard.Daly at realism.com> wrote:
>>
>> I have seen many recent discussions on this list refer to something like 'model.glTF#name'. In usual HTTP referencing the '#name' is a search string that refers to a unique ID in the HTML.
>>
>> If the intent is to use the same concept for accessing internal glTF data, it is (very) important to note that the name is not required and it need not be unique. The best references are the indices that are used to refer to various nodes, buffers, etc. I do not know, nor am I suggesting how to refer to indices.
>>
>> --
>> Leonard Daly
>> 3D Systems & Cloud Consultant
>> LA ACM SIGGRAPH Past Chair
>> President, Daly Realism - Creating the Future
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org



More information about the x3d-public mailing list