以 gltf 2.0 格式保存的 3D 模型可以支持任意用户数据吗?
我正在管理 3D 资产库的创建,预计每次传递 5,000 个模型,其中多个传递来自多个模型创建供应商。正在进行的作品均为 FBX 格式,最终交付为二进制 gltf (glb) 格式。
我一直在阅读 gltf/glb 格式,但没有看到任何可以放置“用户数据”的字段。我想在每个 glb 模型中放置一个字符串来标识模型,以便可以验证模型在存储文件系统中的位置以及数据库中的信息放置。
到目前为止,我已经看到了 gltf 格式的 3D 资源所需的一切,但是是否有用于用户字符串信息的字段?我可以很容易地想象,在最终库中的数以万计的模型中,有些模型被人类意外地放置在错误的目录中,和/或在输入模型的数据库信息时出现粗手指输入错误,和/或简单地输入模型时出现粗手指错误。文件名。
我想要一个用于标识字符串的用户数据字段,以便可以使用在该用户数据字段之外运行的软件自动处理文件系统中的模型存储和数据库中的信息放置。同样,用户数据字段可用于验证收到的模型是否是开发时请求的模型,并且可在遍历存储目录层次结构的每个文件时使用,以使用文件名以外的其他内容验证该层次结构中每个文件的存在。
I am managing the creation of a 3D Asset library, with a delivery expectation of 5,000 models per pass, with several passes each from multiple model creation vendors. The works in progress are all in FBX format, with final delivery in binary gltf (glb) format.
I've been reading the gltf/glb format and I do not see any field where "user data" can be placed. I want to place a string in each glb model identifying the model in such a manner that the model's location in the storage file system and information placement in a database can be validated.
So far, I see everything we need for the 3D assets in the gltf format, but is there any field for user string information? I can easily imagine, of the tens of thousands of models in the final library, some being accidently placed in wrong directories by humans, and/or fat finger typing errors while entering a model's database information, and/or fat finger errors simply entering a filename.
I want a user data field for an identification string so the handling of model storage in the file system and info placement in a database can be automated using software operating off that user data field. Likewise, a user data field can be used to validate a model received is the model requested while developing, and can be used when walking every file of the storage directory hierarchy to validate the presence of every file in that hierarchy using something other than the filename.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
glTF 或 GLB 文件中的每个对象都有一个可以存储任意 JSON 内容的
.extras
属性。例如,scene.extras
或asset.extras
可能是您所描述的数据的自然位置。然后,3D 库和游戏引擎应读取该数据并将其提供给用户应用程序。例如,3D 库 https://thirdjs.org/ 放置
.extras
glTF 文件中的字段放入其Object3D.userData
值。 Blender 是一个建模程序,使用 自定义属性。Each object in a glTF or GLB file has a
.extras
property that can store arbitrary JSON content. For example,scene.extras
orasset.extras
would probably be natural places for the data you're describing.3D libraries and game engines should then read that data and make it available to user applications. For example, the 3D library https://threejs.org/ puts the
.extras
fields from the glTF file into itsObject3D.userData
values. Blender, a modeling program, uses Custom Properties.