Object Packets
After sending the RegionHandshakeResponse packet, ObjectUpdate, ObjectUpdateCompressed, ObjectUpdateCached and ImprovedTerseObjectUpdate packets will start streaming in from the server, representing a few different methods of spawning objects in the scene, or updating their state.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.
Object Update
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.Though the parsing of most of the packet is relatively simple, lots of relevant information is hidden in non-obvious places throughout the packet.
extra_params
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.name_value
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.
Parsing Object Update
Though the majority of the ObjectUpdate struct is straightforward, the MotionData portion of it can be difficult to parse correctly.The type of update is determined by the length of the data field.
Low
Low Precision Update
16 bytesObjectUpdateCached
ObjectUpdateCached packets begin coming in after the RegionHandshakeResponse 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.If those objects aren't present, the viewer is expected to sen a RequestMultipleObjects packet, and expect to receive ObjectUpdateCompressed packets in return.