-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobjects.html
More file actions
204 lines (201 loc) · 7.43 KB
/
objects.html
File metadata and controls
204 lines (201 loc) · 7.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
---
layout: default
title: About
---
<div class="bubble">
<h1>Object Packets</h1>
After sending the
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/core/region_handshake_response/"
>RegionHandshakeResponse</a
>
packet,
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/object_update"
>ObjectUpdate</a
>,
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/object_update_compressed"
>ObjectUpdateCompressed</a
>,
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/object_update_cached"
>ObjectUpdateCached</a
>
and
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/improved_terse_object_update"
>ImprovedTerseObjectUpdate</a
>
packets will start streaming in from the server, representing a few different
methods of spawning objects in the scene, or updating their state.
<br />
<br />
Object Update packets are used for almost everything when it comes to building
the scene. They are used to inform the viewer of an avatar's presence, their
attachments, and the scene's spawned objects.
</div>
<div class="bubble">
<h1>Object Update</h1>
This is one of the first object updating packets the viewer will receive.
Before the agent is a root agent, ObjectUpdate packets will be sent,
containing avatar data, and avatar attachment data.
<br />
<br />
Though the parsing of most of the packet is relatively simple, lots of
relevant information is hidden in non-obvious places throughout the packet.
<div class="bubble-row">
<div class="bubble contrast">
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/core/object_update/struct.ObjectUpdate.html#structfield.extra_params"
>
<h2>extra_params</h2>
</a>
contains information about sculpts, flex data, materials, and more. Each
type has a different decoding structure. Extra params of type sculpt can
contain mesh data, and store the asset_ID for retrieving a full mesh from
the ViewerAsset endpoint.
</div>
<div class="bubble contrast">
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/core/object_update/struct.ObjectUpdate.html#structfield.name_value"
>
<h2>name_value</h2>
</a>
<p>
A string representation of certain object relevant information. For
objects of type Avatar, this contains the avatar's name. For objects of
type Prim, this can include a string representation of the object's
attachment data.
</p>
</div>
</div>
{% capture update %}
<h2>Parsing Object Update</h2>
Though the majority of the ObjectUpdate struct is straightforward, the
MotionData portion of it can be difficult to parse correctly.
<br />
The type of update is determined by the length of the data field.
<br />
<br />
<div class="bubble-row">
<div class="bubble tertiary">
<h2>High</h2>
<div class="bubble sinister">
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/core/object_update/index.html#high-precision-update-with-foot-collision-plane"
><h3>High Precision Update With Foot Collision Plane</h3></a
>
76 bytes
</div>
<div class="bubble sinister">
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/core/object_update/index.html#high-precision-update"
><h3>High Precision Update</h3></a
>
60 bytes
</div>
</div>
<div class="bubble tertiary">
<h2>Medium</h2>
<div class="bubble sinister">
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/core/object_update/index.html#medium-precision-update-with-foot-collision-plane"
><h3>Medium Precision Update With Foot Collision Plane</h3></a
>
48 bytes
</div>
<div class="bubble sinister">
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/core/object_update/index.html#medium-precision-update"
><h3>Medium Precision Update</h3></a
>
32 bytes
</div>
</div>
<div class="bubble tertiary">
<h2>Low</h2>
<div class="bubble sinister">
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/core/object_update/index.html#low-precision-update"
><h3>Low Precision Update</h3></a
>
16 bytes
</div>
</div>
</div>
{% endcapture %} {% include evil_benthic.html content=update %}
</div>
<div class="bubble">
<h1>ObjectUpdateCached</h1>
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/object_update_cached"
>ObjectUpdateCached</a
>
packets begin coming in after the
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/core/region_handshake_response/"
>RegionHandshakeResponse</a
>
packet is sent. This is a very simple packet that contains only a list of the
scene-local IDs, and a CRC for visible objects in the scene, to inform the
viewer to check its cache for the objects specified.
<br />
<br />
If those objects aren't present, the viewer is expected to sen a
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/request_multiple_objects"
>RequestMultipleObjects</a
>
packet, and expect to receive
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/object_update_compressed"
>ObjectUpdateCompressed</a
>
packets in return.
</div>
<div class="bubble">
<h1>ObjectUpdateCompressed</h1>
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/object_update_compressed"
>ObjectUpdateCompressed</a
>
packets begin coming in after the
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/core/region_handshake_response/"
>RegionHandshakeResponse</a
>
packet is sent. It is also sent in response to a
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/request_multiple_objects"
>RequestMultipleObjects</a
>
packet, giving full object information for the requested objects. This is
similar to an
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/object_update"
>ObjectUpdate</a
>
packet, having many similar fields in its data block. This includes its
special handling of the extra_params block, and the name_value block. However,
this contains several objects instead of a single one, many of its fields are
optional, and are out of order when compared to an
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/object_update"
>ObjectUpdate</a
>, packet.
</div>
<div class="bubble">
<h1>ImprovedTerseObjectUpdate</h1>
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/improved_terse_object_update"
>ImprovedTerseObjectUpdate</a
>
These packets are received mainly when something in the scene has changed
position, velocity, or some other movement property. These are short packets
which give mostly the fields found in the MotionData field in the
<a
href="https://docs.rs/metaverse_messages/latest/metaverse_messages/udp/object/object_update"
>ObjectUpdate</a
>, packet.
</div>