当前位置:网站首页>Add joint control to gltf model
Add joint control to gltf model
2022-07-27 20:15:00 【giao00000】
GLTF Add joint control to the model
List of articles
1. Preface
stay Cesium The official example provides an example of controlling the separation of the rocket fairing , Example link CZML Model Articulations. This example shows how to control glb/gltf In the model articulations To control the movement of some joints of the model . The premise is that There are in the model file articulations attribute , This article mainly introduces how to do it in Blender And other 3D modeling software gltf Add... To the model articulations attribute .
2. Environmental preparation
- Blender Or other mainstream 3d modeling software : Used to export gltf Model
- VS Code: Need to install plug-ins
glTF ToolsandSTK GMDF Tools, for gltf Model preview and injection articulations attribute - Three dimensional model : You can go to https://github.com/AnalyticalGraphicsInc/gmdf/tree/master/samples download
3. Operation steps
Blender Open the 3D model , With samples\VehicleTest\source\VehicleTest.blend For example , It can be seen that the model mainly includes the body 、 Front wheel and rear wheel , Exporting gltf After that can be
nodesFind the corresponding part under the attribute ;
export gltf Format model ;

VS Code Preview gltf Model , You can see gltf In the document nodes Including the front wheels mentioned above 、 The rear wheel , Next, you can control the movement of the front and rear wheels by adding attributes ;

stay VehicleTest.gltf Created in the same level directory VehicleTest.gmdf file , The contents of the document are as follows :
{
"AGI_articulations": {
"articulations": [
{
"name": "Wheels",
"stages": [
{
"name": "Drive",
"type": "xRotate",
"minimumValue": -360,
"maximumValue": 360,
"initialValue": 0
}
],
"modelNodes": [
"FrontWheels",
"RearWheels"
]
}
]
}
}
AGI_articulations and articulations All in fixed format , Main concern modelNodes and stages.modelNodes Used to describe the model joints to be controlled , It is the front and rear wheels in the above ;stages Used to explain how joints move , In the example type Indicates that the joint type is along x Shaft rotation ,minimumValue and maximumValue Used to control the range . For more specific meanings of attribute fields, please refer to https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/AGI_articulations/README.md#overview
take gmdf File injection into gltf file , First, in the VS Code Choose
VehicleTest.gltffile , Press and hold the shortcut keyCtrl + Shift + P, Search forGMDF, Choose the commandinject GMDF into glTF, Then you can see in gltf There are new contents added in the document , After saving, you can see the operation interface of controlling joint motion in the model preview interface , You can control the movement of the wheel by dragging the slider ;


4. Reference link
[1]. Cesium Example
[2]. GMDF Tools and glTF Model example
边栏推荐
- YY English learning about fish
- C # network application programming, experiment 2: IP address translation and domain name resolution exercises
- C # network application programming, experiment 1: WPF exercise
- Online judge output overrun
- 获得微店商品详情 API
- [C # network application programming] Experiment 3: process management exercise
- Chapter 2 Introduction
- #yy关于鱼的英文学习
- JS 数组方法 forEach 和 map 比较
- Solve the problem of displaying the scroll bar when there is no data in the viewui table
猜你喜欢

使用cpolar建立一个商业网站(5)

YY English learning about fish

Understanding of basic concepts of channel capacity and channel bandwidth

ms721负载测试

ViewUI 中 DatePicker 日期选择器在 IE11 浏览器中兼容解决方案

unity2D 动态漫画剧本(给猛虎桥章节做动画演示二)

想转行软件测试,先过这三关,包含一份3000字超全测试学习指南

'vite' is not an internal or external command, nor is it a runnable program or batch file

连接池-归还连接详解(上)

Underlying principle of mvcc
随机推荐
C # network application programming, experiment 1: WPF exercise
Built in functions other functions
22 year PMP test [Quanzhen agile test]
uva1421
[IOT] Wei Peng: Interpretation of 6000 + words | seven necessary product management tools for product people in 2022 (version 1.0)
JS array method foreach and map comparison
C# 后台GC 的前因后果
[C #] positive sequence, reverse sequence, maximum value, minimum value and average value
最新获得淘宝app商品详情原数据 的API
技术分享 | 接口自动化测试中,如何做断言验证?
Underlying principle of mvcc
codeforces每日5题(均1500)-第二十四天
Introduction to reinforcement learning
kubectl 获取pod日志 —— 筑梦之路
libpcap库和pcap_sendpacket接口函数了解
C background GC cause and effect
#yy关于鱼的英文学习
Konka sold out its first 100000 storage master chips, with an estimated sales volume of 100million in 2020
华为手机出货超苹果成全球第二,但面临大量库存需要清理
汇顶科技:收购恩智浦VAS业务已完成交割